summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-09-07 21:46:14 +0200
committerWolfgang Denk <wd@denx.de>2010-09-07 21:46:14 +0200
commit6050c754b0f06c7b2c867cb9fd279498bc89c393 (patch)
tree4061d819e846423fdff35483253fbe2dd439763e
parent67bd94148e4a728379f7c748f5e101612a92651a (diff)
parent7a6a7d10e6b96ab4a5c0d8852802ec52be2b582e (diff)
downloadu-boot-imx-6050c754b0f06c7b2c867cb9fd279498bc89c393.zip
u-boot-imx-6050c754b0f06c7b2c867cb9fd279498bc89c393.tar.gz
u-boot-imx-6050c754b0f06c7b2c867cb9fd279498bc89c393.tar.bz2
Merge branch 'next' of git://git.denx.de/u-boot-nios
-rw-r--r--arch/nios2/cpu/cpu.c11
-rw-r--r--arch/nios2/include/asm/system.h5
-rw-r--r--arch/nios2/lib/bootm.c2
3 files changed, 11 insertions, 7 deletions
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 6379534..d9c6544 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -40,11 +40,10 @@ int checkcpu (void)
return (0);
}
-
-int do_reset (void)
+int do_reset(void)
{
- void (*rst)(void) = (void(*)(void))CONFIG_SYS_RESET_ADDR;
- disable_interrupts ();
- rst();
- return(0);
+ disable_interrupts();
+ /* indirect call to go beyond 256MB limitation of toolchain */
+ nios2_callr(CONFIG_SYS_RESET_ADDR);
+ return 0;
}
diff --git a/arch/nios2/include/asm/system.h b/arch/nios2/include/asm/system.h
index bb03ca5..086d92b 100644
--- a/arch/nios2/include/asm/system.h
+++ b/arch/nios2/include/asm/system.h
@@ -56,4 +56,9 @@
((flags & NIOS2_STATUS_PIE_MSK) == 0x0); \
})
+/* indirect call to go beyond 256MB limitation of toolchain */
+#define nios2_callr(addr) __asm__ __volatile__ ( \
+ "callr %0" \
+ : : "r" (addr))
+
#endif /* __ASM_NIOS2_SYSTEM_H */
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index e25a113..40a4d15 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -42,7 +42,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
if (boot_get_fdt(flag, argc, argv, images, &of_flat_tree, &of_size))
return 1;
#endif
- if (!of_flat_tree)
+ if (!of_flat_tree && argc > 3)
of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16);
if (of_flat_tree)
initrd_end = (ulong)of_flat_tree;