diff mbox

[U-Boot] ARM: uniphier: print Support Card info very late

Message ID 1487579539-22178-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 6fc849148a677370c197e152b267dac2d3dbbdfc
Delegated to: Masahiro Yamada
Headers show

Commit Message

Masahiro Yamada Feb. 20, 2017, 8:32 a.m. UTC
Since commit 26b09c022ab6 ("ARM: uniphier: move SBC and Support Card
init code to U-Boot proper"), the System Bus is initialized by
board_init().  The show_board_info() is called from board_init_f()
by default, so the revision register of the Micro Support Card may
not be accessed at this point.  Show its revision after the System
Bus is initialized.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/mach-uniphier/micro-support-card.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Comments

Masahiro Yamada Feb. 22, 2017, 11:35 p.m. UTC | #1
2017-02-20 17:32 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Since commit 26b09c022ab6 ("ARM: uniphier: move SBC and Support Card
> init code to U-Boot proper"), the System Bus is initialized by
> board_init().  The show_board_info() is called from board_init_f()
> by default, so the revision register of the Micro Support Card may
> not be accessed at this point.  Show its revision after the System
> Bus is initialized.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


Applied to u-boot-uniphier.
diff mbox

Patch

diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index 2b231ac..8a30341 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -43,18 +43,13 @@  static int support_card_show_revision(void)
 	revision &= 0xff;
 
 	/* revision 3.6.x card changed the revision format */
-	printf("(CPLD version %s%d.%d)\n", revision >> 4 == 6 ? "3." : "",
+	printf("SC:    Micro Support Card (CPLD version %s%d.%d)\n",
+	       revision >> 4 == 6 ? "3." : "",
 	       revision >> 4, revision & 0xf);
 
 	return 0;
 }
 
-int checkboard(void)
-{
-	printf("SC:    Micro Support Card ");
-	return support_card_show_revision();
-}
-
 void support_card_init(void)
 {
 	support_card_reset();
@@ -64,6 +59,8 @@  void support_card_init(void)
 	 */
 	udelay(200);
 	support_card_reset_deassert();
+
+	support_card_show_revision();
 }
 
 #if defined(CONFIG_SMC911X)