blob: 3f6420ba1e9c8feef897479e0b2f4a2d417f14f5 [file] [log] [blame]
Vikas Manocha9e582652017-05-28 12:55:11 -07001/*
Patrice Chotard789ee0e2017-10-23 09:53:58 +02002 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
3 * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
Vikas Manocha9e582652017-05-28 12:55:11 -07004 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9#include <spl.h>
10
11static int spl_xip(struct spl_image_info *spl_image,
12 struct spl_boot_device *bootdev)
13{
14#ifdef CONFIG_SPL_OS_BOOT
15 if (!spl_start_uboot()) {
16 spl_image->arg = (void *)CONFIG_SYS_FDT_BASE;
17 spl_image->name = "Linux";
18 spl_image->os = IH_OS_LINUX;
19 spl_image->load_addr = CONFIG_SYS_LOAD_ADDR;
20 spl_image->entry_point = CONFIG_SYS_LOAD_ADDR;
21 debug("spl: payload xipImage, load addr: 0x%lx\n",
22 spl_image->load_addr);
23 return 0;
24 }
25#endif
26 return(spl_parse_image_header(spl_image, (const struct image_header *)
27 CONFIG_SYS_UBOOT_BASE));
28}
29SPL_LOAD_IMAGE_METHOD("XIP", 0, BOOT_DEVICE_XIP, spl_xip);