]> git.sur5r.net Git - openocd/blobdiff - src/target/mips_m4k.c
mips_m4k: add optional reset handler
[openocd] / src / target / mips_m4k.c
index 78718ca16650ef81858f0b35aed8de1c466e5e9c..20c707bb62afc9e1b506afa9f0a6243c8dbea1fa 100644 (file)
@@ -344,6 +344,8 @@ static int mips_m4k_assert_reset(struct target *target)
                        jtag_add_reset(1, 1);
                else if (!srst_asserted)
                        jtag_add_reset(0, 1);
+       } else if (target_has_event_action(target, TARGET_EVENT_RESET_ASSERT)) {
+               target_handle_event(target, TARGET_EVENT_RESET_ASSERT);
        } else {
                if (mips_m4k->is_pic32mx) {
                        LOG_DEBUG("Using MTAP reset to reset processor...");