mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
36afd45136
Make spl_*_load_image() functions return a value instead of hanging if a problem is encountered. This enables main spl code to make the decision whether to hang or not, thus preparing it to support alternative boot devices. Some boot devices (namely nand and spi) do not hang on error. Instead, they return normally and SPL proceeds to boot the contents of the load address. This is considered a bug and is rectified by hanging on error for these devices as well. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Hans De Goede <hdegoede@redhat.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Jagan Teki <jteki@openedev.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
50 lines
943 B
C
50 lines
943 B
C
/*
|
|
* (C) Copyright 2012
|
|
* Texas Instruments, <www.ti.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
#ifndef _ASM_SPL_H_
|
|
#define _ASM_SPL_H_
|
|
|
|
#if defined(CONFIG_OMAP) \
|
|
|| defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) \
|
|
|| defined(CONFIG_EXYNOS4210)
|
|
/* Platform-specific defines */
|
|
#include <asm/arch/spl.h>
|
|
|
|
#else
|
|
enum {
|
|
BOOT_DEVICE_RAM,
|
|
BOOT_DEVICE_MMC1,
|
|
BOOT_DEVICE_MMC2,
|
|
BOOT_DEVICE_MMC2_2,
|
|
BOOT_DEVICE_NAND,
|
|
BOOT_DEVICE_ONENAND,
|
|
BOOT_DEVICE_NOR,
|
|
BOOT_DEVICE_UART,
|
|
BOOT_DEVICE_SPI,
|
|
BOOT_DEVICE_SATA,
|
|
BOOT_DEVICE_I2C,
|
|
BOOT_DEVICE_BOARD,
|
|
BOOT_DEVICE_NONE
|
|
};
|
|
#endif
|
|
|
|
/**
|
|
* Board specific load method for boards that have a special way of loading
|
|
* U-Boot, which does not fit with the existing SPL code.
|
|
*
|
|
* @return 0 on success, negative errno value on failure.
|
|
*/
|
|
|
|
int spl_board_load_image(void);
|
|
|
|
/* Linker symbols. */
|
|
extern char __bss_start[], __bss_end[];
|
|
|
|
#ifndef CONFIG_DM
|
|
extern gd_t gdata;
|
|
#endif
|
|
|
|
#endif
|