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