3 * David Mueller <d.mueller@elsoft.ch>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 #include <asm/arch/s3c24x0_cpu.h>
28 typedef ulong (*getfreq)(void);
30 static const getfreq freq_f[] = {
36 static const char freq_c[] = { 'F', 'H', 'P' };
38 int print_cpuinfo(void)
42 /* the S3C2400 seems to be lacking a CHIP ID register */
43 #ifndef CONFIG_S3C2400
45 struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
47 cpuid = readl(&gpio->gstatus1);
48 printf("CPUID: %8lX\n", cpuid);
50 for (i = 0; i < ARRAY_SIZE(freq_f); i++)
51 printf("%cCLK: %8s MHz\n", freq_c[i], strmhz(buf, freq_f[i]()));