driver/ifc: define nand_spl_load_image() for SPL
Subsystems (2)
PATCH 5/7 driver/ifc: define nand_spl_load_image() for SPL
nand_spl_load_image() can also be used for non TPL framework.
---
Changes for v2: Sending as it is
drivers/mtd/nand/fsl_ifc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/fsl_ifc_spl.c +2 -2
@@ -88,7 +88,7 @@ static inline int bad_block(uchar *marker, int port_size)return __raw_readw ((u16 *)marker) !=0xffff ; } -#ifdef CONFIG_TPL_BUILD +#if defined(CONFIG_TPL_BUILD ) || defined(CONFIG_SPL_BUILD ) 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)
@@ -221,7 +221,7 @@ static int nand_load(uint32_t offs, unsigned int uboot_size, void *vdst)* 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 +#if !defined(CONFIG_TPL_BUILD ) && !defined(CONFIG_SPL_BUILD )#define nand_spl_load_image (offs, uboot_size, vdst) \ nand_load(offs, uboot_size, vdst)#endif
Signature · 1 line
1.7.9.5
PATCH 5/7 driver/ifc: define nand_spl_load_image() for SPL
Quoted 14 lines · Prabhakar Kushwaha
nand_spl_load_image()can also be used for non TPL framework.Signed-off-by Prabhakar Kushwaha <[email protected]>---
Changes for v2: Sending as it isdrivers/mtd/nand/fsl_ifc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mtd/nand/fsl_ifc_spl.c +0
-0
drivers/mtd/nand/fsl_ifc_spl.c static inline int bad_block(uchar *marker, int port_size) · line 91
Quoted 5 lines
drivers/mtd/nand/fsl_ifc_spl.c +1
-1@@ -88,7 +88,7 @@ static inline int bad_block(uchar *marker, int port_size)return __raw_readw ((u16 *)marker) !=0xffff ; } -#ifdef CONFIG_TPL_BUILD +#if defined(CONFIG_TPL_BUILD ) || defined(CONFIG_SPL_BUILD )
When would you ever be building this file without one of those two set?
drivers/mtd/nand/fsl_ifc_spl.c static inline int bad_block(uchar *marker, int port_size) · line 94
Quoted 3 lines
drivers/mtd/nand/fsl_ifc_spl.c +0
-0int 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)
The reason for exempting SPL was concern that making the function non-static would push some targets over the size limit. Have you successfully built them all, with a variety of compilers?
Perhaps this was only an issue on eLBC.
-Scott