spl_xip.c 845 B

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