3 * ISEE 2007 SL - Enric Balletbo i Serra <eballetbo@iseebcn.com>
5 * Based on common/spl/spl_nand.c
7 * Corscience GmbH & Co. KG - Simon Schwarz <schwarz@corscience.de>
9 * SPDX-License-Identifier: GPL-2.0+
15 #include <onenand_uboot.h>
17 int spl_onenand_load_image(void)
19 struct image_header *header;
22 debug("spl: onenand\n");
24 /*use CONFIG_SYS_TEXT_BASE as temporary storage area */
25 header = (struct image_header *)(CONFIG_SYS_TEXT_BASE);
27 onenand_spl_load_image(CONFIG_SYS_ONENAND_U_BOOT_OFFS,
28 CONFIG_SYS_ONENAND_PAGE_SIZE, (void *)header);
29 ret = spl_parse_image_header(header);
32 onenand_spl_load_image(CONFIG_SYS_ONENAND_U_BOOT_OFFS,
33 spl_image.size, (void *)spl_image.load_addr);