diff options
author | Stefan Agner <stefan@agner.ch> | 2020-11-27 17:28:20 +0100 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2021-01-11 14:59:54 +0100 |
commit | cf47c0e23a25f10ea87fdb3ac4b1e4ea14823e16 (patch) | |
tree | f15d5c6199b7da5a59298b162b26a961ebe77962 | |
parent | ade0100a91620ae1a4f008d5f05dc94926659dcd (diff) | |
download | u-boot-cf47c0e23a25f10ea87fdb3ac4b1e4ea14823e16.tar.gz u-boot-cf47c0e23a25f10ea87fdb3ac4b1e4ea14823e16.tar.xz u-boot-cf47c0e23a25f10ea87fdb3ac4b1e4ea14823e16.zip |
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>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
-rw-r--r-- | arch/arm/mach-meson/board-info.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c index e61d1adb10..a0bcf38f29 100644 --- a/arch/arm/mach-meson/board-info.c +++ b/arch/arm/mach-meson/board-info.c @@ -131,7 +131,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; @@ -163,8 +163,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), |