/* The main entry for NAND booting. It's necessary that SDRAM is already configured and available since this code loads the main U-Boot image from NAND into SDRAM and starts it from there.  */
void nand_boot(void)
/* The main entry for NAND booting. It's necessary that SDRAM is already configured and available since this code loads the main U-Boot image from NAND into SDRAM and starts it from there.  */
void nand_boot(void)
{
	__attribute__((noreturn)) void (*uboot)(void);
	nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE,
	          (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
	puts("transfering control\n");
	flush_cache(CONFIG_SYS_NAND_U_BOOT_DST, CONFIG_SYS_NAND_U_BOOT_SIZE);
	uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;
	uboot();
}