ARM: mvebu: Use common of_clk_init() function
Subsystems (2)
PATCH 1/1 ARM: mvebu: Use common of_clk_init() function
The use common of_clk_init() function simplifies the clock initialization and adds handling of the DT "fixed-clock".
--- drivers/clk/mvebu/clk-cpu.c | 17 ++--------------- drivers/clk/mvebu/clk-cpu.h | 22 ---------------------- drivers/clk/mvebu/clk.c | 6 +----- 3 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 drivers/clk/mvebu/clk-cpu.h
drivers/clk/mvebu/clk-cpu.c +2 -15
@@ -16,7 +16,6 @@#include <linux/io.h> #include <linux/of.h> #include <linux/delay.h> -#include "clk-cpu.h" #define SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET 0x0#define SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET 0xC
@@ -173,17 +172,5 @@ clks_out:kfree (cpuclk); } -static const __initconst struct of_device_id clk_cpu_match[] = { - { - .compatible ="marvell,armada-xp-cpu-clock" , - .data = of_cpu_clk_setup, - }, - { -/* sentinel */ - }, -}; - -void __init mvebu_cpu_clk_init (void ) -{ -of_clk_init (clk_cpu_match); -} +CLK_OF_DECLARE (armada_xp_cpu_clock,"marvell,armada-xp-cpu-clock" , + of_cpu_clk_setup);
drivers/clk/mvebu/clk-cpu.h deleted +0 -22
@@ -1,22 +0,0 @@ -/* -* Marvell MVEBU CPU clock handling. -* -* Copyright (C) 2012 Marvell -* -* Gregory CLEMENT <[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. -*/ - -#ifndef __MVEBU_CLK_CPU_H -#define __MVEBU_CLK_CPU_H - -#ifdef CONFIG_MVEBU_CLK_CPU -void __init mvebu_cpu_clk_init (void ); -#else -static inline void mvebu_cpu_clk_init (void ) {} -#endif - -#endif
drivers/clk/mvebu/clk.c +1 -5
@@ -10,18 +10,14 @@* warranty of any kind, whether express or implied. */ #include <linux/kernel.h> -#include <linux/clk.h> #include <linux/clk-provider.h> -#include <linux/of_address.h> -#include <linux/clk/mvebu.h> #include <linux/of.h> #include "clk-core.h" -#include "clk-cpu.h" #include "clk-gating-ctrl.h" void __init mvebu_clocks_init (void ) {mvebu_core_clk_init ();mvebu_gating_clk_init (); -mvebu_cpu_clk_init (); +of_clk_init (NULL ); }
Signature · 1 line
1.7.10.4
PATCH 1/1 ARM: mvebu: Use common of_clk_init() function
Quoting Jean-Francois Moine (2013-04-02 04:02:36)
Quoted 4 lines
The use common
of_clk_init()function simplifies the clock initialization and adds handling of the DT "fixed-clock".Signed-off-by Jean-Francois Moine <[email protected]>
This is a nice change. Taken into clk-next.
Regards,
Mike
Quoted 99 lines
--- drivers/clk/mvebu/clk-cpu.c | 17 ++--------------- drivers/clk/mvebu/clk-cpu.h | 22 ---------------------- drivers/clk/mvebu/clk.c | 6 +----- 3 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 drivers/clk/mvebu/clk-cpu.hdrivers/clk/mvebu/clk-cpu.c +2
-15@@ -16,7 +16,6 @@#include <linux/io.h> #include <linux/of.h> #include <linux/delay.h> -#include "clk-cpu.h" #define SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET 0x0#define SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET 0xC@@ -173,17 +172,5 @@ clks_out:kfree (cpuclk); } -static const __initconst struct of_device_id clk_cpu_match[] = { - { - .compatible ="marvell,armada-xp-cpu-clock" , - .data = of_cpu_clk_setup, - }, - { -/* sentinel */ - }, -}; - -void __init mvebu_cpu_clk_init (void ) -{ -of_clk_init (clk_cpu_match); -} +CLK_OF_DECLARE (armada_xp_cpu_clock,"marvell,armada-xp-cpu-clock" , + of_cpu_clk_setup);drivers/clk/mvebu/clk-cpu.h deleted +0
-22@@ -1,22 +0,0 @@ -/* -* Marvell MVEBU CPU clock handling. -* -* Copyright (C) 2012 Marvell -* -* Gregory CLEMENT <[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. -*/ - -#ifndef __MVEBU_CLK_CPU_H -#define __MVEBU_CLK_CPU_H - -#ifdef CONFIG_MVEBU_CLK_CPU -void __init mvebu_cpu_clk_init (void ); -#else -static inline void mvebu_cpu_clk_init (void ) {} -#endif - -#endif drivers/clk/mvebu/clk.c +1
-5@@ -10,18 +10,14 @@* warranty of any kind, whether express or implied. */ #include <linux/kernel.h> -#include <linux/clk.h> #include <linux/clk-provider.h> -#include <linux/of_address.h> -#include <linux/clk/mvebu.h> #include <linux/of.h> #include "clk-core.h" -#include "clk-cpu.h" #include "clk-gating-ctrl.h" void __init mvebu_clocks_init (void ) {mvebu_core_clk_init ();mvebu_gating_clk_init (); -mvebu_cpu_clk_init (); +of_clk_init (NULL ); }Signature · 7 lines
1.7.10.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ARM: mvebu: Use common of_clk_init() function
Quoting Mike Turquette (2013-04-02 17:43:32)
Quoted 8 lines
Quoting Jean-Francois Moine (2013-04-02 04:02:36)
Quoted 4 lines
The use common
of_clk_init()function simplifies the clock initialization and adds handling of the DT "fixed-clock".Signed-off-by Jean-Francois Moine <[email protected]>This is a nice change. Taken into clk-next.
When I applied this patch I modified the $SUBJECT line as:
clk: mvebu: Use common of_clk_init() function
Regards,
Mike
Quoted 102 lines
Regards,
MikeQuoted 99 lines
--- drivers/clk/mvebu/clk-cpu.c | 17 ++--------------- drivers/clk/mvebu/clk-cpu.h | 22 ---------------------- drivers/clk/mvebu/clk.c | 6 +----- 3 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 drivers/clk/mvebu/clk-cpu.hdrivers/clk/mvebu/clk-cpu.c +2
-15@@ -16,7 +16,6 @@#include <linux/io.h> #include <linux/of.h> #include <linux/delay.h> -#include "clk-cpu.h" #define SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET 0x0#define SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET 0xC@@ -173,17 +172,5 @@ clks_out:kfree (cpuclk); } -static const __initconst struct of_device_id clk_cpu_match[] = { - { - .compatible ="marvell,armada-xp-cpu-clock" , - .data = of_cpu_clk_setup, - }, - { -/* sentinel */ - }, -}; - -void __init mvebu_cpu_clk_init (void ) -{ -of_clk_init (clk_cpu_match); -} +CLK_OF_DECLARE (armada_xp_cpu_clock,"marvell,armada-xp-cpu-clock" , + of_cpu_clk_setup);drivers/clk/mvebu/clk-cpu.h deleted +0
-22@@ -1,22 +0,0 @@ -/* -* Marvell MVEBU CPU clock handling. -* -* Copyright (C) 2012 Marvell -* -* Gregory CLEMENT <[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. -*/ - -#ifndef __MVEBU_CLK_CPU_H -#define __MVEBU_CLK_CPU_H - -#ifdef CONFIG_MVEBU_CLK_CPU -void __init mvebu_cpu_clk_init (void ); -#else -static inline void mvebu_cpu_clk_init (void ) {} -#endif - -#endif drivers/clk/mvebu/clk.c +1
-5@@ -10,18 +10,14 @@* warranty of any kind, whether express or implied. */ #include <linux/kernel.h> -#include <linux/clk.h> #include <linux/clk-provider.h> -#include <linux/of_address.h> -#include <linux/clk/mvebu.h> #include <linux/of.h> #include "clk-core.h" -#include "clk-cpu.h" #include "clk-gating-ctrl.h" void __init mvebu_clocks_init (void ) {mvebu_core_clk_init ();mvebu_gating_clk_init (); -mvebu_cpu_clk_init (); +of_clk_init (NULL ); }Signature · 7 lines
1.7.10.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel