target: Add default implementation of bulk_write_memory

Remove dummy implementations from all targets except arm7_9 and mips, which
are the only ones with real implementations. Replace with a single default
implementation simply calling target_write_memory().

Change-Id: I9228104240bc0b50661be20bc7909713ccda2164
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1213
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Andreas Fritiofson
2013-03-08 01:17:18 +01:00
committed by Spencer Oliver
parent 13288a44be
commit 4315142ea0
9 changed files with 9 additions and 71 deletions

View File

@@ -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;
}