blob: 0eefd39a51985247727bbcd579fb24c557a6c03a [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Philipp Tomsich225d30b2017-06-22 23:38:36 +02002/*
3 * Copyright (C) 2017 Theobroma Systems Design und Consulting GmH
Philipp Tomsich225d30b2017-06-22 23:38:36 +02004 */
5
6#include <common.h>
7#include <spl.h>
8
Peng Fancda789a2019-08-07 06:40:53 +00009__weak int board_return_to_bootrom(struct spl_image_info *spl_image,
10 struct spl_boot_device *bootdev)
Philipp Tomsich225d30b2017-06-22 23:38:36 +020011{
Peng Fancda789a2019-08-07 06:40:53 +000012 return 0;
Philipp Tomsich225d30b2017-06-22 23:38:36 +020013}
14
15static int spl_return_to_bootrom(struct spl_image_info *spl_image,
16 struct spl_boot_device *bootdev)
17{
18 /*
19 * If the board implements a way to return to its ROM (with
20 * the expectation that the next stage of will be booted by
21 * the ROM), it will implement board_return_to_bootrom() and
22 * should not return from it.
23 */
Peng Fancda789a2019-08-07 06:40:53 +000024 return board_return_to_bootrom(spl_image, bootdev);
Philipp Tomsich225d30b2017-06-22 23:38:36 +020025}
26
27SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom);