From 7743e0fb4390d09c315ce9c6edbb2c3ba6b8c2d9 Mon Sep 17 00:00:00 2001 From: Simon Qian Date: Sat, 17 Mar 2012 15:21:59 +0800 Subject: topic: add reset functions for SWD Add swd_init_reset and swd_add_reset. Add adapter_assert_reset and adapter_deassert_reset, and call them instead of JTAG reset functions. Change-Id: Ib2551c6fbb45513e0ae0dc331cfe3ee3f922298a Signed-off-by: Simon Qian Reviewed-on: http://openocd.zylin.com/526 Tested-by: jenkins Reviewed-by: Freddie Chopin Reviewed-by: Spencer Oliver --- src/flash/nor/stellaris.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/flash') diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 0c4169c..96a15d4 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -29,6 +29,7 @@ #include "config.h" #endif +#include "jtag/interface.h" #include "imp.h" #include #include @@ -1330,7 +1331,7 @@ COMMAND_HANDLER(stellaris_handle_recover_command) LOG_ERROR("Can't recover Stellaris flash without SRST"); return ERROR_FAIL; } - jtag_add_reset(0, 1); + adapter_assert_reset(); for (int i = 0; i < 5; i++) { retval = dap_to_swd(bank->target); @@ -1343,7 +1344,7 @@ COMMAND_HANDLER(stellaris_handle_recover_command) } /* de-assert SRST */ - jtag_add_reset(0, 0); + adapter_deassert_reset(); retval = jtag_execute_queue(); /* wait 400+ msec ... OK, "1+ second" is simpler */ -- cgit v1.1