3 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
12 * The main entry for NAND booting. It's necessary that SDRAM is already
13 * configured and available since this code loads the main U-Boot image
14 * from NAND into SDRAM and starts it from there.
18 __attribute__((noreturn)) void (*uboot)(void);
21 * Load U-Boot image from NAND into RAM
23 nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
24 CONFIG_SYS_NAND_U_BOOT_SIZE,
25 (void *)CONFIG_SYS_NAND_U_BOOT_DST);
27 #ifdef CONFIG_NAND_ENV_DST
28 nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
29 (void *)CONFIG_NAND_ENV_DST);
31 #ifdef CONFIG_ENV_OFFSET_REDUND
32 nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
33 (void *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
38 * Jump to U-Boot image
40 uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;