diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-12-02 22:57:07 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-12-02 23:08:42 -0800 |
commit | c2af99d4717837761b6df750e1fe75797c910b23 (patch) | |
tree | dcf33581014c399865334358a1e1f424a5d0d37a /src/target/arm_dpm.c | |
parent | b123fd3cd9a11b2dfb79025fb137696135f5f898 (diff) |
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/arm_dpm.c')
-rw-r--r-- | src/target/arm_dpm.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/target/arm_dpm.c b/src/target/arm_dpm.c index 7c09e064..434c63e1 100644 --- a/src/target/arm_dpm.c +++ b/src/target/arm_dpm.c @@ -807,18 +807,6 @@ int arm_dpm_setup(struct arm_dpm *dpm) return ERROR_FAIL; } - /* Disable all breakpoints and watchpoints at startup. */ - if (dpm->bpwp_disable) { - unsigned i; - - for (i = 0; i < dpm->nbp; i++) - (void) dpm->bpwp_disable(dpm, i); - for (i = 0; i < dpm->nwp; i++) - (void) dpm->bpwp_disable(dpm, 16 + i); - } else - LOG_WARNING("%s: can't disable breakpoints and watchpoints", - target_name(target)); - LOG_INFO("%s: hardware has %d breakpoints, %d watchpoints", target_name(target), dpm->nbp, dpm->nwp); @@ -835,6 +823,17 @@ int arm_dpm_setup(struct arm_dpm *dpm) */ int arm_dpm_initialize(struct arm_dpm *dpm) { - /* FIXME -- nothing yet */ + /* Disable all breakpoints and watchpoints at startup. */ + if (dpm->bpwp_disable) { + unsigned i; + + for (i = 0; i < dpm->nbp; i++) + (void) dpm->bpwp_disable(dpm, i); + for (i = 0; i < dpm->nwp; i++) + (void) dpm->bpwp_disable(dpm, 16 + i); + } else + LOG_WARNING("%s: can't disable breakpoints and watchpoints", + target_name(dpm->arm->target)); + return ERROR_OK; } |