aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm920t.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/arm920t.c')
-rw-r--r--src/target/arm920t.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index 41d64733..98bd12f5 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -740,6 +740,17 @@ int arm920t_write_memory(struct target *target, uint32_t address,
return ERROR_OK;
}
+int arm920t_write_memory_opt(struct target *target, uint32_t address,
+ uint32_t size, uint32_t count, const uint8_t *buffer)
+{
+ struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
+
+ if (size == 4 && count > 32 && arm7_9->bulk_write_memory)
+ return arm7_9->bulk_write_memory(target, address, count, buffer);
+ else
+ return arm920t_write_memory(target, address, size, count, buffer);
+}
+
/* EXPORTED to FA256 */
int arm920t_soft_reset_halt(struct target *target)
{
@@ -1697,14 +1708,12 @@ struct target_type arm920t_target = {
.get_gdb_reg_list = arm_get_gdb_reg_list,
.read_memory = arm920t_read_memory,
- .write_memory = arm920t_write_memory,
+ .write_memory = arm920t_write_memory_opt,
.read_phys_memory = arm920t_read_phys_memory,
.write_phys_memory = arm920t_write_phys_memory,
.mmu = arm920_mmu,
.virt2phys = arm920_virt2phys,
- .bulk_write_memory = arm7_9_bulk_write_memory,
-
.checksum_memory = arm_checksum_memory,
.blank_check_memory = arm_blank_check_memory,