I'm tinkering with arm11 code and I'm wondering whether or not
we'll need to allow srst to be asserted alone even
if srst pulls trst flag is set...

Reading documentation on arm11 about reset types doesn't make
me any less confused. It seems like "power on reset" is not accessible
via srst, trst or the debug registers and that the "power on reset"
can reset stuff that can't be reset otherwise.

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 564b93f..edd74cb 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -645,12 +645,6 @@ void jtag_add_reset(int req_tlr_or_trst, int req_srst)
                        jtag_set_error(ERROR_FAIL);
                        return;
                }
-               if ((jtag_reset_config & RESET_SRST_PULLS_TRST) != 0
-                               && !req_tlr_or_trst) {
-                       LOG_ERROR("BUG: can't assert only SRST");
-                       jtag_set_error(ERROR_FAIL);
-                       return;
-               }
                new_srst = 1;
        }
 
@@ -693,6 +687,15 @@ void jtag_add_reset(int req_tlr_or_trst, int req_srst)
                if (jtag_srst)
                {
                        LOG_DEBUG("SRST line asserted");
+
+                       if ((jtag_reset_config & RESET_SRST_PULLS_TRST) != 0)
+                       {
+                               /* pulls trst is misleading. Really all we 
assume
+                                * here is that the TAP is set to the reset 
state.
+                                */
+                               tap_set_state(TAP_RESET);
+                       }
+
                        if (jtag_nsrst_assert_width)
                                jtag_add_sleep(jtag_nsrst_assert_width * 1000);
                }
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to