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