blob: 6804246d03fd85a8a1dac308c88300cb3feadc4c [file] [log] [blame]
Philipp Tomsich225d30b2017-06-22 23:38:36 +02001/*
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
14static 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
27SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom);