[U-Boot] [PATCH V3 08/13] spl: change return values of spl_*_load_image()

Simon Glass sjg at chromium.org
Fri Nov 6 04:16:11 CET 2015


On 3 November 2015 at 05:19, Nikita Kiryanov <nikita at compulab.co.il> wrote:
> 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 at compulab.co.il>
> Cc: Igor Grinberg <grinberg at compulab.co.il>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Ian Campbell <ijc at hellion.org.uk>
> Cc: Hans De Goede <hdegoede at redhat.com>
> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> Cc: Jagan Teki <jteki at openedev.com>
> ---
> Changes in V3:
>         - Added documentation for spl_board_load_image().
>
> Changes in V2:
>         - Minor collateral adjustments from changes in patch 2 (only one return
>           statement at the end of spl_mmc_load_image).
>
>  arch/arm/cpu/armv7/sunxi/board.c |  4 +++-
>  arch/arm/include/asm/spl.h       | 10 ++++++++--
>  common/spl/spl.c                 | 43 +++++++++++++++++++++++++++-------------
>  common/spl/spl_mmc.c             | 26 ++++++++++++++----------
>  common/spl/spl_nand.c            | 18 +++++++++++------
>  common/spl/spl_net.c             |  9 ++++++---
>  common/spl/spl_nor.c             |  6 ++++--
>  common/spl/spl_onenand.c         |  4 +++-
>  common/spl/spl_sata.c            | 11 +++++++---
>  common/spl/spl_usb.c             | 17 ++++++++++------
>  common/spl/spl_ymodem.c          |  5 +++--
>  drivers/mtd/spi/spi_spl_load.c   | 17 +++++++++++-----
>  include/spl.h                    | 18 ++++++++---------
>  13 files changed, 123 insertions(+), 65 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list