aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2015-07-16 04:55:57 -0400
committerTony Lindgren <tony@atomide.com>2015-07-16 05:09:33 -0400
commit9cf705de06a27cc99874626c9717b32e9874b3bb (patch)
treef34ad6e6aba6e868cb1bf61c62c42326c57872b9
parent7c80a3f89c51cfa935493a81b401c4e93f0c0f90 (diff)
ARM: OMAP2+: Add support for initializing dm814x clocks
Let's add a minimal clocks for dm814x to get it booted. This is mostly a placeholder and relies on the PLLs being on from the bootloader. Note that the divider clocks work the same way as on dm816x and am335x. Cc: Matthijs van Duin <matthijsvanduin@gmail.com> Cc: Mike Turquette <mturquette@linaro.org> Cc: Paul Walmsley <paul@pwsan.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Tero Kristo <t-kristo@ti.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/io.c4
-rw-r--r--drivers/clk/ti/Makefile2
-rw-r--r--drivers/clk/ti/clk-814x.c31
-rw-r--r--drivers/clk/ti/clk-816x.c2
-rw-r--r--include/linux/clk/ti.h3
5 files changed, 37 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 6779a9ff0d10..596af73c7549 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -558,7 +558,7 @@ void __init ti814x_init_early(void)
558 ti81xx_hwmod_init(); 558 ti81xx_hwmod_init();
559 omap_hwmod_init_postsetup(); 559 omap_hwmod_init_postsetup();
560 if (of_have_populated_dt()) 560 if (of_have_populated_dt())
561 omap_clk_soc_init = ti81xx_dt_clk_init; 561 omap_clk_soc_init = dm814x_dt_clk_init;
562} 562}
563 563
564void __init ti816x_init_early(void) 564void __init ti816x_init_early(void)
@@ -575,7 +575,7 @@ void __init ti816x_init_early(void)
575 ti81xx_hwmod_init(); 575 ti81xx_hwmod_init();
576 omap_hwmod_init_postsetup(); 576 omap_hwmod_init_postsetup();
577 if (of_have_populated_dt()) 577 if (of_have_populated_dt())
578 omap_clk_soc_init = ti81xx_dt_clk_init; 578 omap_clk_soc_init = dm816x_dt_clk_init;
579} 579}
580#endif 580#endif
581 581
diff --git a/drivers/clk/ti/Makefile b/drivers/clk/ti/Makefile
index 105ffd0f5e79..80b42884a0e9 100644
--- a/drivers/clk/ti/Makefile
+++ b/drivers/clk/ti/Makefile
@@ -2,7 +2,7 @@ obj-y += clk.o autoidle.o clockdomain.o
2clk-common = dpll.o composite.o divider.o gate.o \ 2clk-common = dpll.o composite.o divider.o gate.o \
3 fixed-factor.o mux.o apll.o 3 fixed-factor.o mux.o apll.o
4obj-$(CONFIG_SOC_AM33XX) += $(clk-common) clk-33xx.o 4obj-$(CONFIG_SOC_AM33XX) += $(clk-common) clk-33xx.o
5obj-$(CONFIG_SOC_TI81XX) += $(clk-common) fapll.o clk-816x.o 5obj-$(CONFIG_SOC_TI81XX) += $(clk-common) fapll.o clk-814x.o clk-816x.o
6obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o 6obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o
7obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o \ 7obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o \
8 clk-3xxx.o 8 clk-3xxx.o
diff --git a/drivers/clk/ti/clk-814x.c b/drivers/clk/ti/clk-814x.c
new file mode 100644
index 000000000000..d490d427cc20
--- /dev/null
+++ b/drivers/clk/ti/clk-814x.c
@@ -0,0 +1,31 @@
1/*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License as
4 * published by the Free Software Foundation version 2.
5 */
6
7#include <linux/kernel.h>
8#include <linux/clk-provider.h>
9#include <linux/clk/ti.h>
10
11static struct ti_dt_clk dm814_clks[] = {
12 DT_CLK(NULL, "devosc_ck", "devosc_ck"),
13 DT_CLK(NULL, "mpu_ck", "mpu_ck"),
14 DT_CLK(NULL, "sysclk4_ck", "sysclk4_ck"),
15 DT_CLK(NULL, "sysclk6_ck", "sysclk6_ck"),
16 DT_CLK(NULL, "sysclk10_ck", "sysclk10_ck"),
17 DT_CLK(NULL, "sysclk18_ck", "sysclk18_ck"),
18 DT_CLK(NULL, "timer_sys_ck", "devosc_ck"),
19 DT_CLK(NULL, "cpsw_125mhz_gclk", "cpsw_125mhz_gclk"),
20 DT_CLK(NULL, "cpsw_cpts_rft_clk", "cpsw_cpts_rft_clk"),
21 { .node_name = NULL },
22};
23
24int __init dm814x_dt_clk_init(void)
25{
26 ti_dt_clocks_register(dm814_clks);
27 omap2_clk_disable_autoidle_all();
28 omap2_clk_enable_init_clocks(NULL, 0);
29
30 return 0;
31}
diff --git a/drivers/clk/ti/clk-816x.c b/drivers/clk/ti/clk-816x.c
index 9451e651a1ff..43d07456e78d 100644
--- a/drivers/clk/ti/clk-816x.c
+++ b/drivers/clk/ti/clk-816x.c
@@ -42,7 +42,7 @@ static const char *enable_init_clks[] = {
42 "ddr_pll_clk3", 42 "ddr_pll_clk3",
43}; 43};
44 44
45int __init ti81xx_dt_clk_init(void) 45int __init dm816x_dt_clk_init(void)
46{ 46{
47 ti_dt_clocks_register(dm816x_clks); 47 ti_dt_clocks_register(dm816x_clks);
48 omap2_clk_disable_autoidle_all(); 48 omap2_clk_disable_autoidle_all();
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h
index 79b76e13d904..1736e29cee1b 100644
--- a/include/linux/clk/ti.h
+++ b/include/linux/clk/ti.h
@@ -329,7 +329,8 @@ int ti_clk_add_component(struct device_node *node, struct clk_hw *hw, int type);
329int omap3430_dt_clk_init(void); 329int omap3430_dt_clk_init(void);
330int omap3630_dt_clk_init(void); 330int omap3630_dt_clk_init(void);
331int am35xx_dt_clk_init(void); 331int am35xx_dt_clk_init(void);
332int ti81xx_dt_clk_init(void); 332int dm814x_dt_clk_init(void);
333int dm816x_dt_clk_init(void);
333int omap4xxx_dt_clk_init(void); 334int omap4xxx_dt_clk_init(void);
334int omap5xxx_dt_clk_init(void); 335int omap5xxx_dt_clk_init(void);
335int dra7xx_dt_clk_init(void); 336int dra7xx_dt_clk_init(void);