From 9e02c99d7b2eba0988ab17a9af8b95b5fe065c5e Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Fri, 2 Aug 2013 12:14:37 +0100 Subject: [PATCH] target: remove unimplemented soft_reset_halt implementations Let the default handler issue an unsupported warning rather than using empty handler routines that may/may not issue a unsupported warning. Change-Id: Iafe3e45146981a4cfae39771c3ab7370ac86da48 Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/1535 Tested-by: jenkins Reviewed-by: Andreas Fritiofson Reviewed-by: Hsiangkai Wang --- src/target/arm11.c | 8 -------- src/target/avr32_ap7k.c | 10 ---------- src/target/avrt.c | 8 -------- src/target/cortex_a.c | 2 -- src/target/dsp563xx.c | 7 ------- src/target/hla_target.c | 7 ------- src/target/mips_m4k.c | 7 ------- src/target/xscale.c | 1 - 8 files changed, 50 deletions(-) diff --git a/src/target/arm11.c b/src/target/arm11.c index 1ff62349..416471d8 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -771,13 +771,6 @@ static int arm11_deassert_reset(struct target *target) return ERROR_OK; } -static int arm11_soft_reset_halt(struct target *target) -{ - LOG_WARNING("Not implemented: %s", __func__); - - return ERROR_FAIL; -} - /* target memory access * size: 1 = byte (8bit), 2 = half-word (16bit), 4 = word (32bit) * count: number of items of @@ -1348,7 +1341,6 @@ struct target_type arm11_target = { .assert_reset = arm11_assert_reset, .deassert_reset = arm11_deassert_reset, - .soft_reset_halt = arm11_soft_reset_halt, .get_gdb_reg_list = arm_get_gdb_reg_list, diff --git a/src/target/avr32_ap7k.c b/src/target/avr32_ap7k.c index 7c97234d..1e9fcbfc 100644 --- a/src/target/avr32_ap7k.c +++ b/src/target/avr32_ap7k.c @@ -313,13 +313,6 @@ static int avr32_ap7k_deassert_reset(struct target *target) return ERROR_OK; } -static int avr32_ap7k_soft_reset_halt(struct target *target) -{ - LOG_ERROR("%s: implement me", __func__); - - return ERROR_OK; -} - static int avr32_ap7k_resume(struct target *target, int current, uint32_t address, int handle_breakpoints, int debug_execution) { @@ -600,8 +593,6 @@ int avr32_ap7k_get_gdb_reg_list(struct target *target, struct reg **reg_list[], return ERROR_FAIL; } - - struct target_type avr32_ap7k_target = { .name = "avr32_ap7k", @@ -616,7 +607,6 @@ struct target_type avr32_ap7k_target = { .assert_reset = avr32_ap7k_assert_reset, .deassert_reset = avr32_ap7k_deassert_reset, - .soft_reset_halt = avr32_ap7k_soft_reset_halt, .get_gdb_reg_list = avr32_ap7k_get_gdb_reg_list, diff --git a/src/target/avrt.c b/src/target/avrt.c index 4f959e3c..48727082 100644 --- a/src/target/avrt.c +++ b/src/target/avrt.c @@ -42,7 +42,6 @@ static int avr_step(struct target *target, int current, uint32_t address, static int avr_assert_reset(struct target *target); static int avr_deassert_reset(struct target *target); -static int avr_soft_reset_halt(struct target *target); /* IR and DR functions */ static int mcu_write_ir(struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti); @@ -64,7 +63,6 @@ struct target_type avr_target = { .assert_reset = avr_assert_reset, .deassert_reset = avr_deassert_reset, - .soft_reset_halt = avr_soft_reset_halt, /* .get_gdb_reg_list = avr_get_gdb_reg_list, @@ -151,12 +149,6 @@ static int avr_deassert_reset(struct target *target) return ERROR_OK; } -static int avr_soft_reset_halt(struct target *target) -{ - LOG_DEBUG("%s", __func__); - return ERROR_OK; -} - int avr_jtag_senddat(struct jtag_tap *tap, uint32_t* dr_in, uint32_t dr_out, int len) { diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 96915807..c91da3bc 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -2772,7 +2772,6 @@ struct target_type cortexa8_target = { .assert_reset = cortex_a8_assert_reset, .deassert_reset = cortex_a8_deassert_reset, - .soft_reset_halt = NULL, /* REVISIT allow exporting VFP3 registers ... */ .get_gdb_reg_list = arm_get_gdb_reg_list, @@ -2852,7 +2851,6 @@ struct target_type cortexr4_target = { .assert_reset = cortex_a8_assert_reset, .deassert_reset = cortex_a8_deassert_reset, - .soft_reset_halt = NULL, /* REVISIT allow exporting VFP3 registers ... */ .get_gdb_reg_list = arm_get_gdb_reg_list, diff --git a/src/target/dsp563xx.c b/src/target/dsp563xx.c index 8c470168..813975b6 100644 --- a/src/target/dsp563xx.c +++ b/src/target/dsp563xx.c @@ -1373,12 +1373,6 @@ static int dsp563xx_deassert_reset(struct target *target) return ERROR_OK; } -static int dsp563xx_soft_reset_halt(struct target *target) -{ - LOG_DEBUG("%s", __func__); - return ERROR_OK; -} - static int dsp563xx_run_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, @@ -2328,7 +2322,6 @@ struct target_type dsp563xx_target = { .assert_reset = dsp563xx_assert_reset, .deassert_reset = dsp563xx_deassert_reset, - .soft_reset_halt = dsp563xx_soft_reset_halt, .read_memory = dsp563xx_read_memory_default, .write_memory = dsp563xx_write_memory_default, diff --git a/src/target/hla_target.c b/src/target/hla_target.c index 5d31c7a2..41fe45e6 100644 --- a/src/target/hla_target.c +++ b/src/target/hla_target.c @@ -586,12 +586,6 @@ static int adapter_deassert_reset(struct target *target) return target->reset_halt ? ERROR_OK : target_resume(target, 1, 0, 0, 0); } -static int adapter_soft_reset_halt(struct target *target) -{ - LOG_DEBUG("%s", __func__); - return ERROR_OK; -} - static int adapter_halt(struct target *target) { int res; @@ -890,7 +884,6 @@ struct target_type hla_target = { .target_request_data = hl_target_request_data, .assert_reset = adapter_assert_reset, .deassert_reset = adapter_deassert_reset, - .soft_reset_halt = adapter_soft_reset_halt, .halt = adapter_halt, .resume = adapter_resume, diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index 49edad18..1cded6b4 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -370,12 +370,6 @@ static int mips_m4k_deassert_reset(struct target *target) return ERROR_OK; } -static int mips_m4k_soft_reset_halt(struct target *target) -{ - /* TODO */ - return ERROR_OK; -} - static int mips_m4k_single_step_core(struct target *target) { struct mips32_common *mips32 = target_to_mips32(target); @@ -1398,7 +1392,6 @@ struct target_type mips_m4k_target = { .assert_reset = mips_m4k_assert_reset, .deassert_reset = mips_m4k_deassert_reset, - .soft_reset_halt = mips_m4k_soft_reset_halt, .get_gdb_reg_list = mips32_get_gdb_reg_list, diff --git a/src/target/xscale.c b/src/target/xscale.c index ed2afa46..120988ca 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -3721,7 +3721,6 @@ struct target_type xscale_target = { .assert_reset = xscale_assert_reset, .deassert_reset = xscale_deassert_reset, - .soft_reset_halt = NULL, /* REVISIT on some cores, allow exporting iwmmxt registers ... */ .get_gdb_reg_list = arm_get_gdb_reg_list, -- 2.39.5