]> git.ipfire.org Git - thirdparty/u-boot.git/blame - common/spl/spl_xip.c
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
[thirdparty/u-boot.git] / common / spl / spl_xip.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
c6d9e9db 2/*
3bc599c9
PC
3 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
4 * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
c6d9e9db
VM
5 */
6
d678a59d 7#include <common.h>
4d72caa5 8#include <image.h>
f7ae49fc 9#include <log.h>
c6d9e9db
VM
10#include <spl.h>
11
12static int spl_xip(struct spl_image_info *spl_image,
13 struct spl_boot_device *bootdev)
14{
7115007c 15#if CONFIG_IS_ENABLED(OS_BOOT)
c6d9e9db 16 if (!spl_start_uboot()) {
9cbdc3a0 17 spl_image->arg = (void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR;
c6d9e9db
VM
18 spl_image->name = "Linux";
19 spl_image->os = IH_OS_LINUX;
20 spl_image->load_addr = CONFIG_SYS_LOAD_ADDR;
21 spl_image->entry_point = CONFIG_SYS_LOAD_ADDR;
22 debug("spl: payload xipImage, load addr: 0x%lx\n",
23 spl_image->load_addr);
24 return 0;
25 }
26#endif
2e0429bc 27 return(spl_parse_image_header(spl_image, bootdev,
65cc0e2a 28 (const struct legacy_img_hdr *)CFG_SYS_UBOOT_BASE));
c6d9e9db
VM
29}
30SPL_LOAD_IMAGE_METHOD("XIP", 0, BOOT_DEVICE_XIP, spl_xip);