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