Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Philipp Tomsich | 225d30b | 2017-06-22 23:38:36 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2017 Theobroma Systems Design und Consulting GmH |
Philipp Tomsich | 225d30b | 2017-06-22 23:38:36 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <spl.h> |
| 8 | |
| 9 | __weak void board_return_to_bootrom(void) |
| 10 | { |
| 11 | } |
| 12 | |
| 13 | static int spl_return_to_bootrom(struct spl_image_info *spl_image, |
| 14 | struct spl_boot_device *bootdev) |
| 15 | { |
| 16 | /* |
| 17 | * If the board implements a way to return to its ROM (with |
| 18 | * the expectation that the next stage of will be booted by |
| 19 | * the ROM), it will implement board_return_to_bootrom() and |
| 20 | * should not return from it. |
| 21 | */ |
| 22 | board_return_to_bootrom(); |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom); |