summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/start-pbl.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-02 14:54:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-04 18:30:58 +0200
commita86824b5ac0a1fe8c9951cf3298eedb8e3505d7e (patch)
tree1b40e7b8d78105779f5cc5f9e4b6e145238563dd /arch/arm/cpu/start-pbl.c
parent93fbc1ce222f8111130e7cd244ec92b1c226991c (diff)
downloadbarebox-a86824b5ac0a1fe8c9951cf3298eedb8e3505d7e.tar.gz
barebox-a86824b5ac0a1fe8c9951cf3298eedb8e3505d7e.tar.xz
ARM pbl: Provide a dummy error function for the decompressor
We can't do anything useful in the error function, so we just hang. This has the advantage that at least when a JTAG debugger is connected we can see what happens. Otherwise the code just jumps to NULL in case of an error. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/start-pbl.c')
-rw-r--r--arch/arm/cpu/start-pbl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index 9327521b88..951735bc67 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -128,6 +128,11 @@ static void mmu_disable(void)
__mmu_cache_off();
}
+void noinline errorfn(char *error)
+{
+ while (1);
+}
+
static void barebox_uncompress(void *compressed_start, unsigned int len)
{
void (*barebox)(void);
@@ -154,7 +159,7 @@ static void barebox_uncompress(void *compressed_start, unsigned int len)
decompress((void *)compressed_start,
len,
NULL, NULL,
- (void *)TEXT_BASE, NULL, NULL);
+ (void *)TEXT_BASE, NULL, errorfn);
if (use_mmu)
mmu_disable();