From e95f8d93f2ae92d7226be947ca5c963bf879c18e Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 3 May 2012 16:34:16 +0100 Subject: [PATCH] cfi: fix cfi arch check regression 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 Reviewed-on: http://openocd.zylin.com/615 Tested-by: jenkins Reviewed-by: Aurelien Jacobs --- src/flash/nor/cfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 80d04554..bb6afa32 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -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; -- 2.39.5