summaryrefslogtreecommitdiff
path: root/src/target/arm920t.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/arm920t.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/arm920t.c')
-rw-r--r--src/target/arm920t.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index fe9bba7e..9c11d124 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -318,7 +318,7 @@ int arm920t_write_cp15_interpreted(struct target *target,
}
// EXPORTED to FA256
-uint32_t arm920t_get_ttb(struct target *target)
+int arm920t_get_ttb(struct target *target, uint32_t *result)
{
int retval;
uint32_t ttb = 0x0;
@@ -328,7 +328,8 @@ uint32_t arm920t_get_ttb(struct target *target)
0xeebf0f51, 0x0, &ttb)) != ERROR_OK)
return retval;
- return ttb;
+ *result = ttb;
+ return ERROR_OK;
}
// EXPORTED to FA256