mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-15 15:53:26 +08:00
ed41e62f51
Mostly automatic with: sed -i -e 's/CONFIG_\(SUN[45678]I\)/CONFIG_MACH_\1/g' $(git grep -l CONFIG_SUN[45678]I) followed by removing the relevant #defines from include/configs/sun?i.h by hand. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
/*
|
|
* (C) Copyright 2007-2011
|
|
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
|
* Tom Cubie <tangliang@allwinnertech.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/cpu.h>
|
|
|
|
#ifdef CONFIG_DISPLAY_CPUINFO
|
|
int print_cpuinfo(void)
|
|
{
|
|
#ifdef CONFIG_MACH_SUN4I
|
|
puts("CPU: Allwinner A10 (SUN4I)\n");
|
|
#elif defined CONFIG_MACH_SUN5I
|
|
u32 val = readl(SUNXI_SID_BASE + 0x08);
|
|
switch ((val >> 12) & 0xf) {
|
|
case 0: puts("CPU: Allwinner A12 (SUN5I)\n"); break;
|
|
case 3: puts("CPU: Allwinner A13 (SUN5I)\n"); break;
|
|
case 7: puts("CPU: Allwinner A10s (SUN5I)\n"); break;
|
|
default: puts("CPU: Allwinner A1X (SUN5I)\n");
|
|
}
|
|
#elif defined CONFIG_MACH_SUN6I
|
|
puts("CPU: Allwinner A31 (SUN6I)\n");
|
|
#elif defined CONFIG_MACH_SUN7I
|
|
puts("CPU: Allwinner A20 (SUN7I)\n");
|
|
#elif defined CONFIG_MACH_SUN8I
|
|
puts("CPU: Allwinner A23 (SUN8I)\n");
|
|
#else
|
|
#warning Please update cpu_info.c with correct CPU information
|
|
puts("CPU: SUNXI Family\n");
|
|
#endif
|
|
return 0;
|
|
}
|
|
#endif
|