summaryrefslogtreecommitdiff
path: root/src/target/arm7tdmi.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-15 10:35:34 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-15 10:35:34 -0800
commit269040bbad7f18066f5ec5707447c33de6290ef5 (patch)
tree0edee9fc57079e977eb01b13a392963fb70968d9 /src/target/arm7tdmi.c
parent9ac7cdec82c19481b79f2effcefb7106dd7ade41 (diff)
downloadopenocd+libswd-269040bbad7f18066f5ec5707447c33de6290ef5.tar.gz
openocd+libswd-269040bbad7f18066f5ec5707447c33de6290ef5.tar.bz2
openocd+libswd-269040bbad7f18066f5ec5707447c33de6290ef5.tar.xz
openocd+libswd-269040bbad7f18066f5ec5707447c33de6290ef5.zip
ARM: memory utils aren't ARM7/ARM9 dependent
The arm7_9_checksum_memory() and arm7_9_blank_check_memory() routines are not actually specific to the ARM7 and ARM9 core generations ... they can work for any core which can run algorithms using basic ARM (not Thumb) instructions. Rename them; move the declarations to a more generic site; likewise move the code (and tidy it a bit in the process). NOTE: the blank_check() method falsely returned a success status (0) on one error path, when the algorithm failed. Fixed this bug. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/arm7tdmi.c')
-rw-r--r--src/target/arm7tdmi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 8be8a125..51fbddfe 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -737,8 +737,9 @@ struct target_type arm7tdmi_target =
.read_memory = arm7_9_read_memory,
.write_memory = arm7_9_write_memory,
.bulk_write_memory = arm7_9_bulk_write_memory,
- .checksum_memory = arm7_9_checksum_memory,
- .blank_check_memory = arm7_9_blank_check_memory,
+
+ .checksum_memory = arm_checksum_memory,
+ .blank_check_memory = arm_blank_check_memory,
.run_algorithm = armv4_5_run_algorithm,