diff options
Diffstat (limited to 'arch/arm/boards/pcm037/lowlevel.c')
-rw-r--r-- | arch/arm/boards/pcm037/lowlevel.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/arch/arm/boards/pcm037/lowlevel.c b/arch/arm/boards/pcm037/lowlevel.c index baf63a53b9..da017325fe 100644 --- a/arch/arm/boards/pcm037/lowlevel.c +++ b/arch/arm/boards/pcm037/lowlevel.c @@ -30,28 +30,13 @@ #include <asm/barebox-arm-head.h> #include <mach/esdctl.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; volatile int v; -#ifdef CONFIG_NAND_IMX_BOOT - int i; - unsigned int *trg, *src; -#endif + common_reset(); writel(1 << 6, MX31_IPU_CTRL_BASE_ADDR); @@ -141,21 +126,10 @@ void __bare_init __naked reset(void) #endif #ifdef CONFIG_NAND_IMX_BOOT - /* skip NAND boot if not running from NFC space */ - r = get_pc(); - if (r < MX31_NFC_BASE_ADDR || r > MX31_NFC_BASE_ADDR + 0x800) - board_init_lowlevel_return(); - - src = (unsigned int *)MX31_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 imx31_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)); + imx31_barebox_boot_nand_external(); #else board_init_lowlevel_return(); #endif |