]> git.sur5r.net Git - openocd/commitdiff
ADIv5: convert numeric values to use defines with meaningful names
authorEvan Hunter <ehunter@broadcom.com>
Wed, 29 Jul 2015 12:24:51 +0000 (13:24 +0100)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Tue, 29 Dec 2015 20:39:46 +0000 (20:39 +0000)
Change-Id: Idb72750d0aa893119fb405eb27215cba455428a0
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/2891
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Jiri Kastner <cz172638@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/target/adi_v5_jtag.c

index ad6ef3c7a55243a351848f1ac38b1278e0f35e50..78489aab350f5908bc8c8984605e4ccc2ac00c75 100644 (file)
@@ -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 {