summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/pcm038/lowlevel.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards/pcm038/lowlevel.c')
-rw-r--r--arch/arm/boards/pcm038/lowlevel.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/arch/arm/boards/pcm038/lowlevel.c b/arch/arm/boards/pcm038/lowlevel.c
index 2f93c3127a..4515107741 100644
--- a/arch/arm/boards/pcm038/lowlevel.c
+++ b/arch/arm/boards/pcm038/lowlevel.c
@@ -31,27 +31,13 @@
#include "pll.h"
-#ifdef CONFIG_NAND_IMX_BOOT
-static void __bare_init __naked insdram(void)
-{
- /* setup a stack to be able to call imx_nand_load_image() */
- arm_setup_stack(STACK_BASE + STACK_SIZE - 12);
-
- imx_nand_load_image(_text, barebox_image_size);
-
- board_init_lowlevel_return();
-}
-#endif
-
#define ESDCTL0_VAL (ESDCTL0_SDE | ESDCTL0_ROW13 | ESDCTL0_COL10)
void __bare_init __naked reset(void)
{
uint32_t r;
int i;
-#ifdef CONFIG_NAND_IMX_BOOT
- unsigned int *trg, *src;
-#endif
+
common_reset();
/* ahb lite ip interface */
@@ -108,23 +94,11 @@ void __bare_init __naked reset(void)
MX27_ESDCTL_BASE_ADDR + IMX_ESDCTL0);
#ifdef CONFIG_NAND_IMX_BOOT
- /* skip NAND boot if not running from NFC space */
- r = get_pc();
- if (r < MX27_NFC_BASE_ADDR || r > MX27_NFC_BASE_ADDR + 0x800)
- board_init_lowlevel_return();
-
- src = (unsigned int *)MX27_NFC_BASE_ADDR;
- trg = (unsigned int *)_text;
-
- /* Move ourselves out of NFC SRAM */
- for (i = 0; i < 0x800 / sizeof(int); i++)
- *trg++ = *src++;
+ /* setup a stack to be able to call mx27_barebox_boot_nand_external() */
+ arm_setup_stack(STACK_BASE + STACK_SIZE - 12);
- /* Jump to SDRAM */
- r = (unsigned int)&insdram;
- __asm__ __volatile__("mov pc, %0" : : "r"(r));
+ imx27_barebox_boot_nand_external();
#else
board_init_lowlevel_return();
#endif
}
-