summaryrefslogtreecommitdiff
path: root/src/target/arm720t.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-06-10 16:18:14 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-06-11 15:53:23 +0200
commit0538081246fafbfb74d554bb1b758412534aa254 (patch)
treec845abc278fa7483617669557d53b034aa17b90f /src/target/arm720t.c
parentecc8041c0f4c30a7310c0f8414a5261ee7a090ca (diff)
downloadopenocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.tar.gz
openocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.tar.bz2
openocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.tar.xz
openocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.zip
arm mmu: error propagation added for address translation
The return value for MMU translation was a mess, either error or value. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/arm720t.c')
-rw-r--r--src/target/arm720t.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index 00933608..867eb942 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -260,7 +260,10 @@ static int arm720_virt2phys(struct target *target,
uint32_t ap;
struct arm720t_common *arm720t = target_to_arm720(target);
- uint32_t ret = armv4_5_mmu_translate_va(target, &arm720t->armv4_5_mmu, virtual, &type, &cb, &domain, &ap);
+ uint32_t ret;
+ int retval = armv4_5_mmu_translate_va(target, &arm720t->armv4_5_mmu, virtual, &type, &cb, &domain, &ap, &ret);
+ if (retval != ERROR_OK)
+ return retval;
if (type == -1)
{
return ret;