spl_bootrom.c 742 B

123456789101112131415161718192021222324252627
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2017 Theobroma Systems Design und Consulting GmH
  4. */
  5. #include <common.h>
  6. #include <spl.h>
  7. __weak int board_return_to_bootrom(struct spl_image_info *spl_image,
  8. struct spl_boot_device *bootdev)
  9. {
  10. return 0;
  11. }
  12. static int spl_return_to_bootrom(struct spl_image_info *spl_image,
  13. struct spl_boot_device *bootdev)
  14. {
  15. /*
  16. * If the board implements a way to return to its ROM (with
  17. * the expectation that the next stage of will be booted by
  18. * the ROM), it will implement board_return_to_bootrom() and
  19. * should not return from it.
  20. */
  21. return board_return_to_bootrom(spl_image, bootdev);
  22. }
  23. SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom);