]> git.sur5r.net Git - openocd/commitdiff
cfi: fix cfi arch check regression
authorSpencer Oliver <spen@spen-soft.co.uk>
Thu, 3 May 2012 15:34:16 +0000 (16:34 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 14 May 2012 09:29:43 +0000 (09:29 +0000)
seems 9933fa334de551096674d4044ed7ac2152213e8b introduce a regression
if the target was anything other than armv4_5 or armv7m.

Just check that we have an arm target.

Change-Id: I67c05138e5be2952ee92e9bfa15e1d050844462a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/615
Tested-by: jenkins
Reviewed-by: Aurelien Jacobs <aurel@gnuage.org>
src/flash/nor/cfi.c

index 80d04554c2f75af9b38f75ba6942fd883d52eeba..bb6afa322ae7f44a83d855ced0dbcd1551ea5b26 100644 (file)
@@ -1817,7 +1817,7 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer,
                arm_algo.common_magic = ARMV7M_COMMON_MAGIC;
                arm_algo.core_mode = ARMV7M_MODE_HANDLER;
                arm_algo.core_state = ARM_STATE_ARM;
-       } else if (is_arm7_9(target_to_arm7_9(target))) {
+       } else if (is_arm(target_to_arm(target))) {
                /* All other ARM CPUs have 32 bit instructions */
                arm_algo.common_magic = ARM_COMMON_MAGIC;
                arm_algo.core_mode = ARM_MODE_SVC;