]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
driver/ifc: define nand_spl_load_image() for SPL
authorPrabhakar Kushwaha <prabhakar@freescale.com>
Tue, 8 Apr 2014 13:42:58 +0000 (19:12 +0530)
committerYork Sun <yorksun@freescale.com>
Wed, 23 Apr 2014 00:58:50 +0000 (17:58 -0700)
nand_spl_load_image() can also be used for non TPL framework.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
drivers/mtd/nand/fsl_ifc_spl.c

index 2f82f7c5c61cc0fef72969408c79e4eec8a863a7..510077282cd15996f099aa47d627c63eb0a1d6ad 100644 (file)
@@ -88,11 +88,7 @@ static inline int bad_block(uchar *marker, int port_size)
                return __raw_readw((u16 *)marker) != 0xffff;
 }
 
                return __raw_readw((u16 *)marker) != 0xffff;
 }
 
-#ifdef CONFIG_TPL_BUILD
 int nand_spl_load_image(uint32_t offs, unsigned int uboot_size, void *vdst)
 int nand_spl_load_image(uint32_t offs, unsigned int uboot_size, void *vdst)
-#else
-static int nand_load(uint32_t offs, unsigned int uboot_size, void *vdst)
-#endif
 {
        struct fsl_ifc *ifc = IFC_BASE_ADDR;
        uchar *buf = (uchar *)CONFIG_SYS_NAND_BASE;
 {
        struct fsl_ifc *ifc = IFC_BASE_ADDR;
        uchar *buf = (uchar *)CONFIG_SYS_NAND_BASE;
@@ -217,15 +213,6 @@ static int nand_load(uint32_t offs, unsigned int uboot_size, void *vdst)
        return 0;
 }
 
        return 0;
 }
 
-/*
- * Defines a static function nand_load_image() here, because non-static makes
- * the code too large for certain SPLs(minimal SPL, maximum size <= 4Kbytes)
- */
-#ifndef CONFIG_TPL_BUILD
-#define nand_spl_load_image(offs, uboot_size, vdst) \
-       nand_load(offs, uboot_size, vdst)
-#endif
-
 /*
  * Main entrypoint for NAND Boot. It's necessary that SDRAM is already
  * configured and available since this code loads the main U-boot image
 /*
  * Main entrypoint for NAND Boot. It's necessary that SDRAM is already
  * configured and available since this code loads the main U-boot image