int print_cpuinfo(void) { #ifdef CONFIG_EXYNOS5 unsigned int cpuid; unsigned int subrev; __asm__ __volatile__("mrc p15, 0, %0, c0, c0, 0":"=r"(cpuid)); subrev = (readl(EXYNOS5_PRO_ID) & 0x0000000F); printf("CPU: %s%x Rev%x.%x [Samsung SOC on SMP Platform Base on ARM CortexA%d]\n" \ , s5p_get_cpu_name(), s5p_cpu_id, s5p_cpu_rev, subrev, ((cpuid >> 4) & 0xf)); #if defined(CONFIG_CPU_EXYNOS5410) || defined(CONFIG_CPU_EXYNOS5420) unsigned int apll = get_pll_clk(APLL); unsigned int kpll = get_pll_clk(KPLL); unsigned int mpll = get_pll_clk(MPLL); unsigned int bpll = get_pll_clk(BPLL); printf("APLL = %ldMHz, KPLL = %ldMHz\n", apll/1000000, kpll/1000000); printf("MPLL = %ldMHz, BPLL = %ldMHz\n", mpll/1000000, bpll/1000000); #endif #else char buf[32]; if (s5p_cpu_id == 0x4412 || s5p_cpu_id == 0x4212) { printf("CPU: %s%X [Samsung SOC on SMP Platform Base on ARM CortexA9]\n", s5p_get_cpu_name(), s5p_cpu_id); printf("APLL = %ldMHz, MPLL = %ldMHz\n", get_pll_clk(APLL)/1000000, get_pll_clk(MPLL)/1000000); } else printf("CPU:\t%s%X@%sMHz\n", s5p_get_cpu_name(), s5p_cpu_id, strmhz(buf, get_arm_clk())); #endif return 0; }
int print_cpuinfo(void) { const char *cpu_model; int len; /* For SoC with no real CPU ID in naming convention. */ cpu_model = fdt_getprop(gd->fdt_blob, 0, "cpu-model", &len); if (cpu_model) printf("CPU: %.*s @ ", len, cpu_model); else printf("CPU: %s%X @ ", s5p_get_cpu_name(), s5p_cpu_id); print_freq(get_arm_clk(), "\n"); return 0; }