blob: 0eefd39a51985247727bbcd579fb24c557a6c03a [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Philipp Tomsich83ad7022017-06-22 23:38:36 +02002/*
3 * Copyright (C) 2017 Theobroma Systems Design und Consulting GmH
Philipp Tomsich83ad7022017-06-22 23:38:36 +02004 */
5
Tom Riniabb9a042024-05-18 20:20:43 -06006#include <common.h>
Philipp Tomsich83ad7022017-06-22 23:38:36 +02007#include <spl.h>
8
Peng Fanaa050c52019-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 Tomsich83ad7022017-06-22 23:38:36 +020011{
Peng Fanaa050c52019-08-07 06:40:53 +000012 return 0;
Philipp Tomsich83ad7022017-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 Fanaa050c52019-08-07 06:40:53 +000024 return board_return_to_bootrom(spl_image, bootdev);
Philipp Tomsich83ad7022017-06-22 23:38:36 +020025}
26
27SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom);