summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lechner <[email protected]>2026-03-30 15:23:19 -0500
committerDavid Lechner <[email protected]>2026-04-07 13:14:29 -0500
commitc344faa37d287ff761813b519f8e1412b6153b76 (patch)
tree8dc1adb62d1b294ce8bb40c0fb2652cd3e91a0ff
parentcde43f9bbd5d947be1ac6d03bba8d81304941cb0 (diff)
arm: mediatek: mt8189: print specific CPU information
Modify the print_cpuinfo() function to print a more specific CPU name when possible. Reviewed-by: Macpaul Lin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: David Lechner <[email protected]>
-rw-r--r--arch/arm/mach-mediatek/mt8189/init.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/arch/arm/mach-mediatek/mt8189/init.c b/arch/arm/mach-mediatek/mt8189/init.c
index 648c17ac305..ec7587c3586 100644
--- a/arch/arm/mach-mediatek/mt8189/init.c
+++ b/arch/arm/mach-mediatek/mt8189/init.c
@@ -11,6 +11,8 @@
#include <linux/kernel.h>
#include <linux/sizes.h>
+#include "../cpu.h"
+
DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
@@ -33,9 +35,37 @@ void reset_cpu(ulong addr)
psci_system_reset();
}
+static const char *mediatek_get_segment_name_string(void)
+{
+ u32 seg = mediatek_sip_segment_name();
+
+ switch (seg) {
+ case 0x80:
+ return "MT8391AV/AZA";
+ case 0x81:
+ return "MT8371AV/AZA";
+ case 0x82:
+ return "MT8371LV/AZA";
+ case 0x88:
+ return "MT8391IV/AZA";
+ case 0x89:
+ return "MT8371IV/AZA";
+ default:
+ return NULL;
+ }
+}
+
int print_cpuinfo(void)
{
- printf("CPU: MediaTek MT8189\n");
+ const char *seg_name = mediatek_get_segment_name_string();
+ u32 part = mediatek_sip_part_name();
+
+ if (seg_name)
+ printf("CPU: MediaTek %s\n", seg_name);
+ else if (part)
+ printf("CPU: MediaTek part MT%.4x\n", part);
+ else
+ printf("CPU: MediaTek MT8189\n");
return 0;
}