summaryrefslogtreecommitdiff
path: root/src/target/arm926ejs.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-07-19 08:45:45 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-07-19 22:13:48 +0200
commit70fee9207b5fd1c6f499b790591446adc4d4467c (patch)
tree441eee8f9af2ed37eaf072d22465246037f99d15 /src/target/arm926ejs.c
parent612184176fee6333e5372c4637e3cf54628ee416 (diff)
downloadopenocd+libswd-70fee9207b5fd1c6f499b790591446adc4d4467c.tar.gz
openocd+libswd-70fee9207b5fd1c6f499b790591446adc4d4467c.tar.bz2
openocd+libswd-70fee9207b5fd1c6f499b790591446adc4d4467c.tar.xz
openocd+libswd-70fee9207b5fd1c6f499b790591446adc4d4467c.zip
arm: add error propagation to generic get_ttb fn
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/arm926ejs.c')
-rw-r--r--src/target/arm926ejs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index d68e5ca3..0cf71735 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -323,7 +323,7 @@ static int arm926ejs_examine_debug_reason(struct target *target)
return ERROR_OK;
}
-static uint32_t arm926ejs_get_ttb(struct target *target)
+static int arm926ejs_get_ttb(struct target *target, uint32_t *result)
{
struct arm926ejs_common *arm926ejs = target_to_arm926(target);
int retval;
@@ -332,7 +332,9 @@ static uint32_t arm926ejs_get_ttb(struct target *target)
if ((retval = arm926ejs->read_cp15(target, 0, 0, 2, 0, &ttb)) != ERROR_OK)
return retval;
- return ttb;
+ *result = ttb;
+
+ return ERROR_OK;
}
static void arm926ejs_disable_mmu_caches(struct target *target, int mmu,