.type = MT_DEVICE, \
}
-static const char * const rk312x_dt_compat[] __initconst = {
- "rockchip,rk312x",
+static const char * const rk3126_dt_compat[] __initconst = {
+ "rockchip,rk3126",
+ NULL,
+};
+
+static const char * const rk3128_dt_compat[] __initconst = {
+ "rockchip,rk3128",
NULL,
};
dsb();
}
+static void __init rk3126_dt_map_io(void)
+{
+ rockchip_soc_id = ROCKCHIP_SOC_RK3126;
+
+ rk312x_dt_map_io();
+}
+
+static void __init rk3128_dt_map_io(void)
+{
+ rockchip_soc_id = ROCKCHIP_SOC_RK3128;
+
+ rk312x_dt_map_io();
+}
+
static void __init rk312x_dt_init_timer(void)
{
clocksource_of_init();
{
}
-DT_MACHINE_START(RK312X_DT, "Rockchip RK312X")
+DT_MACHINE_START(RK3126_DT, "Rockchip RK3126")
.smp = smp_ops(rockchip_smp_ops),
- .map_io = rk312x_dt_map_io,
+ .map_io = rk3126_dt_map_io,
.init_time = rk312x_dt_init_timer,
- .dt_compat = rk312x_dt_compat,
+ .dt_compat = rk3126_dt_compat,
.init_late = rk312x_init_late,
.reserve = rk312x_reserve,
.restart = rk312x_restart,
MACHINE_END
+DT_MACHINE_START(RK3128_DT, "Rockchip RK3128")
+ .smp = smp_ops(rockchip_smp_ops),
+ .map_io = rk3128_dt_map_io,
+ .init_time = rk312x_dt_init_timer,
+ .dt_compat = rk3128_dt_compat,
+ .init_late = rk312x_init_late,
+ .reserve = rk312x_reserve,
+ .restart = rk312x_restart,
+MACHINE_END
#define ROCKCHIP_CPU_MASK 0xffff0000
#define ROCKCHIP_CPU_RK2928 0x29280000
#define ROCKCHIP_CPU_RK3026 0x30260000
-#define ROCKCHIP_CPU_RK3126 0x31260000
+#define ROCKCHIP_CPU_RK312X 0x31260000
#define ROCKCHIP_CPU_RK3036 0x30360000
#define ROCKCHIP_CPU_RK30XX 0x30660000
#define ROCKCHIP_CPU_RK3066B 0x31680000
static inline bool cpu_is_rk2928(void) { return (rockchip_soc_id & ROCKCHIP_CPU_MASK) == ROCKCHIP_CPU_RK2928; }
static inline bool cpu_is_rk3026(void) { return (rockchip_soc_id & ROCKCHIP_CPU_MASK) == ROCKCHIP_CPU_RK3026; }
-static inline bool cpu_is_rk3126(void) { return (rockchip_soc_id & ROCKCHIP_CPU_MASK) == ROCKCHIP_CPU_RK3126; }
+static inline bool cpu_is_rk312x(void) { return (rockchip_soc_id & ROCKCHIP_CPU_MASK) == ROCKCHIP_CPU_RK312X; }
static inline bool cpu_is_rk3036(void) { return (rockchip_soc_id & ROCKCHIP_CPU_MASK) == ROCKCHIP_CPU_RK3036; }
static inline bool cpu_is_rk30xx(void) { return (rockchip_soc_id & ROCKCHIP_CPU_MASK) == ROCKCHIP_CPU_RK30XX; }
static inline bool cpu_is_rk3066b(void) { return (rockchip_soc_id & ROCKCHIP_CPU_MASK) == ROCKCHIP_CPU_RK3066B; }
#define ROCKCHIP_SOC_RK2928L (ROCKCHIP_CPU_RK2928 | 0x02)
#define ROCKCHIP_SOC_RK3028A (ROCKCHIP_CPU_RK3026 | 0x03)
#define ROCKCHIP_SOC_RK3026 (ROCKCHIP_CPU_RK3026 | 0x04)
-#define ROCKCHIP_SOC_RK3126 (ROCKCHIP_CPU_RK3126 | 0x00)
-#define ROCKCHIP_SOC_RK3128 (ROCKCHIP_CPU_RK3126 | 0x01)
+#define ROCKCHIP_SOC_RK3126 (ROCKCHIP_CPU_RK312X | 0x00)
+#define ROCKCHIP_SOC_RK3128 (ROCKCHIP_CPU_RK312X | 0x01)
#define ROCKCHIP_SOC_RK3036 (ROCKCHIP_CPU_RK3036 | 0x00)
#define ROCKCHIP_SOC_RK3000 (ROCKCHIP_CPU_RK30XX | 0x00)
#define ROCKCHIP_SOC_RK3066 (ROCKCHIP_CPU_RK30XX | 0x01)