X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fjtag%2Fhla%2Fhla_interface.c;h=5056741e15010b25459977d7bc63f959d661f5d5;hp=b50cb9c0fd31767b6efba334856c49c7fba97e29;hb=0f24549ce95e682f1e04b3358b13ea8b7f80c074;hpb=9daec098a9011171335f0a60536593dcceb9ce5b diff --git a/src/jtag/hla/hla_interface.c b/src/jtag/hla/hla_interface.c index b50cb9c0fd..5056741e15 100644 --- a/src/jtag/hla/hla_interface.c +++ b/src/jtag/hla/hla_interface.c @@ -127,6 +127,11 @@ static int hl_interface_quit(void) return ERROR_OK; } +static int hl_interface_reset(int req_trst, int req_srst) +{ + return hl_if.layout->api->assert_srst(hl_if.handle, req_srst ? 0 : 1); +} + static int hl_interface_execute_queue(void) { LOG_DEBUG("hl_interface_execute_queue: ignored"); @@ -136,33 +141,17 @@ static int hl_interface_execute_queue(void) int hl_interface_init_reset(void) { - /* incase the adapter has not already handled asserting srst + /* in case the adapter has not already handled asserting srst * we will attempt it again */ if (hl_if.param.connect_under_reset) { - jtag_add_reset(0, 1); - hl_if.layout->api->assert_srst(hl_if.handle, 0); + adapter_assert_reset(); } else { - jtag_add_reset(0, 0); + adapter_deassert_reset(); } return ERROR_OK; } -/* FIXME: hla abuses of jtag_add_reset() to track srst status and for timings */ -int hl_interface_reset(int srst) -{ - int result; - - if (srst == 1) { - jtag_add_reset(0, 1); - result = hl_if.layout->api->assert_srst(hl_if.handle, 0); - } else { - result = hl_if.layout->api->assert_srst(hl_if.handle, 1); - jtag_add_reset(0, 0); - } - return result; -} - static int hl_interface_khz(int khz, int *jtag_speed) { if (hl_if.layout->api->speed == NULL) @@ -371,6 +360,7 @@ struct jtag_interface hl_interface = { .transports = hl_transports, .init = hl_interface_init, .quit = hl_interface_quit, + .reset = hl_interface_reset, .execute_queue = hl_interface_execute_queue, .speed = &hl_interface_speed, .khz = &hl_interface_khz,