[U-Boot] [PATCH 09/29] blackfin: Avoid using bd_info in print_cpuinfo()

Simon Glass sjg at chromium.org
Thu Dec 15 04:27:40 CET 2016


We should not be setting up board info so early. With generic board the
gd->bd pointer is not valid until reserve_board() is called, much later in
the init sequence.

As a first step, adjust print_cpuinfo() to use the CONFIG instead of the
board info.

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

 arch/blackfin/cpu/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c
index ef362d4..13f083f 100644
--- a/arch/blackfin/cpu/cpu.c
+++ b/arch/blackfin/cpu/cpu.c
@@ -242,7 +242,7 @@ int print_cpuinfo(void)
 	char buf[32];
 
 	printf("CPU:   ADSP %s (Detected Rev: 0.%d) (%s boot)\n",
-	       gd->bd->bi_cpu,
+	       __stringify(CONFIG_BFIN_CPU),
 	       bfin_revid(),
 	       get_bfin_boot_mode(CONFIG_BFIN_BOOT_MODE));
 
-- 
2.8.0.rc3.226.g39d4020



More information about the U-Boot mailing list