summaryrefslogtreecommitdiff
path: root/src/target/cortex_a8.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-12-02 22:57:07 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-02 23:08:42 -0800
commitc2af99d4717837761b6df750e1fe75797c910b23 (patch)
treedcf33581014c399865334358a1e1f424a5d0d37a /src/target/cortex_a8.c
parentb123fd3cd9a11b2dfb79025fb137696135f5f898 (diff)
downloadopenocd+libswd-c2af99d4717837761b6df750e1fe75797c910b23.tar.gz
openocd+libswd-c2af99d4717837761b6df750e1fe75797c910b23.tar.bz2
openocd+libswd-c2af99d4717837761b6df750e1fe75797c910b23.tar.xz
openocd+libswd-c2af99d4717837761b6df750e1fe75797c910b23.zip
ARM DPM: tweak initialization
Move the initial breakpoint/watchpoint disable calls to arm_dpm_initialize(), and start using that routine. This split helps with arm11 support.
Diffstat (limited to 'src/target/cortex_a8.c')
-rw-r--r--src/target/cortex_a8.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c
index 5f2de765..9ca072e0 100644
--- a/src/target/cortex_a8.c
+++ b/src/target/cortex_a8.c
@@ -523,6 +523,7 @@ static int cortex_a8_bpwp_disable(struct arm_dpm *dpm, unsigned index)
static int cortex_a8_dpm_setup(struct cortex_a8_common *a8, uint32_t didr)
{
struct arm_dpm *dpm = &a8->armv7a_common.dpm;
+ int retval;
dpm->arm = &a8->armv7a_common.armv4_5_common;
dpm->didr = didr;
@@ -540,7 +541,11 @@ static int cortex_a8_dpm_setup(struct cortex_a8_common *a8, uint32_t didr)
dpm->bpwp_enable = cortex_a8_bpwp_enable;
dpm->bpwp_disable = cortex_a8_bpwp_disable;
- return arm_dpm_setup(dpm);
+ retval = arm_dpm_setup(dpm);
+ if (retval == ERROR_OK)
+ retval = arm_dpm_initialize(dpm);
+
+ return retval;
}