target/arm: optimize architecture flags
In target/arm.h the struct arm do contain 3 flags to retain architecture version for some tweaks. The proposal is to have only one enumerated flag 'arch' for the same purpose. Change-Id: Ia5d5accfed8158ca21eb54af2fdea8e36f0266ae Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/6229 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
b19505a343
commit
f69adafb3d
@@ -173,7 +173,7 @@ int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size)
|
||||
buf_set_u32(reg_params[2].value, 0, 32, size);
|
||||
|
||||
/* armv4 must exit using a hardware breakpoint */
|
||||
if (arm->is_armv4)
|
||||
if (arm->arch == ARM_ARCH_V4)
|
||||
exit_var = nand->copy_area->address + target_code_size - 4;
|
||||
|
||||
/* use alg to write data from work area to NAND chip */
|
||||
@@ -279,7 +279,7 @@ int arm_nandread(struct arm_nand_data *nand, uint8_t *data, uint32_t size)
|
||||
buf_set_u32(reg_params[2].value, 0, 32, size);
|
||||
|
||||
/* armv4 must exit using a hardware breakpoint */
|
||||
if (arm->is_armv4)
|
||||
if (arm->arch == ARM_ARCH_V4)
|
||||
exit_var = nand->copy_area->address + target_code_size - 4;
|
||||
|
||||
/* use alg to write data from NAND chip to work area */
|
||||
|
||||
@@ -718,7 +718,7 @@ static int stm32lx_read_id_code(struct target *target, uint32_t *id)
|
||||
{
|
||||
struct armv7m_common *armv7m = target_to_armv7m(target);
|
||||
int retval;
|
||||
if (armv7m->arm.is_armv6m == true)
|
||||
if (armv7m->arm.arch == ARM_ARCH_V6M)
|
||||
retval = target_read_u32(target, DBGMCU_IDCODE_L0, id);
|
||||
else
|
||||
/* read stm32 device id register */
|
||||
|
||||
Reference in New Issue
Block a user