aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2012-01-12 22:00:09 +0000
committerSpencer Oliver <spen@spen-soft.co.uk>2012-01-12 22:27:52 +0000
commitc2c4f440afb7695c2c1bc3f2d4b925de3c035212 (patch)
tree2d2fdfcdd7e00f488e6cf2d0b7c32fa8a19dd372 /src/flash/nor
parentaa29f083a79fe1c2238b66bee84fd2707603e64a (diff)
downloadriscv-openocd-c2c4f440afb7695c2c1bc3f2d4b925de3c035212.zip
riscv-openocd-c2c4f440afb7695c2c1bc3f2d4b925de3c035212.tar.gz
riscv-openocd-c2c4f440afb7695c2c1bc3f2d4b925de3c035212.tar.bz2
build: fix broken commit
fixes commit 04fe2ca5547f76686c7dc555f90510eed6fcc551 Change-Id: Id7fcb82fa1a445f1df21b8d98e945f7c0e08ec93 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/375 Tested-by: jenkins
Diffstat (limited to 'src/flash/nor')
-rw-r--r--src/flash/nor/stm32f2x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c
index 6d97bc6..4d3571c 100644
--- a/src/flash/nor/stm32f2x.c
+++ b/src/flash/nor/stm32f2x.c
@@ -595,7 +595,7 @@ static int stm32x_get_device_id(struct flash_bank *bank, uint32_t *device_id)
if (retval != ERROR_OK)
return retval;
- if ((*device_id & DEV_ID_MASK) == 0x411) {
+ if ((*device_id & 0xfff) == 0x411) {
/* read CPUID reg to check core type */
retval = target_read_u32(target, 0xE000ED00, &cpuid);
if (retval != ERROR_OK)
@@ -603,7 +603,7 @@ static int stm32x_get_device_id(struct flash_bank *bank, uint32_t *device_id)
/* check for cortex_m4 */
if (((cpuid >> 4) & 0xFFF) == 0xC24) {
- *device_id &= ~((0xFFFF << 16) | DEV_ID_MASK);
+ *device_id &= ~((0xFFFF << 16) | 0xfff);
*device_id |= (0x1000 << 16) | 0x413;
LOG_INFO("stm32f4x errata detected - fixing incorrect MCU_IDCODE");
}