aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:18:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:18:35 -0500
commit6c9e92476bc924ede6d6d2f0bfed2c06ae148d29 (patch)
tree1c9972cf4f4b484d6203844c396b0c232379f1f1 /drivers/clk
parent0563fdc0d9fbd4d8896956d4aeb01fad09146acc (diff)
parentef1dfa7332e9205b532da1c2d286757ce511cd1d (diff)
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Arnd Bergmann: "The remaining cleanups for 3.19 are to a large part result of devicetree conversion nearing completion on two other platforms besides AT91: - Like AT91, Renesas shmobile is in the process to migrate to DT and multiplatform, but using a different approach of doing it one SoC at a time. For 3.19, the r8a7791 platform and associated "Koelsch" board are considered complete and we remove the non-DT non-multiplatform support for this. - The ARM Versatile Express has supported DT and multiplatform for a long time, but we have still kept the legacy board files around, because not all drivers were fully working before. We have finally taken the last step to remove the board files. Other changes in this branch are preparation for the later branches or just unrelated to the more interesting changes: - The dts files for arm64 get moved into per-vendor directories for a clearer structure. - Some dead code removal (zynq, exynos, davinci, imx) - Using pr_*() macros more consistently instead of printk(KERN_*) in some platform code" * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (71 commits) ARM: zynq: Remove secondary_startup() declaration from header ARM: vexpress: Enable regulator framework when MMCI is in use ARM: vexpress: Remove non-DT code ARM: imx: Remove unneeded .map_io initialization ARM: dts: imx6qdl-sabresd: Fix the microphone route ARM: imx: refactor mxc_iomux_mode() ARM: imx: simplify clk_pllv3_prepare() ARM: imx6q: drop unnecessary semicolon ARM: imx: clean up machine mxc_arch_reset_init_dt reset init ARM: dts: imx6qdl-rex: Remove unneeded 'fsl,mode' property ARM: dts: imx6qdl-gw5x: Remove unneeded 'fsl,mode' property ARM: dts: imx6qdl-sabresd: Use IMX6QDL_CLK_CKO define ARM: at91: remove useless init_time for DT-only SoCs ARM: davinci: Remove redundant casts ARM: davinci: Use standard logging styles ARM: shmobile: r8a7779: Spelling/grammar s/entity/identity/, s/map/mapping/ ARM: shmobile: sh7372: Spelling/grammar s/entity map/identity mapping/ ARM: shmobile: sh73a0: Spelling/grammar s/entity map/identity mapping/ ARM: EXYNOS: Remove unused static iomapping ARM: at91: fix build breakage due to legacy board removals ...
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/versatile/Makefile1
-rw-r--r--drivers/clk/versatile/clk-vexpress-osc.c7
-rw-r--r--drivers/clk/versatile/clk-vexpress.c86
3 files changed, 0 insertions, 94 deletions
diff --git a/drivers/clk/versatile/Makefile b/drivers/clk/versatile/Makefile
index 162e519cb0f9..8ff03744fe98 100644
--- a/drivers/clk/versatile/Makefile
+++ b/drivers/clk/versatile/Makefile
@@ -2,6 +2,5 @@
2obj-$(CONFIG_ICST) += clk-icst.o clk-versatile.o 2obj-$(CONFIG_ICST) += clk-icst.o clk-versatile.o
3obj-$(CONFIG_INTEGRATOR_IMPD1) += clk-impd1.o 3obj-$(CONFIG_INTEGRATOR_IMPD1) += clk-impd1.o
4obj-$(CONFIG_ARCH_REALVIEW) += clk-realview.o 4obj-$(CONFIG_ARCH_REALVIEW) += clk-realview.o
5obj-$(CONFIG_ARCH_VEXPRESS) += clk-vexpress.o
6obj-$(CONFIG_CLK_SP810) += clk-sp810.o 5obj-$(CONFIG_CLK_SP810) += clk-sp810.o
7obj-$(CONFIG_CLK_VEXPRESS_OSC) += clk-vexpress-osc.o 6obj-$(CONFIG_CLK_VEXPRESS_OSC) += clk-vexpress-osc.o
diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
index 529a59c0fbfa..765f1e0eeeb2 100644
--- a/drivers/clk/versatile/clk-vexpress-osc.c
+++ b/drivers/clk/versatile/clk-vexpress-osc.c
@@ -70,7 +70,6 @@ static struct clk_ops vexpress_osc_ops = {
70 70
71static int vexpress_osc_probe(struct platform_device *pdev) 71static int vexpress_osc_probe(struct platform_device *pdev)
72{ 72{
73 struct clk_lookup *cl = pdev->dev.platform_data; /* Non-DT lookup */
74 struct clk_init_data init; 73 struct clk_init_data init;
75 struct vexpress_osc *osc; 74 struct vexpress_osc *osc;
76 struct clk *clk; 75 struct clk *clk;
@@ -106,12 +105,6 @@ static int vexpress_osc_probe(struct platform_device *pdev)
106 105
107 of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, clk); 106 of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, clk);
108 107
109 /* Only happens for non-DT cases */
110 if (cl) {
111 cl->clk = clk;
112 clkdev_add(cl);
113 }
114
115 dev_dbg(&pdev->dev, "Registered clock '%s'\n", init.name); 108 dev_dbg(&pdev->dev, "Registered clock '%s'\n", init.name);
116 109
117 return 0; 110 return 0;
diff --git a/drivers/clk/versatile/clk-vexpress.c b/drivers/clk/versatile/clk-vexpress.c
deleted file mode 100644
index 2d5e1b4820e0..000000000000
--- a/drivers/clk/versatile/clk-vexpress.c
+++ /dev/null
@@ -1,86 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 * Copyright (C) 2012 ARM Limited
12 */
13
14#include <linux/amba/sp810.h>
15#include <linux/clkdev.h>
16#include <linux/clk-provider.h>
17#include <linux/err.h>
18#include <linux/vexpress.h>
19
20static struct clk *vexpress_sp810_timerclken[4];
21static DEFINE_SPINLOCK(vexpress_sp810_lock);
22
23static void __init vexpress_sp810_init(void __iomem *base)
24{
25 int i;
26
27 if (WARN_ON(!base))
28 return;
29
30 for (i = 0; i < ARRAY_SIZE(vexpress_sp810_timerclken); i++) {
31 char name[12];
32 const char *parents[] = {
33 "v2m:refclk32khz", /* REFCLK */
34 "v2m:refclk1mhz" /* TIMCLK */
35 };
36
37 snprintf(name, ARRAY_SIZE(name), "timerclken%d", i);
38
39 vexpress_sp810_timerclken[i] = clk_register_mux(NULL, name,
40 parents, 2, CLK_SET_RATE_NO_REPARENT,
41 base + SCCTRL, SCCTRL_TIMERENnSEL_SHIFT(i), 1,
42 0, &vexpress_sp810_lock);
43
44 if (WARN_ON(IS_ERR(vexpress_sp810_timerclken[i])))
45 break;
46 }
47}
48
49
50static const char * const vexpress_clk_24mhz_periphs[] __initconst = {
51 "mb:uart0", "mb:uart1", "mb:uart2", "mb:uart3",
52 "mb:mmci", "mb:kmi0", "mb:kmi1"
53};
54
55void __init vexpress_clk_init(void __iomem *sp810_base)
56{
57 struct clk *clk;
58 int i;
59
60 clk = clk_register_fixed_rate(NULL, "dummy_apb_pclk", NULL,
61 CLK_IS_ROOT, 0);
62 WARN_ON(clk_register_clkdev(clk, "apb_pclk", NULL));
63
64 clk = clk_register_fixed_rate(NULL, "v2m:clk_24mhz", NULL,
65 CLK_IS_ROOT, 24000000);
66 for (i = 0; i < ARRAY_SIZE(vexpress_clk_24mhz_periphs); i++)
67 WARN_ON(clk_register_clkdev(clk, NULL,
68 vexpress_clk_24mhz_periphs[i]));
69
70 clk = clk_register_fixed_rate(NULL, "v2m:refclk32khz", NULL,
71 CLK_IS_ROOT, 32768);
72 WARN_ON(clk_register_clkdev(clk, NULL, "v2m:wdt"));
73
74 clk = clk_register_fixed_rate(NULL, "v2m:refclk1mhz", NULL,
75 CLK_IS_ROOT, 1000000);
76
77 vexpress_sp810_init(sp810_base);
78
79 for (i = 0; i < ARRAY_SIZE(vexpress_sp810_timerclken); i++)
80 WARN_ON(clk_set_parent(vexpress_sp810_timerclken[i], clk));
81
82 WARN_ON(clk_register_clkdev(vexpress_sp810_timerclken[0],
83 "v2m-timer0", "sp804"));
84 WARN_ON(clk_register_clkdev(vexpress_sp810_timerclken[1],
85 "v2m-timer1", "sp804"));
86}