From c2af99d4717837761b6df750e1fe75797c910b23 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 2 Dec 2009 22:57:07 -0800 Subject: 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. --- src/target/arm_dpm.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/target/arm_dpm.c') 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; } -- cgit v1.2.3