summaryrefslogtreecommitdiff
path: root/src/target/cortex_a8.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-19 19:02:10 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-19 19:02:10 -0800
commit71cde5e359f273585880ea8986709b950ba85b08 (patch)
treeb04f841ddfe6c0900f48b676cbb6c84d12eea7a3 /src/target/cortex_a8.c
parent31fb7788a605fe1c0c405444b5bab51a7e42d481 (diff)
downloadopenocd_libswd-71cde5e359f273585880ea8986709b950ba85b08.tar.gz
openocd_libswd-71cde5e359f273585880ea8986709b950ba85b08.tar.bz2
openocd_libswd-71cde5e359f273585880ea8986709b950ba85b08.tar.xz
openocd_libswd-71cde5e359f273585880ea8986709b950ba85b08.zip
target: create/use register_cache_invalidate()
Create a generic register_cache_invalidate(), and use it to replace three all-but-identical core-specific routines: - armv4_5_invalidate_core_regs() - armv7m_invalidate_core_regs - mips32_invalidate_core_regs() too. Make cache->num_regs be unsigned, avoiding various errors. Net code shrink and simplification. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/cortex_a8.c')
-rw-r--r--src/target/cortex_a8.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c
index c0a74667..d02fee9e 100644
--- a/src/target/cortex_a8.c
+++ b/src/target/cortex_a8.c
@@ -545,7 +545,7 @@ static int cortex_a8_resume(struct target *target, int current,
target->state = TARGET_RUNNING;
/* registers are now invalid */
- armv4_5_invalidate_core_regs(target);
+ register_cache_invalidate(armv4_5->core_cache);
if (!debug_execution)
{
@@ -1182,11 +1182,12 @@ static int cortex_a8_remove_breakpoint(struct target *target, struct breakpoint
static int cortex_a8_assert_reset(struct target *target)
{
+ struct armv7a_common *armv7a = target_to_armv7a(target);
LOG_DEBUG(" ");
/* registers are now invalid */
- armv4_5_invalidate_core_regs(target);
+ register_cache_invalidate(armv7a->armv4_5_common.core_cache);
target->state = TARGET_RESET;