public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] rockchip: Print a message when returning to the bootrom
Date: Thu, 06 Apr 2017 20:17:26 +0200	[thread overview]
Message-ID: <2870718.fWNQSILKz5@phil> (raw)
In-Reply-To: <20170405020240.16301-1-sjg@chromium.org>

Am Dienstag, 4. April 2017, 20:02:40 CEST schrieb Simon Glass:
> At present if the return to bootrom fails (e.g. because you are not using
> the Rockchip's bootrom's pointer table in MMC) then the board prints
> SPL message and hangs. Print a message first if we can, to help in
> understanding what happened when it hangs.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  arch/arm/include/asm/arch-rockchip/bootrom.h |  9 +++++++--
>  arch/arm/mach-rockchip/Makefile              |  2 ++
>  arch/arm/mach-rockchip/bootrom.c             | 16 ++++++++++++++++
>  arch/arm/mach-rockchip/save_boot_param.S     |  6 +++---
>  configs/firefly-rk3288_defconfig             |  2 +-
>  5 files changed, 29 insertions(+), 6 deletions(-)
>  create mode 100644 arch/arm/mach-rockchip/bootrom.c
> 
> diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h b/arch/arm/include/asm/arch-rockchip/bootrom.h
> index 79fb1a07ac..92eb8783a3 100644
> --- a/arch/arm/include/asm/arch-rockchip/bootrom.h
> +++ b/arch/arm/include/asm/arch-rockchip/bootrom.h
> @@ -13,10 +13,15 @@
>   */
>  extern u32 SAVE_SP_ADDR;
>  
> -/*
> +/**
>   * Hand control back to the bootrom to load another
>   * boot stage.
>   */
> -extern void back_to_bootrom(void);
> +void back_to_bootrom(void);
> +
> +/**
> + * Assembler component for the above (do not call this directly)
> + */
> +void _back_to_bootrom_s(void);
>  
>  #endif
> diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
> index 6b251c7e7e..5caecfb2c0 100644
> --- a/arch/arm/mach-rockchip/Makefile
> +++ b/arch/arm/mach-rockchip/Makefile
> @@ -4,6 +4,8 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> +obj-y += bootrom.o
> +
>  ifdef CONFIG_TPL_BUILD
>  obj-$(CONFIG_ROCKCHIP_RK3188) += rk3188-board-tpl.o
>  obj-$(CONFIG_ROCKCHIP_BROM_HELPER) += save_boot_param.o
> diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c
> new file mode 100644
> index 0000000000..65f058460e
> --- /dev/null
> +++ b/arch/arm/mach-rockchip/bootrom.c
> @@ -0,0 +1,16 @@
> +/**
> + * Copyright (c) 2017 Google, Inc
> + *
> + * SPDX-License-Identifier:	GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <asm/arch/bootrom.h>
> +
> +void back_to_bootrom(void)
> +{
> +#ifdef SPL_LIBGENERIC_SUPPORT

you might want something like
	#if defined(CONFIG_SPL_LIBGENERIC_SUPPORT) && \
	    !defined(CONFIG_TPL_BUILD)
instead. For one to test for the correct option and secondly
we most likely don't want it in any TPL for size reasons.

Apart from that, it does what it is supposed to do, so
Tested-by: Heiko Stuebner <heiko@sntech.de>

And I do like uboot telling a bit more what it is doing on
Rockchip platforms - or which stage it did reach, so also
Acked-by: Heiko Stuebner <heiko@sntech.de>


Heiko

  parent reply	other threads:[~2017-04-06 18:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  2:02 [U-Boot] [PATCH] rockchip: Print a message when returning to the bootrom Simon Glass
2017-04-05  2:04 ` Simon Glass
2017-04-06 18:17 ` Heiko Stuebner [this message]
2017-04-06 19:20 ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2870718.fWNQSILKz5@phil \
    --to=heiko@sntech.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox