diff options
author | Spencer Oliver <spen@spen-soft.co.uk> | 2013-01-10 12:48:15 +0000 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2013-02-02 16:21:41 +0000 |
commit | fc2abe63fd3cea7497da7be2955d333bd3f800b9 (patch) | |
tree | 1fb9a62ccad401300abf3e9227aa0106d8c934e0 /src/flash | |
parent | bf3f35092ea96b33ceda33d497ec04514e94cb00 (diff) |
armv7m: use generic arm::core_mode
To simplify things change over to using the generic core_mode struct rather
than maintaining a armv7m specific one.
Change-Id: Ibf32b785d896fef4f33307fabe0d8eb266f7086f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/966
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/nor/cfi.c | 2 | ||||
-rw-r--r-- | src/flash/nor/efm32.c | 2 | ||||
-rw-r--r-- | src/flash/nor/em357.c | 2 | ||||
-rw-r--r-- | src/flash/nor/fm3.c | 2 | ||||
-rw-r--r-- | src/flash/nor/lpc2000.c | 2 | ||||
-rw-r--r-- | src/flash/nor/lpcspifi.c | 6 | ||||
-rw-r--r-- | src/flash/nor/stellaris.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stm32f1x.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stm32f2x.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stm32lx.c | 2 |
10 files changed, 12 insertions, 12 deletions
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index f6b57443..81a58cec 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -1778,7 +1778,7 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, if (is_armv7m(target_to_armv7m(target))) { /* armv7m target */ armv7m_algo.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_algo.core_mode = ARMV7M_MODE_HANDLER; + armv7m_algo.core_mode = ARM_MODE_ANY; arm_algo = &armv7m_algo; } else if (is_arm(target_to_arm(target))) { /* All other ARM CPUs have 32 bit instructions */ diff --git a/src/flash/nor/efm32.c b/src/flash/nor/efm32.c index 37cb79b4..52e732d6 100644 --- a/src/flash/nor/efm32.c +++ b/src/flash/nor/efm32.c @@ -610,7 +610,7 @@ static int efm32x_write_block(struct flash_bank *bank, uint8_t *buf, buf_set_u32(reg_params[4].value, 0, 32, address); armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; ret = target_run_flash_async_algorithm(target, buf, count, 4, 0, NULL, diff --git a/src/flash/nor/em357.c b/src/flash/nor/em357.c index 5fa00139..e93af2f0 100644 --- a/src/flash/nor/em357.c +++ b/src/flash/nor/em357.c @@ -522,7 +522,7 @@ static int em357_write_block(struct flash_bank *bank, uint8_t *buffer, ; armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; init_reg_param(®_params[0], "r0", 32, PARAM_OUT); init_reg_param(®_params[1], "r1", 32, PARAM_OUT); diff --git a/src/flash/nor/fm3.c b/src/flash/nor/fm3.c index 55a2e22b..aa5d58d1 100644 --- a/src/flash/nor/fm3.c +++ b/src/flash/nor/fm3.c @@ -502,7 +502,7 @@ static int fm3_write_block(struct flash_bank *bank, uint8_t *buffer, } armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; init_reg_param(®_params[0], "r0", 32, PARAM_OUT); /* source start address */ init_reg_param(®_params[1], "r1", 32, PARAM_OUT); /* target start address */ diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c index 06f3ec42..1aa3b914 100644 --- a/src/flash/nor/lpc2000.c +++ b/src/flash/nor/lpc2000.c @@ -309,7 +309,7 @@ static int lpc2000_iap_call(struct flash_bank *bank, struct working_area *iap_wo switch (lpc2000_info->variant) { case lpc1700: armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; iap_entry_point = 0x1fff1ff1; break; case lpc2000_v1: diff --git a/src/flash/nor/lpcspifi.c b/src/flash/nor/lpcspifi.c index 757d6d19..89e8f037 100644 --- a/src/flash/nor/lpcspifi.c +++ b/src/flash/nor/lpcspifi.c @@ -182,7 +182,7 @@ static int lpcspifi_set_hw_mode(struct flash_bank *bank) }; armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; LOG_DEBUG("Allocating working area for SPIFI init algorithm"); @@ -519,7 +519,7 @@ static int lpcspifi_erase(struct flash_bank *bank, int first, int last) }; armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; /* Get memory for spifi initialization algorithm */ @@ -726,7 +726,7 @@ static int lpcspifi_write(struct flash_bank *bank, uint8_t *buffer, }; armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; init_reg_param(®_params[0], "r0", 32, PARAM_IN_OUT); /* buffer start, status (out) */ init_reg_param(®_params[1], "r1", 32, PARAM_OUT); /* buffer end */ diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 83ca5853..cd0311a4 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -1045,7 +1045,7 @@ static int stellaris_write_block(struct flash_bank *bank, (uint8_t *) stellaris_write_code); armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; init_reg_param(®_params[0], "r0", 32, PARAM_OUT); init_reg_param(®_params[1], "r1", 32, PARAM_OUT); diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c index 8e5bf79a..6ca814a7 100644 --- a/src/flash/nor/stm32f1x.c +++ b/src/flash/nor/stm32f1x.c @@ -656,7 +656,7 @@ static int stm32x_write_block(struct flash_bank *bank, uint8_t *buffer, buf_set_u32(reg_params[4].value, 0, 32, address); armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; retval = target_run_flash_async_algorithm(target, buffer, count, 2, 0, NULL, diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c index 7201914d..22cc9cf1 100644 --- a/src/flash/nor/stm32f2x.c +++ b/src/flash/nor/stm32f2x.c @@ -558,7 +558,7 @@ static int stm32x_write_block(struct flash_bank *bank, uint8_t *buffer, }; armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; init_reg_param(®_params[0], "r0", 32, PARAM_IN_OUT); /* buffer start, status (out) */ init_reg_param(®_params[1], "r1", 32, PARAM_OUT); /* buffer end */ diff --git a/src/flash/nor/stm32lx.c b/src/flash/nor/stm32lx.c index fc0fb9e1..8b09387e 100644 --- a/src/flash/nor/stm32lx.c +++ b/src/flash/nor/stm32lx.c @@ -283,7 +283,7 @@ static int stm32lx_write_half_pages(struct flash_bank *bank, uint8_t *buffer, } armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; - armv7m_info.core_mode = ARMV7M_MODE_ANY; + armv7m_info.core_mode = ARM_MODE_ANY; init_reg_param(®_params[0], "r0", 32, PARAM_OUT); init_reg_param(®_params[1], "r1", 32, PARAM_OUT); init_reg_param(®_params[2], "r2", 32, PARAM_OUT); |