From b8be5de75d021b5e01a6739fc70c793a6603467c Mon Sep 17 00:00:00 2001 From: Evan Hunter Date: Wed, 29 Jul 2015 13:24:51 +0100 Subject: [PATCH] ADIv5: convert numeric values to use defines with meaningful names Change-Id: Idb72750d0aa893119fb405eb27215cba455428a0 Signed-off-by: Evan Hunter Reviewed-on: http://openocd.zylin.com/2891 Tested-by: jenkins Reviewed-by: Matthias Welwarsky Reviewed-by: Jiri Kastner Reviewed-by: Andreas Fritiofson --- src/target/adi_v5_jtag.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index ad6ef3c7..78489aab 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -271,7 +271,8 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap) if (ctrlstat & (SSTICKYORUN | SSTICKYERR)) { LOG_DEBUG("jtag-dp: CTRL/STAT error, 0x%" PRIx32, ctrlstat); /* Check power to debug regions */ - if ((ctrlstat & 0xf0000000) != 0xf0000000) { + if ((ctrlstat & (CDBGPWRUPREQ | CDBGPWRUPACK | CSYSPWRUPREQ | CSYSPWRUPACK)) != + (CDBGPWRUPREQ | CDBGPWRUPACK | CSYSPWRUPREQ | CSYSPWRUPACK)) { LOG_ERROR("Debug regions are unpowered, an unexpected reset might have happened"); return ERROR_JTAG_DEVICE_ERROR; } else { -- 2.39.5