spl_xip.c 848 B

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