diff mbox

[U-Boot,v3,05/66] rockchip: back-to-bootrom: simplify the #ifdef-check for LIBGENERIC in TPL/SPL

Message ID 1501269764-13969-6-git-send-email-philipp.tomsich@theobroma-systems.com
State Superseded
Delegated to: Philipp Tomsich
Headers show

Commit Message

Philipp Tomsich July 28, 2017, 7:21 p.m. UTC
With the finer-grained control over LIBGENERIC_SUPPORT for TPL/SPL (i.e.
with the newly introduced distinction between TPL_LIBGENERIC_SUPPORT and
SPL_LIBGENERIC_SUPPORT), we can simplify the #ifdef-check to simply use
CONFIG_IS_ENABELD.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
---

Changes in v3: None
Changes in v2: None

 arch/arm/mach-rockchip/bootrom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andyshrk Aug. 1, 2017, 7:30 a.m. UTC | #1
Hi Philipp:

2017-07-29 3:21 GMT+08:00 Philipp Tomsich <
philipp.tomsich@theobroma-systems.com>:

> With the finer-grained control over LIBGENERIC_SUPPORT for TPL/SPL (i.e.
> with the newly introduced distinction between TPL_LIBGENERIC_SUPPORT and
> SPL_LIBGENERIC_SUPPORT), we can simplify the #ifdef-check to simply use
> CONFIG_IS_ENABELD.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  arch/arm/mach-rockchip/bootrom.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/
> bootrom.c
> index 4ca9962..4d38ed6 100644
> --- a/arch/arm/mach-rockchip/bootrom.c
> +++ b/arch/arm/mach-rockchip/bootrom.c
> @@ -9,8 +9,8 @@
>
>  void back_to_bootrom(void)
>  {
> -#if defined(CONFIG_SPL_LIBCOMMON_SUPPORT) && !defined(CONFIG_TPL_BUILD)
> -       puts("Returning to boot ROM...");
> +#if CONFIG_IS_ENABLED(LIBGENERIC_SUPPORT)
> +       printf("Returning to boot ROM...\n");
>



We need to use puts here, or the code size will increase too much for sram
limited platform, like RK3036





>  #endif
>         _back_to_bootrom_s();
>  }
> --
> 2.1.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
diff mbox

Patch

diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c
index 4ca9962..4d38ed6 100644
--- a/arch/arm/mach-rockchip/bootrom.c
+++ b/arch/arm/mach-rockchip/bootrom.c
@@ -9,8 +9,8 @@ 
 
 void back_to_bootrom(void)
 {
-#if defined(CONFIG_SPL_LIBCOMMON_SUPPORT) && !defined(CONFIG_TPL_BUILD)
-	puts("Returning to boot ROM...");
+#if CONFIG_IS_ENABLED(LIBGENERIC_SUPPORT)
+	printf("Returning to boot ROM...\n");
 #endif
 	_back_to_bootrom_s();
 }