Commit 26ab69cb authored by Heiko Stübner's avatar Heiko Stübner Committed by Olof Johansson

ARM: rockchip: convert smp bringup to CPU_METHOD_OF_DECLARE

With the newly introduced CPU_METHOD_OF_DECLARE is not necessary anymore
to reference the relevant smp_ops in the board file, but instead it can
simply be set by the enable-method property of the cpu nodes.
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 1ef81bf7
...@@ -190,6 +190,7 @@ nodes to be present and contain the properties described below. ...@@ -190,6 +190,7 @@ nodes to be present and contain the properties described below.
"marvell,armada-375-smp" "marvell,armada-375-smp"
"marvell,armada-380-smp" "marvell,armada-380-smp"
"marvell,armada-xp-smp" "marvell,armada-xp-smp"
"rockchip,rk3066-smp"
- cpu-release-addr - cpu-release-addr
Usage: required for systems that have an "enable-method" Usage: required for systems that have an "enable-method"
......
...@@ -24,6 +24,7 @@ / { ...@@ -24,6 +24,7 @@ / {
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
enable-method = "rockchip,rk3066-smp";
cpu@0 { cpu@0 {
device_type = "cpu"; device_type = "cpu";
......
...@@ -24,6 +24,7 @@ / { ...@@ -24,6 +24,7 @@ / {
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
enable-method = "rockchip,rk3066-smp";
cpu@0 { cpu@0 {
device_type = "cpu"; device_type = "cpu";
......
...@@ -18,5 +18,3 @@ extern char rockchip_secondary_trampoline_end; ...@@ -18,5 +18,3 @@ extern char rockchip_secondary_trampoline_end;
extern unsigned long rockchip_boot_fn; extern unsigned long rockchip_boot_fn;
extern void rockchip_secondary_startup(void); extern void rockchip_secondary_startup(void);
extern struct smp_operations rockchip_smp_ops;
...@@ -178,7 +178,8 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus) ...@@ -178,7 +178,8 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
pmu_set_power_domain(0 + i, false); pmu_set_power_domain(0 + i, false);
} }
struct smp_operations rockchip_smp_ops __initdata = { static struct smp_operations rockchip_smp_ops __initdata = {
.smp_prepare_cpus = rockchip_smp_prepare_cpus, .smp_prepare_cpus = rockchip_smp_prepare_cpus,
.smp_boot_secondary = rockchip_boot_secondary, .smp_boot_secondary = rockchip_boot_secondary,
}; };
CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops);
...@@ -39,7 +39,6 @@ static const char * const rockchip_board_dt_compat[] = { ...@@ -39,7 +39,6 @@ static const char * const rockchip_board_dt_compat[] = {
}; };
DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)") DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
.smp = smp_ops(rockchip_smp_ops),
.init_machine = rockchip_dt_init, .init_machine = rockchip_dt_init,
.dt_compat = rockchip_board_dt_compat, .dt_compat = rockchip_board_dt_compat,
MACHINE_END MACHINE_END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment