1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2012 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
4 * (C) Copyright 2012 Renesas Solutions Corp.
9 /* R-Car Gen3 caches are enabled in memmap-gen3.c */
10 #ifndef CONFIG_RCAR_GEN3
11 #ifdef CONFIG_ARCH_CPU_INIT
12 int arch_cpu_init(void)
19 #ifndef CONFIG_SYS_DCACHE_OFF
20 void enable_caches(void)
27 #ifdef CONFIG_DISPLAY_CPUINFO
28 static u32 __rmobile_get_cpu_type(void)
32 u32 rmobile_get_cpu_type(void)
33 __attribute__((weak, alias("__rmobile_get_cpu_type")));
35 static u32 __rmobile_get_cpu_rev_integer(void)
39 u32 rmobile_get_cpu_rev_integer(void)
40 __attribute__((weak, alias("__rmobile_get_cpu_rev_integer")));
42 static u32 __rmobile_get_cpu_rev_fraction(void)
46 u32 rmobile_get_cpu_rev_fraction(void)
47 __attribute__((weak, alias("__rmobile_get_cpu_rev_fraction")));
49 /* CPU infomation table */
53 } rmobile_cpuinfo[] = {
54 { RMOBILE_CPU_TYPE_SH73A0, "SH73A0" },
55 { RMOBILE_CPU_TYPE_R8A7740, "R8A7740" },
56 { RMOBILE_CPU_TYPE_R8A7790, "R8A7790" },
57 { RMOBILE_CPU_TYPE_R8A7791, "R8A7791" },
58 { RMOBILE_CPU_TYPE_R8A7792, "R8A7792" },
59 { RMOBILE_CPU_TYPE_R8A7793, "R8A7793" },
60 { RMOBILE_CPU_TYPE_R8A7794, "R8A7794" },
61 { RMOBILE_CPU_TYPE_R8A7795, "R8A7795" },
62 { RMOBILE_CPU_TYPE_R8A7796, "R8A7796" },
63 { RMOBILE_CPU_TYPE_R8A77965, "R8A77965" },
64 { RMOBILE_CPU_TYPE_R8A77970, "R8A77970" },
65 { RMOBILE_CPU_TYPE_R8A77990, "R8A77990" },
66 { RMOBILE_CPU_TYPE_R8A77995, "R8A77995" },
70 int print_cpuinfo(void)
73 u32 cpu_type = rmobile_get_cpu_type();
74 for (; i < ARRAY_SIZE(rmobile_cpuinfo); i++) {
75 if (rmobile_cpuinfo[i].cpu_type == cpu_type) {
76 printf("CPU: Renesas Electronics %s rev %d.%d\n",
77 rmobile_cpuinfo[i].cpu_name,
78 rmobile_get_cpu_rev_integer(),
79 rmobile_get_cpu_rev_fraction());
85 #endif /* CONFIG_DISPLAY_CPUINFO */