diff options
author | Heiko Schocher <hs@denx.de> | 2014-10-31 08:31:00 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-17 08:47:17 -0500 |
commit | 0c3117b1f740405ae16f267b4d0534906df433ba (patch) | |
tree | 0cd63bedcc0f162894694ea1348886711e4969a6 /common/spl/spl_nand.c | |
parent | bd1bb3c6a7364145fd781aeef56fa661e918f707 (diff) | |
download | u-boot-0c3117b1f740405ae16f267b4d0534906df433ba.tar.gz |
spl, nand: add option to boot raw u-boot.bin image only
enable to boot only a raw u-boot.bin image from nand with the
CONFIG_SPL_NAND_RAW_ONLY define. This option saves space on
boards where spl space is low.
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'common/spl/spl_nand.c')
-rw-r--r-- | common/spl/spl_nand.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 9b200bc4d5..b7801cb460 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -10,6 +10,18 @@ #include <asm/io.h> #include <nand.h> +#if defined(CONFIG_SPL_NAND_RAW_ONLY) +void spl_nand_load_image(void) +{ + nand_init(); + + nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (void *)CONFIG_SYS_NAND_U_BOOT_DST); + spl_set_header_raw_uboot(); + nand_deselect(); +} +#else void spl_nand_load_image(void) { struct image_header *header; @@ -82,3 +94,4 @@ void spl_nand_load_image(void) spl_image.size, (void *)spl_image.load_addr); nand_deselect(); } +#endif |