1 #include <linux/kernel.h>
3 #include <linux/rockchip/cpu.h>
5 unsigned long rockchip_soc_id;
6 EXPORT_SYMBOL(rockchip_soc_id);
8 static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf)
14 else if (cpu_is_rk319x())
16 else if (cpu_is_rk3188())
18 else if (cpu_is_rk3066b())
20 else if (cpu_is_rk3026())
22 else if (cpu_is_rk30xx())
24 else if (cpu_is_rk2928())
29 return sprintf(buf, "%s\n", type);
32 static struct device_attribute type_attr = __ATTR_RO(type);
34 static ssize_t soc_show(struct device *dev, struct device_attribute *attr, char *buf)
40 else if (soc_is_rk3190())
42 else if (soc_is_rk3188plus())
44 else if (soc_is_rk3188())
46 else if (soc_is_rk3168())
48 else if (soc_is_rk3028())
50 else if (soc_is_rk3066b())
52 else if (soc_is_rk3028a())
54 else if (soc_is_rk3026())
56 else if (soc_is_rk2928g())
58 else if (soc_is_rk2928l())
60 else if (soc_is_rk2926())
62 else if (soc_is_rk3066())
64 else if (soc_is_rk3068())
66 else if (soc_is_rk3000())
71 return sprintf(buf, "%s\n", soc);
74 static struct device_attribute soc_attr = __ATTR_RO(soc);
76 static int __init rockchip_cpu_lateinit(void)
80 err = device_create_file(cpu_subsys.dev_root, &type_attr);
81 err = device_create_file(cpu_subsys.dev_root, &soc_attr);
85 late_initcall(rockchip_cpu_lateinit);