ARM: rockchip: convert smp bringup to CPU_METHOD_OF_DECLARE
authorHeiko Stübner <heiko@sntech.de>
Thu, 27 Mar 2014 00:06:32 +0000 (01:06 +0100)
committerOlof Johansson <olof@lixom.net>
Mon, 26 May 2014 18:15:53 +0000 (11:15 -0700)
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: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
Documentation/devicetree/bindings/arm/cpus.txt
arch/arm/boot/dts/rk3066a.dtsi
arch/arm/boot/dts/rk3188.dtsi
arch/arm/mach-rockchip/core.h
arch/arm/mach-rockchip/platsmp.c
arch/arm/mach-rockchip/rockchip.c

index e4b6dafbcfc48fb08ab0d24814213dc501c3422f..dffcac81f84161651974fc4c7ee77ce5e9bf68c4 100644 (file)
@@ -190,6 +190,7 @@ nodes to be present and contain the properties described below.
                            "marvell,armada-375-smp"
                            "marvell,armada-380-smp"
                            "marvell,armada-xp-smp"
+                           "rockchip,rk3066-smp"
 
        - cpu-release-addr
                Usage: required for systems that have an "enable-method"
index 4d4dfbb59f4b53590aaf4fe61af6c013f793a03a..90b354db16a0f839e48888e237b9454c115f8e60 100644 (file)
@@ -24,6 +24,7 @@
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
+               enable-method = "rockchip,rk3066-smp";
 
                cpu@0 {
                        device_type = "cpu";
index ed9a70af3e3f88ff59a266165b2655754e50dbda..2b494ceef6fcb2fd38f1ba7cafee0a987c910864 100644 (file)
@@ -24,6 +24,7 @@
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
+               enable-method = "rockchip,rk3066-smp";
 
                cpu@0 {
                        device_type = "cpu";
index e2e7c9dbb2002fa831ac2eb2b7497ba0b523c71d..39bca96b555a6f08a630aefd2a7b53a941487d39 100644 (file)
@@ -18,5 +18,3 @@ extern char rockchip_secondary_trampoline_end;
 
 extern unsigned long rockchip_boot_fn;
 extern void rockchip_secondary_startup(void);
-
-extern struct smp_operations rockchip_smp_ops;
index 072842f6491b8efb0bc0ac7e3d3b04e3d6ffaefe..910835d4ccf4abe2e0606fde60a1d13d9b619e3f 100644 (file)
@@ -178,7 +178,8 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
                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_boot_secondary     = rockchip_boot_secondary,
 };
+CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops);
index d211d6fa0d985d643743c75e224ba20eb1b612bf..4499b0a31a276024cf377a13ffcd3a7d8cfa580f 100644 (file)
@@ -39,7 +39,6 @@ static const char * const rockchip_board_dt_compat[] = {
 };
 
 DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
-       .smp            = smp_ops(rockchip_smp_ops),
        .init_machine   = rockchip_dt_init,
        .dt_compat      = rockchip_board_dt_compat,
 MACHINE_END