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 static int spl_onenand_load_image(struct spl_image_info
*spl_image
,
18 struct spl_boot_device
*bootdev
)
20 struct image_header
*header
;
23 debug("spl: onenand\n");
25 /*use CONFIG_SYS_TEXT_BASE as temporary storage area */
26 header
= (struct image_header
*)(CONFIG_SYS_TEXT_BASE
);
28 onenand_spl_load_image(CONFIG_SYS_ONENAND_U_BOOT_OFFS
,
29 CONFIG_SYS_ONENAND_PAGE_SIZE
, (void *)header
);
30 ret
= spl_parse_image_header(spl_image
, header
);
33 onenand_spl_load_image(CONFIG_SYS_ONENAND_U_BOOT_OFFS
,
34 spl_image
->size
, (void *)spl_image
->load_addr
);
38 /* Use priorty 1 so that Ubi can override this */
39 SPL_LOAD_IMAGE_METHOD("OneNAND", 1, BOOT_DEVICE_ONENAND
,
40 spl_onenand_load_image
);