/* 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);
	nfc = (void *)NFC_BASE_ADDR;
	if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE,
		       (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) {
		uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;
		uboot();
	} else {
		hang();
	}
}