1 // SPDX-License-Identifier: GPL-2.0+
4 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
11 * The main entry for NAND booting. It's necessary that SDRAM is already
12 * configured and available since this code loads the main U-Boot image
13 * from NAND into SDRAM and starts it from there.
17 __attribute__((noreturn)) void (*uboot)(void);
20 * Load U-Boot image from NAND into RAM
22 nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
23 CONFIG_SYS_NAND_U_BOOT_SIZE,
24 (void *)CONFIG_SYS_NAND_U_BOOT_DST);
26 #ifdef CONFIG_NAND_ENV_DST
27 nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
28 (void *)CONFIG_NAND_ENV_DST);
30 #ifdef CONFIG_ENV_OFFSET_REDUND
31 nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
32 (void *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
37 * Jump to U-Boot image
39 uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;