spl_bootrom.c 654 B

1234567891011121314151617181920212223242526
  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 void board_return_to_bootrom(void)
  8. {
  9. }
  10. static int spl_return_to_bootrom(struct spl_image_info *spl_image,
  11. struct spl_boot_device *bootdev)
  12. {
  13. /*
  14. * If the board implements a way to return to its ROM (with
  15. * the expectation that the next stage of will be booted by
  16. * the ROM), it will implement board_return_to_bootrom() and
  17. * should not return from it.
  18. */
  19. board_return_to_bootrom();
  20. return false;
  21. }
  22. SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom);