xref: /openbmc/u-boot/common/spl/spl_bootrom.c (revision b9553986)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2017 Theobroma Systems Design und Consulting GmH
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);
27