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>
This commit is contained in:
Øyvind Harboe
2010-06-10 16:18:14 +02:00
parent ecc8041c0f
commit 0538081246
7 changed files with 47 additions and 19 deletions

View File

@@ -3226,7 +3226,10 @@ static int xscale_virt2phys(struct target *target,
return ERROR_TARGET_INVALID;
}
uint32_t ret = armv4_5_mmu_translate_va(target, &xscale->armv4_5_mmu, virtual, &type, &cb, &domain, &ap);
uint32_t ret;
int retval = armv4_5_mmu_translate_va(target, &xscale->armv4_5_mmu, virtual, &type, &cb, &domain, &ap, &ret);
if (retval != ERROR_OK)
return retval;
if (type == -1)
{
return ret;