rk312x: modify ROCKCHIP_CPU_RK3126 to ROCKCHIP_CPU_RK312X, add rk3126 rk3128 DT_MACHINE

Signed-off-by: 陈亮 <cl@rock-chips.com>
This commit is contained in:
陈亮
2014-07-17 02:08:29 -07:00
parent 5e44a64a6d
commit e0f7513837
3 changed files with 38 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
#include "rk312x.dtsi"
/ {
compatible = "rockchip,rk312x";
compatible = "rockchip,rk3126";
memory {
device_type = "memory";

View File

@@ -48,8 +48,13 @@
.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,
};
@@ -77,6 +82,20 @@ static void __init rk312x_dt_map_io(void)
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();
@@ -94,13 +113,22 @@ static void rk312x_restart(char mode, const char *cmd)
{
}
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

View File

@@ -8,7 +8,7 @@ static inline bool cpu_is_rockchip(void) { return rockchip_soc_id; }
#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
@@ -18,7 +18,7 @@ static inline bool cpu_is_rockchip(void) { return rockchip_soc_id; }
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; }
@@ -31,8 +31,8 @@ static inline bool cpu_is_rk3288(void) { return (rockchip_soc_id & ROCKCHIP_CPU
#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)