This is an automated email from Gerrit.

Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/386

-- gerrit

commit ec4685b75ba1d32d6e0bdbfcc5b03f76f8d94c67
Author: Spencer Oliver <s...@spen-soft.co.uk>
Date:   Tue Jan 17 13:39:46 2012 +0000

    flash: update stellaris_set_flash_timing for target class
    
    stellaris_set_flash_timing should only be used for Sandstorm and Fury
    device classes.
    
    Change-Id: I72b4a8aa38661c9f9424e9bcc783196f6473cda1
    Signed-off-by: Spencer Oliver <s...@spen-soft.co.uk>

diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c
index 9645c5f..acb976b 100644
--- a/src/flash/nor/stellaris.c
+++ b/src/flash/nor/stellaris.c
@@ -101,6 +101,7 @@ struct stellaris_flash_bank
        uint32_t dc1;
 
        const char * target_name;
+       uint8_t target_class;
 
        uint32_t sramsiz;
        uint32_t flshsz;
@@ -536,6 +537,10 @@ static void stellaris_set_flash_timing(struct flash_bank 
*bank)
        struct target *target = bank->target;
        uint32_t usecrl = (stellaris_info->mck_freq/1000000ul-1);
 
+       /* only valid for Sandstorm and Fury class devices */
+       if (stellaris_info->target_class < 2)
+               return;
+
        LOG_DEBUG("usecrl = %i",(int)(usecrl));
        target_write_u32(target, SCB_BASE | USECRL, usecrl);
 }
@@ -749,6 +754,7 @@ static int stellaris_read_part_info(struct flash_bank *bank)
        }
 
        stellaris_info->target_name = StellarisParts[i].partname;
+       stellaris_info->target_class = StellarisParts[i].class;
 
        stellaris_info->did0 = did0;
        stellaris_info->did1 = did1;

-- 

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to