summaryrefslogtreecommitdiff
path: root/src/target/armv4_5.h
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/armv4_5.h
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/armv4_5.h')
-rw-r--r--src/target/armv4_5.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h
index 14dfa99e..83b38b65 100644
--- a/src/target/armv4_5.h
+++ b/src/target/armv4_5.h
@@ -190,6 +190,12 @@ int armv4_5_run_algorithm(struct target *target,
int armv4_5_invalidate_core_regs(struct target *target);
+int arm_checksum_memory(struct target *target,
+ uint32_t address, uint32_t count, uint32_t *checksum);
+int arm_blank_check_memory(struct target *target,
+ uint32_t address, uint32_t count, uint32_t *blank);
+
+
/* ARM mode instructions
*/
@@ -369,7 +375,4 @@ static inline uint32_t mrc_opcode(int cpnum, uint32_t op1, uint32_t op2, uint32_
return t;
}
-
-
-
#endif /* ARMV4_5_H */