[U-Boot] [PATCH 1/2] Revert "board_f: Use static print_cpuinfo if CONFIG_CPU is active"

Peng Fan peng.fan at nxp.com
Wed Nov 7 12:08:08 UTC 2018


> -----Original Message-----
> From: Bin Meng [mailto:bmeng.cn at gmail.com]
> Sent: 2018年11月7日 19:51
> To: Tom Rini <trini at konsulko.com>; Simon Glass <sjg at chromium.org>; U-Boot
> Mailing List <u-boot at lists.denx.de>
> Cc: Mario Six <mario.six at gdsys.cc>; Peng Fan <peng.fan at nxp.com>
> Subject: [PATCH 1/2] Revert "board_f: Use static print_cpuinfo if CONFIG_CPU is
> active"
> 
> This reverts commit c0434407b595f785fc7401237896c48c791b45fd.
> 
> It turns out commit c0434407b595 broke some boards which have DM CPU
> driver with CONFIG_DISPLAY_CPUINFO option on. These boards just fail to boot
> when print_cpuinfo() is called during boot.
> 
> Fixes are already sent to ML and in u-boot-dm/next, however since we are
> getting close to the v2018.11 release, it's safer we revert the original commit.
> 
> This commit should be reverted after v2018.11 release.
> 
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>

Acked-by: Peng Fan <peng.fan at nxp.com>

> ---
> 
>  common/board_f.c | 28 ----------------------------
>  include/init.h   |  7 -------
>  2 files changed, 35 deletions(-)
> 
> diff --git a/common/board_f.c b/common/board_f.c index 213d044..afafec5
> 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -11,7 +11,6 @@
> 
>  #include <common.h>
>  #include <console.h>
> -#include <cpu.h>
>  #include <dm.h>
>  #include <environment.h>
>  #include <fdtdec.h>
> @@ -166,33 +165,6 @@ static int print_resetinfo(void)  }  #endif
> 
> -#if defined(CONFIG_DISPLAY_CPUINFO) && CONFIG_IS_ENABLED(CPU) -static
> int print_cpuinfo(void) -{
> -	struct udevice *dev;
> -	char desc[512];
> -	int ret;
> -
> -	ret = uclass_first_device_err(UCLASS_CPU, &dev);
> -	if (ret) {
> -		debug("%s: Could not get CPU device (err = %d)\n",
> -		      __func__, ret);
> -		return ret;
> -	}
> -
> -	ret = cpu_get_desc(dev, desc, sizeof(desc));
> -	if (ret) {
> -		debug("%s: Could not get CPU description (err = %d)\n",
> -		      dev->name, ret);
> -		return ret;
> -	}
> -
> -	printf("%s", desc);
> -
> -	return 0;
> -}
> -#endif
> -
>  static int announce_dram_init(void)
>  {
>  	puts("DRAM:  ");
> diff --git a/include/init.h b/include/init.h index afc953d..a58d7a6 100644
> --- a/include/init.h
> +++ b/include/init.h
> @@ -109,14 +109,7 @@ int arch_reserve_stacks(void);
>   */
>  int init_cache_f_r(void);
> 
> -#if !CONFIG_IS_ENABLED(CPU)
> -/**
> - * print_cpuinfo() - Display information about the CPU
> - *
> - * Return: 0 if OK, -ve on error
> - */
>  int print_cpuinfo(void);
> -#endif
>  int timer_init(void);
>  int reserve_mmu(void);
>  int misc_init_f(void);
> --
> 2.7.4



More information about the U-Boot mailing list