clk: mvebu: Use common of_clk_init() function
authorJean-Francois Moine <moinejf@free.fr>
Tue, 2 Apr 2013 11:02:36 +0000 (13:02 +0200)
committerMike Turquette <mturquette@linaro.org>
Wed, 3 Apr 2013 19:55:31 +0000 (12:55 -0700)
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 <moinejf@free.fr>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: fixed $SUBJECT to reflect correct file path]

drivers/clk/mvebu/clk-cpu.c
drivers/clk/mvebu/clk-cpu.h [deleted file]
drivers/clk/mvebu/clk.c

index 9dd2551a0a41aebdb10f780b6657e9f3ce3de94c..b0fbc07154912072bce34e4684e0a0fb57d2cf52 100644 (file)
@@ -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);
diff --git a/drivers/clk/mvebu/clk-cpu.h b/drivers/clk/mvebu/clk-cpu.h
deleted file mode 100644 (file)
index 08e2aff..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Marvell MVEBU CPU clock handling.
- *
- * Copyright (C) 2012 Marvell
- *
- * Gregory CLEMENT <gregory.clement@free-electrons.com>
- *
- * 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
index 855681b8a9dcc064231ab95bfc778ebd8b660251..29f10fb3006ced87fb4138e6db29df1e76b0ffb2 100644 (file)
  * 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);
 }