[PATCH 2/2] arm: mediatek: mt8189: print specific CPU information
Macpaul Lin (林智斌)
Macpaul.Lin at mediatek.com
Tue Apr 7 15:26:27 CEST 2026
On Mon, 2026-03-30 at 15:23 -0500, David Lechner wrote:
> Modify the print_cpuinfo() function to print a more specific CPU name
> when possible.
>
> Signed-off-by: David Lechner <dlechner at baylibre.com>
> ---
> arch/arm/mach-mediatek/mt8189/init.c | 32
> +++++++++++++++++++++++++++++++-
> 1 file changed, 31 insertions(+), 1 deletion(-)
>
> 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;
> }
>
Reviewed-by: Macpaul Lin <macpaul.lin at mediatek.com>
Thanks!
Macpaul Lin
More information about the U-Boot
mailing list