From: openocd-gerrit <ope...@us...> - 2023-09-23 14:37:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 5fd4f2954d6673e5b2fd740da681439425794abc (commit) from f49bf1adb42e3ae1b63da5d6e615c6f28b49f42a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5fd4f2954d6673e5b2fd740da681439425794abc Author: Tomas Vanek <va...@fb...> Date: Tue Mar 14 14:31:30 2023 +0100 target/adi_v5_xxx: use ADIV5_DP_SELECT_APBANK and DP_SELECT_DPBANK. Use the defined symbols instead of magic numbers. Change-Id: I19c86b183e57e42b96f76eed180c0492cd67bee1 Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/7539 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 9f66adc68..afdc0e577 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -350,7 +350,7 @@ static int adi_jtag_dp_scan_u32(struct adiv5_dap *dap, { uint8_t out_value_buf[4]; int retval; - uint64_t sel = (reg_addr >> 4) & 0xf; + uint64_t sel = (reg_addr >> 4) & DP_SELECT_DPBANK; /* No need to change SELECT or RDBUFF as they are not banked */ if (instr == JTAG_DP_DPACC && reg_addr != DP_SELECT && reg_addr != DP_RDBUFF && @@ -775,7 +775,7 @@ static int jtag_ap_q_bankselect(struct adiv5_ap *ap, unsigned reg) } /* ADIv5 */ - sel = (ap->ap_num << 24) | (reg & 0x000000F0); + sel = (ap->ap_num << 24) | (reg & ADIV5_DP_SELECT_APBANK); if (sel == dap->select) return ERROR_OK; diff --git a/src/target/adi_v5_swd.c b/src/target/adi_v5_swd.c index 5f40588d2..1b743657c 100644 --- a/src/target/adi_v5_swd.c +++ b/src/target/adi_v5_swd.c @@ -523,7 +523,7 @@ static int swd_queue_ap_bankselect(struct adiv5_ap *ap, unsigned reg) } /* ADIv5 */ - sel = (ap->ap_num << 24) | (reg & 0x000000F0); + sel = (ap->ap_num << 24) | (reg & ADIV5_DP_SELECT_APBANK); if (dap->select != DP_SELECT_INVALID) sel |= dap->select & DP_SELECT_DPBANK; ----------------------------------------------------------------------- Summary of changes: src/target/adi_v5_jtag.c | 4 ++-- src/target/adi_v5_swd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |