Decreases code size of the nand_spl
[pandora-u-boot.git] / nand_spl / nand_boot_fsl_nfc.c
index ea3566b..d6b0d9b 100644 (file)
 
 #include <common.h>
 #include <nand.h>
-#ifdef CONFIG_MX31
-#include <asm/arch/mx31-regs.h>
-#else
 #include <asm/arch/imx-regs.h>
-#endif
 #include <asm/io.h>
 #include <fsl_nfc.h>
 
@@ -263,6 +259,14 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf)
        return 0;
 }
 
+#if defined(CONFIG_ARM)
+void board_init_f (ulong bootflag)
+{
+       relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
+                      CONFIG_SYS_TEXT_BASE);
+}
+#endif
+
 /*
  * The main entry for NAND booting. It's necessary that SDRAM is already
  * configured and available since this code loads the main U-Boot image