3 * David Mueller <d.mueller@elsoft.ch>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/s3c24x0_cpu.h>
12 typedef ulong (*getfreq)(void);
14 static const getfreq freq_f[] = {
20 static const char freq_c[] = { 'F', 'H', 'P' };
22 int print_cpuinfo(void)
26 /* the S3C2400 seems to be lacking a CHIP ID register */
27 #ifndef CONFIG_S3C2400
29 struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
31 cpuid = readl(&gpio->gstatus1);
32 printf("CPUID: %8lX\n", cpuid);
34 for (i = 0; i < ARRAY_SIZE(freq_f); i++)
35 printf("%cCLK: %8s MHz\n", freq_c[i], strmhz(buf, freq_f[i]()));