ARM: orion5x: switch to use the clock driver for DT platforms
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 22 Apr 2014 21:26:24 +0000 (23:26 +0200)
committerJason Cooper <jason@lakedaemon.net>
Sat, 26 Apr 2014 14:40:42 +0000 (14:40 +0000)
This commit moves the Orion5x platforms using the Device Tree to use
the recently introduced clock driver for Orion5x. To achieve that, it:

 * Adds the necessary DT description of the clock.

 * Selects ORION_CLK to enable the compilation of the clock driver.

 * Call of_clk_init() instead of the Orion5x-specific clock
   initialization function.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1398202002-28530-21-git-send-email-thomas.petazzoni@free-electrons.com
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/orion5x-mv88f5182.dtsi
arch/arm/mach-orion5x/Kconfig
arch/arm/mach-orion5x/board-dt.c

index ddfb4d17ff4cc323cc5fe5142d9933c6933418dc..a56f9c88efd0e4723dcc87a209140e2a81b49092 100644 (file)
                compatible = "marvell,orion5x-88f5182-mbus", "simple-bus";
 
                internal-regs {
+                       core_clk: core-clocks@10030 {
+                               compatible = "marvell,mv88f5182-core-clock";
+                               reg = <0x10010 0x4>;
+                               #clock-cells = <1>;
+                       };
+
                        mbusc: mbus-controller@20000 {
                                compatible = "marvell,mbus-controller";
                                reg = <0x20000 0x100>, <0x1500 0x20>;
index 14f2cae4109ca10fc61962b4d787a5f89ed70097..4f5113279352e0d654931ef3d50c8e2d3ea40745 100644 (file)
@@ -5,6 +5,7 @@ menu "Orion Implementations"
 config ARCH_ORION5X_DT
        bool "Marvell Orion5x Flattened Device Tree"
        select USE_OF
+       select ORION_CLK
        help
          Say 'Y' here if you want your kernel to support the
          Marvell Orion5x using flattened device tree.
index 7f00897f0dd23b3a18c27f4a7f891cbbc80e7dab..34286ef163208160e46ffe735faff2b20742ef28 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/of_platform.h>
 #include <linux/cpu.h>
 #include <linux/mbus.h>
+#include <linux/clk-provider.h>
 #include <asm/system_misc.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -43,6 +44,7 @@ static void orion5x_dt_init_early(void)
 static void orion5x_dt_init_time(void)
 {
        orion5x_timer_init();
+       of_clk_init(NULL);
 }
 
 static void __init orion5x_dt_init(void)
@@ -60,9 +62,6 @@ static void __init orion5x_dt_init(void)
         */
        orion5x_setup_wins();
 
-       /* Setup root of clk tree */
-       clk_init();
-
        /*
         * Don't issue "Wait for Interrupt" instruction if we are
         * running on D0 5281 silicon.