diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/target/arm11.c | 14 | ||||
-rw-r--r-- | src/target/avr32_ap7k.c | 10 | ||||
-rw-r--r-- | src/target/cortex_a.c | 7 | ||||
-rw-r--r-- | src/target/cortex_m.c | 7 | ||||
-rw-r--r-- | src/target/dsp563xx.c | 10 | ||||
-rw-r--r-- | src/target/dsp5680xx.c | 8 | ||||
-rw-r--r-- | src/target/hla_target.c | 8 | ||||
-rw-r--r-- | src/target/target.c | 9 | ||||
-rw-r--r-- | src/target/xscale.c | 7 |
9 files changed, 9 insertions, 71 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c index bb7b9c6..26e8116 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -1038,18 +1038,6 @@ static int arm11_write_memory(struct target *target, count, buffer, count == 1); } -/* write target memory in multiples of 4 byte, optimized for writing large quantities of data */ -static int arm11_bulk_write_memory(struct target *target, - uint32_t address, uint32_t count, const uint8_t *buffer) -{ - if (target->state != TARGET_HALTED) { - LOG_WARNING("target was not halted"); - return ERROR_TARGET_NOT_HALTED; - } - - return arm11_write_memory(target, address, 4, count, buffer); -} - /* target break-/watchpoint control * rw: 0 = write, 1 = read, 2 = access */ @@ -1366,8 +1354,6 @@ struct target_type arm11_target = { .read_memory = arm11_read_memory, .write_memory = arm11_write_memory, - .bulk_write_memory = arm11_bulk_write_memory, - .checksum_memory = arm_checksum_memory, .blank_check_memory = arm_blank_check_memory, diff --git a/src/target/avr32_ap7k.c b/src/target/avr32_ap7k.c index c8f0f8e..749bf30 100644 --- a/src/target/avr32_ap7k.c +++ b/src/target/avr32_ap7k.c @@ -566,15 +566,6 @@ static int avr32_ap7k_examine(struct target *target) return ERROR_OK; } -static int avr32_ap7k_bulk_write_memory(struct target *target, uint32_t address, - uint32_t count, const uint8_t *buffer) -{ - LOG_ERROR("%s: implement me", __func__); - - return ERROR_OK; -} - - int avr32_ap7k_arch_state(struct target *target) { struct avr32_ap7k_common *ap7k = target_to_ap7k(target); @@ -630,7 +621,6 @@ struct target_type avr32_ap7k_target = { .read_memory = avr32_ap7k_read_memory, .write_memory = avr32_ap7k_write_memory, - .bulk_write_memory = avr32_ap7k_bulk_write_memory, /* .checksum_memory = avr32_ap7k_checksum_memory, */ /* .blank_check_memory = avr32_ap7k_blank_check_memory, */ diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 7721b9b..d9d8049 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -2340,12 +2340,6 @@ static int cortex_a8_write_memory(struct target *target, uint32_t address, return retval; } -static int cortex_a8_bulk_write_memory(struct target *target, uint32_t address, - uint32_t count, const uint8_t *buffer) -{ - return cortex_a8_write_memory(target, address, 4, count, buffer); -} - static int cortex_a8_handle_target_request(void *priv) { struct target *target = priv; @@ -2782,7 +2776,6 @@ struct target_type cortexa8_target = { .read_memory = cortex_a8_read_memory, .write_memory = cortex_a8_write_memory, - .bulk_write_memory = cortex_a8_bulk_write_memory, .checksum_memory = arm_checksum_memory, .blank_check_memory = arm_blank_check_memory, diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 1d645c6..c436bad 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -1664,12 +1664,6 @@ static int cortex_m3_write_memory(struct target *target, uint32_t address, return retval; } -static int cortex_m3_bulk_write_memory(struct target *target, uint32_t address, - uint32_t count, const uint8_t *buffer) -{ - return cortex_m3_write_memory(target, address, 4, count, buffer); -} - static int cortex_m3_init_target(struct command_context *cmd_ctx, struct target *target) { @@ -2285,7 +2279,6 @@ struct target_type cortexm3_target = { .read_memory = cortex_m3_read_memory, .write_memory = cortex_m3_write_memory, - .bulk_write_memory = cortex_m3_bulk_write_memory, .checksum_memory = armv7m_checksum_memory, .blank_check_memory = armv7m_blank_check_memory, diff --git a/src/target/dsp563xx.c b/src/target/dsp563xx.c index 1d703ee..b9c8b4d 100644 --- a/src/target/dsp563xx.c +++ b/src/target/dsp563xx.c @@ -1814,15 +1814,6 @@ static int dsp563xx_write_buffer_default(struct target *target, buffer); } -static int dsp563xx_bulk_write_memory_default(struct target *target, - uint32_t address, - uint32_t count, - const uint8_t *buffer) -{ - return dsp563xx_write_memory(target, - dsp563xx_get_default_memory(), address, 4, count, buffer); -} - static int dsp563xx_add_breakpoint(struct target *target, struct breakpoint *breakpoint) { return ERROR_OK; @@ -2055,7 +2046,6 @@ struct target_type dsp563xx_target = { .read_memory = dsp563xx_read_memory_default, .write_memory = dsp563xx_write_memory_default, - .bulk_write_memory = dsp563xx_bulk_write_memory_default, .read_buffer = dsp563xx_read_buffer_default, .write_buffer = dsp563xx_write_buffer_default, diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c index ae160c4..f82fa63 100644 --- a/src/target/dsp5680xx.c +++ b/src/target/dsp5680xx.c @@ -1470,13 +1470,6 @@ static int dsp5680xx_write(struct target *t, uint32_t a, uint32_t s, uint32_t c, return retval; } -static int dsp5680xx_bulk_write_memory(struct target *t, uint32_t a, - uint32_t al, const uint8_t *b) -{ - LOG_ERROR("Not implemented yet."); - return ERROR_FAIL; -} - static int dsp5680xx_write_buffer(struct target *t, uint32_t a, uint32_t size, const uint8_t *b) { @@ -2300,7 +2293,6 @@ struct target_type dsp5680xx_target = { .read_memory = dsp5680xx_read, .write_memory = dsp5680xx_write, - .bulk_write_memory = dsp5680xx_bulk_write_memory, .checksum_memory = dsp5680xx_checksum_memory, diff --git a/src/target/hla_target.c b/src/target/hla_target.c index 937391b..65e0568 100644 --- a/src/target/hla_target.c +++ b/src/target/hla_target.c @@ -777,13 +777,6 @@ static int adapter_write_memory(struct target *target, uint32_t address, return ERROR_OK; } -static int adapter_bulk_write_memory(struct target *target, - uint32_t address, uint32_t count, - const uint8_t *buffer) -{ - return adapter_write_memory(target, address, 4, count, buffer); -} - static const struct command_registration adapter_command_handlers[] = { { .chain = arm_command_handlers, @@ -815,7 +808,6 @@ struct target_type hla_target = { .read_memory = adapter_read_memory, .write_memory = adapter_write_memory, - .bulk_write_memory = adapter_bulk_write_memory, .checksum_memory = armv7m_checksum_memory, .blank_check_memory = armv7m_blank_check_memory, diff --git a/src/target/target.c b/src/target/target.c index 279fc18..04e375b 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -976,6 +976,12 @@ int target_bulk_write_memory(struct target *target, return target->type->bulk_write_memory(target, address, count, buffer); } +static int target_bulk_write_memory_default(struct target *target, + uint32_t address, uint32_t count, const uint8_t *buffer) +{ + return target_write_memory(target, address, 4, count, buffer); +} + int target_add_breakpoint(struct target *target, struct breakpoint *breakpoint) { @@ -1121,6 +1127,9 @@ static int target_init_one(struct command_context *cmd_ctx, if (target->type->write_buffer == NULL) target->type->write_buffer = target_write_buffer_default; + if (target->type->bulk_write_memory == NULL) + target->type->bulk_write_memory = target_bulk_write_memory_default; + return ERROR_OK; } diff --git a/src/target/xscale.c b/src/target/xscale.c index bec7165..5e9c598 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -1970,12 +1970,6 @@ static int xscale_write_phys_memory(struct target *target, uint32_t address, return ERROR_FAIL; } -static int xscale_bulk_write_memory(struct target *target, uint32_t address, - uint32_t count, const uint8_t *buffer) -{ - return xscale_write_memory(target, address, 4, count, buffer); -} - static int xscale_get_ttb(struct target *target, uint32_t *result) { struct xscale_common *xscale = target_to_xscale(target); @@ -3697,7 +3691,6 @@ struct target_type xscale_target = { .read_phys_memory = xscale_read_phys_memory, .write_memory = xscale_write_memory, .write_phys_memory = xscale_write_phys_memory, - .bulk_write_memory = xscale_bulk_write_memory, .checksum_memory = arm_checksum_memory, .blank_check_memory = arm_blank_check_memory, |