target/arm: optimize architecture flags
[fw/openocd] / src / flash / nor / stm32lx.c
index 1ea1b1d0e9dc4e4178e9334cc76aa61e36f34661..5ca424b873407933e215fc3544bc157993c8e6aa 100644 (file)
@@ -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 */