From 27edeb775791a598a1e7997fd74078164e771ca6 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Mon, 17 Oct 2022 12:28:57 +0200 Subject: [PATCH] riscv: drop deprecated command 'riscv set_prefer_sba' Change-Id: I546efe4e1a6b673b26cfb4a74b5c3809fecda49c Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/7271 Tested-by: jenkins Reviewed-by: Jan Matyas --- src/target/riscv/riscv.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 4f24fb41e..dcd25fa08 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -2367,37 +2367,6 @@ COMMAND_HANDLER(riscv_set_reset_timeout_sec) return ERROR_OK; } -COMMAND_HANDLER(riscv_set_prefer_sba) -{ - struct target *target = get_current_target(CMD_CTX); - RISCV_INFO(r); - bool prefer_sba; - LOG_WARNING("`riscv set_prefer_sba` is deprecated. Please use `riscv set_mem_access` instead."); - if (CMD_ARGC != 1) { - LOG_ERROR("Command takes exactly 1 parameter"); - return ERROR_COMMAND_SYNTAX_ERROR; - } - COMMAND_PARSE_ON_OFF(CMD_ARGV[0], prefer_sba); - if (prefer_sba) { - /* Use system bus with highest priority */ - r->mem_access_methods[0] = RISCV_MEM_ACCESS_SYSBUS; - r->mem_access_methods[1] = RISCV_MEM_ACCESS_PROGBUF; - r->mem_access_methods[2] = RISCV_MEM_ACCESS_ABSTRACT; - } else { - /* Use progbuf with highest priority */ - r->mem_access_methods[0] = RISCV_MEM_ACCESS_PROGBUF; - r->mem_access_methods[1] = RISCV_MEM_ACCESS_SYSBUS; - r->mem_access_methods[2] = RISCV_MEM_ACCESS_ABSTRACT; - } - - /* Reset warning flags */ - r->mem_access_progbuf_warn = true; - r->mem_access_sysbus_warn = true; - r->mem_access_abstract_warn = true; - - return ERROR_OK; -} - COMMAND_HANDLER(riscv_set_mem_access) { struct target *target = get_current_target(CMD_CTX); @@ -2948,14 +2917,6 @@ static const struct command_registration riscv_exec_command_handlers[] = { .usage = "[sec]", .help = "Set the wall-clock timeout (in seconds) after reset is deasserted" }, - { - .name = "set_prefer_sba", - .handler = riscv_set_prefer_sba, - .mode = COMMAND_ANY, - .usage = "on|off", - .help = "When on, prefer to use System Bus Access to access memory. " - "When off (default), prefer to use the Program Buffer to access memory." - }, { .name = "set_mem_access", .handler = riscv_set_mem_access,