2 * (C) Copyright 2012 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
3 * (C) Copyright 2012 Renesas Solutions Corp.
5 * SPDX-License-Identifier: GPL-2.0+
10 #ifdef CONFIG_ARCH_CPU_INIT
11 int arch_cpu_init(void)
18 #ifndef CONFIG_SYS_DCACHE_OFF
19 void enable_caches(void)
21 #if defined(CONFIG_RCAR_GEN3)
22 rcar_gen3_memmap_fixup();
28 #ifdef CONFIG_DISPLAY_CPUINFO
29 static u32 __rmobile_get_cpu_type(void)
33 u32 rmobile_get_cpu_type(void)
34 __attribute__((weak, alias("__rmobile_get_cpu_type")));
36 static u32 __rmobile_get_cpu_rev_integer(void)
40 u32 rmobile_get_cpu_rev_integer(void)
41 __attribute__((weak, alias("__rmobile_get_cpu_rev_integer")));
43 static u32 __rmobile_get_cpu_rev_fraction(void)
47 u32 rmobile_get_cpu_rev_fraction(void)
48 __attribute__((weak, alias("__rmobile_get_cpu_rev_fraction")));
50 /* CPU infomation table */
54 } rmobile_cpuinfo[] = {
55 { RMOBILE_CPU_TYPE_SH73A0, "SH73A0" },
56 { RMOBILE_CPU_TYPE_R8A7740, "R8A7740" },
57 { RMOBILE_CPU_TYPE_R8A7790, "R8A7790" },
58 { RMOBILE_CPU_TYPE_R8A7791, "R8A7791" },
59 { RMOBILE_CPU_TYPE_R8A7792, "R8A7792" },
60 { RMOBILE_CPU_TYPE_R8A7793, "R8A7793" },
61 { RMOBILE_CPU_TYPE_R8A7794, "R8A7794" },
62 { RMOBILE_CPU_TYPE_R8A7795, "R8A7795" },
63 { RMOBILE_CPU_TYPE_R8A7796, "R8A7796" },
67 int print_cpuinfo(void)
70 u32 cpu_type = rmobile_get_cpu_type();
71 for (; i < ARRAY_SIZE(rmobile_cpuinfo); i++) {
72 if (rmobile_cpuinfo[i].cpu_type == cpu_type) {
73 printf("CPU: Renesas Electronics %s rev %d.%d\n",
74 rmobile_cpuinfo[i].cpu_name,
75 rmobile_get_cpu_rev_integer(),
76 rmobile_get_cpu_rev_fraction());
82 #endif /* CONFIG_DISPLAY_CPUINFO */