The version banner was showing "Amlogic Meson G12A (Unknown) Revision 28:0 (0:0)" in all cases instead of the correct SoC name and revision. Make sure the SoC revision is properly read also for the banner.
52 lines
1.3 KiB
Diff
52 lines
1.3 KiB
Diff
From f9877c2895d6c05710a828d0cd46d9f25626b070 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <f9877c2895d6c05710a828d0cd46d9f25626b070.1606490648.git.stefan@agner.ch>
|
|
From: Stefan Agner <stefan@agner.ch>
|
|
Date: Mon, 31 Aug 2020 13:40:18 +0200
|
|
Subject: [PATCH 1/2] ARM: meson: isolate loading of socinfo
|
|
|
|
Move loading of socinfo into a separate function so the value can be
|
|
reused later.
|
|
|
|
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
|
---
|
|
arch/arm/mach-meson/board-info.c | 14 +++++++++++++-
|
|
1 file changed, 13 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
|
|
index 3abb27e03b..c585b12ca5 100644
|
|
--- a/arch/arm/mach-meson/board-info.c
|
|
+++ b/arch/arm/mach-meson/board-info.c
|
|
@@ -126,7 +126,7 @@ static void print_board_model(void)
|
|
printf("Model: %s\n", model ? model : "Unknown");
|
|
}
|
|
|
|
-int show_board_info(void)
|
|
+static unsigned int get_socinfo(void)
|
|
{
|
|
struct regmap *regmap;
|
|
int nodeoffset, ret;
|
|
@@ -158,8 +158,20 @@ int show_board_info(void)
|
|
return 0;
|
|
}
|
|
|
|
+ return socinfo;
|
|
+}
|
|
+
|
|
+int show_board_info(void)
|
|
+{
|
|
+ unsigned int socinfo;
|
|
+
|
|
/* print board information */
|
|
print_board_model();
|
|
+
|
|
+ socinfo = get_socinfo();
|
|
+ if (!socinfo)
|
|
+ return 0;
|
|
+
|
|
printf("SoC: Amlogic Meson %s (%s) Revision %x:%x (%x:%x)\n",
|
|
socinfo_to_soc_id(socinfo),
|
|
socinfo_to_package_id(socinfo),
|
|
--
|
|
2.29.2
|
|
|