summaryrefslogtreecommitdiff
path: root/arch/openrisc/cpu/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/openrisc/cpu/cpu.c')
-rw-r--r--arch/openrisc/cpu/cpu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/openrisc/cpu/cpu.c b/arch/openrisc/cpu/cpu.c
index 25cd624..73ecc6f 100644
--- a/arch/openrisc/cpu/cpu.c
+++ b/arch/openrisc/cpu/cpu.c
@@ -151,7 +151,11 @@ extern void __reset(void);
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
disable_interrupts();
- __reset();
+ /* Code the jump to __reset here as the compiler is prone to
+ emitting a bad jump instruction if the function is in flash */
+ __asm__("l.movhi r1,hi(__reset); \
+ l.ori r1,r1,lo(__reset); \
+ l.jr r1");
/* not reached, __reset does not return */
return 0;
}