From c0ea4295df22c8f9b7d17472171f77639e19b61d Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 6 Jun 2021 17:20:30 +0200 Subject: [PATCH] target/cortex_m: rename CamelCase symbol Change-Id: I67d803e15ba9fd08f2b31361fb3604275e483605 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/6339 Tested-by: jenkins Reviewed-by: Marc Schink Reviewed-by: Xiang W --- src/jtag/drivers/stlink_usb.c | 2 +- src/target/cortex_m.c | 2 +- src/target/cortex_m.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index 7b1932b9f..5d7ab6af3 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -2286,7 +2286,7 @@ static int stlink_usb_write_reg(void *handle, unsigned int regsel, uint32_t val) if (res != ERROR_OK) return res; - return stlink_usb_write_debug_reg(h, DCB_DCRSR, DCRSR_WnR | (regsel & 0x7f)); + return stlink_usb_write_debug_reg(h, DCB_DCRSR, DCRSR_WNR | (regsel & 0x7f)); /* FIXME: poll DHCSR.S_REGRDY after write DCRSR */ } diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index c30556c8a..bd68fe868 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -169,7 +169,7 @@ static int cortex_m_store_core_reg_u32(struct target *target, if (retval != ERROR_OK) return retval; - retval = mem_ap_write_atomic_u32(armv7m->debug_ap, DCB_DCRSR, regsel | DCRSR_WnR); + retval = mem_ap_write_atomic_u32(armv7m->debug_ap, DCB_DCRSR, regsel | DCRSR_WNR); if (retval != ERROR_OK) return retval; diff --git a/src/target/cortex_m.h b/src/target/cortex_m.h index 453305483..16fc8ab70 100644 --- a/src/target/cortex_m.h +++ b/src/target/cortex_m.h @@ -77,7 +77,7 @@ struct cortex_m_part_info { #define DCB_DEMCR 0xE000EDFC #define DCB_DSCSR 0xE000EE08 -#define DCRSR_WnR BIT(16) +#define DCRSR_WNR BIT(16) #define DWT_CTRL 0xE0001000 #define DWT_CYCCNT 0xE0001004