aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:48:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:48:22 -0500
commit3a647c1d7ab08145cee4b650f5e797d168846c51 (patch)
tree6fcbc8ad1fc69b5a99214e22f6084452bdf0131c /drivers/clk
parent6cd94d5e57ab97ddd672b707ab4bb639672c1727 (diff)
parent5db45002576f7d60c5bf7b23e277845cd3e806be (diff)
Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Arnd Bergmann: "These are changes for drivers that are intimately tied to some SoC and for some reason could not get merged through the respective subsystem maintainer tree. The largest single change here this time around is the Tegra iommu/memory controller driver, which gets updated to the new iommu DT binding. More drivers like this are likely to follow for the following merge window, but we should be able to do those through the iommu maintainer. Other notable changes are: - reset controller drivers from the reset maintainer (socfpga, sti, berlin) - fixes for the keystone navigator driver merged last time - at91 rtc driver changes related to the at91 cleanups - ARM perf driver changes from Will Deacon - updates for the brcmstb_gisb driver" * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits) clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers clocksource: arch_timer: Fix code to use physical timers when requested memory: Add NVIDIA Tegra memory controller support bus: brcmstb_gisb: Add register offset tables for older chips bus: brcmstb_gisb: Look up register offsets in a table bus: brcmstb_gisb: Introduce wrapper functions for MMIO accesses bus: brcmstb_gisb: Make the driver buildable on MIPS of: Add NVIDIA Tegra memory controller binding ARM: tegra: Move AHB Kconfig to drivers/amba amba: Add Kconfig file clk: tegra: Implement memory-controller clock serial: samsung: Fix serial config dependencies for exynos7 bus: brcmstb_gisb: resolve section mismatch ARM: common: edma: edma_pm_resume may be unused ARM: common: edma: add suspend resume hook powerpc/iommu: Rename iommu_[un]map_sg functions rtc: at91sam9: add DT bindings documentation rtc: at91sam9: use clk API instead of relying on AT91_SLOW_CLOCK ARM: at91: add clk_lookup entry for RTT devices rtc: at91sam9: rework the Kconfig description ...
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/tegra/clk-divider.c13
-rw-r--r--drivers/clk/tegra/clk-tegra114.c7
-rw-r--r--drivers/clk/tegra/clk-tegra124.c7
-rw-r--r--drivers/clk/tegra/clk-tegra20.c8
-rw-r--r--drivers/clk/tegra/clk-tegra30.c7
-rw-r--r--drivers/clk/tegra/clk.h2
6 files changed, 40 insertions, 4 deletions
diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
index 290f9c1a3749..59a5714dfe18 100644
--- a/drivers/clk/tegra/clk-divider.c
+++ b/drivers/clk/tegra/clk-divider.c
@@ -185,3 +185,16 @@ struct clk *tegra_clk_register_divider(const char *name,
185 185
186 return clk; 186 return clk;
187} 187}
188
189static const struct clk_div_table mc_div_table[] = {
190 { .val = 0, .div = 2 },
191 { .val = 1, .div = 1 },
192 { .val = 0, .div = 0 },
193};
194
195struct clk *tegra_clk_register_mc(const char *name, const char *parent_name,
196 void __iomem *reg, spinlock_t *lock)
197{
198 return clk_register_divider_table(NULL, name, parent_name, 0, reg,
199 16, 1, 0, mc_div_table, lock);
200}
diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c
index f760f31d05c4..0b03d2cf7264 100644
--- a/drivers/clk/tegra/clk-tegra114.c
+++ b/drivers/clk/tegra/clk-tegra114.c
@@ -173,6 +173,7 @@ static DEFINE_SPINLOCK(pll_d_lock);
173static DEFINE_SPINLOCK(pll_d2_lock); 173static DEFINE_SPINLOCK(pll_d2_lock);
174static DEFINE_SPINLOCK(pll_u_lock); 174static DEFINE_SPINLOCK(pll_u_lock);
175static DEFINE_SPINLOCK(pll_re_lock); 175static DEFINE_SPINLOCK(pll_re_lock);
176static DEFINE_SPINLOCK(emc_lock);
176 177
177static struct div_nmp pllxc_nmp = { 178static struct div_nmp pllxc_nmp = {
178 .divm_shift = 0, 179 .divm_shift = 0,
@@ -1228,7 +1229,11 @@ static __init void tegra114_periph_clk_init(void __iomem *clk_base,
1228 ARRAY_SIZE(mux_pllmcp_clkm), 1229 ARRAY_SIZE(mux_pllmcp_clkm),
1229 CLK_SET_RATE_NO_REPARENT, 1230 CLK_SET_RATE_NO_REPARENT,
1230 clk_base + CLK_SOURCE_EMC, 1231 clk_base + CLK_SOURCE_EMC,
1231 29, 3, 0, NULL); 1232 29, 3, 0, &emc_lock);
1233
1234 clk = tegra_clk_register_mc("mc", "emc_mux", clk_base + CLK_SOURCE_EMC,
1235 &emc_lock);
1236 clks[TEGRA114_CLK_MC] = clk;
1232 1237
1233 for (i = 0; i < ARRAY_SIZE(tegra_periph_clk_list); i++) { 1238 for (i = 0; i < ARRAY_SIZE(tegra_periph_clk_list); i++) {
1234 data = &tegra_periph_clk_list[i]; 1239 data = &tegra_periph_clk_list[i];
diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c
index e3a85842ce0c..f5f9baca7bb6 100644
--- a/drivers/clk/tegra/clk-tegra124.c
+++ b/drivers/clk/tegra/clk-tegra124.c
@@ -132,6 +132,7 @@ static DEFINE_SPINLOCK(pll_d2_lock);
132static DEFINE_SPINLOCK(pll_e_lock); 132static DEFINE_SPINLOCK(pll_e_lock);
133static DEFINE_SPINLOCK(pll_re_lock); 133static DEFINE_SPINLOCK(pll_re_lock);
134static DEFINE_SPINLOCK(pll_u_lock); 134static DEFINE_SPINLOCK(pll_u_lock);
135static DEFINE_SPINLOCK(emc_lock);
135 136
136/* possible OSC frequencies in Hz */ 137/* possible OSC frequencies in Hz */
137static unsigned long tegra124_input_freq[] = { 138static unsigned long tegra124_input_freq[] = {
@@ -1127,7 +1128,11 @@ static __init void tegra124_periph_clk_init(void __iomem *clk_base,
1127 clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm, 1128 clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm,
1128 ARRAY_SIZE(mux_pllmcp_clkm), 0, 1129 ARRAY_SIZE(mux_pllmcp_clkm), 0,
1129 clk_base + CLK_SOURCE_EMC, 1130 clk_base + CLK_SOURCE_EMC,
1130 29, 3, 0, NULL); 1131 29, 3, 0, &emc_lock);
1132
1133 clk = tegra_clk_register_mc("mc", "emc_mux", clk_base + CLK_SOURCE_EMC,
1134 &emc_lock);
1135 clks[TEGRA124_CLK_MC] = clk;
1131 1136
1132 /* cml0 */ 1137 /* cml0 */
1133 clk = clk_register_gate(NULL, "cml0", "pll_e", 0, clk_base + PLLE_AUX, 1138 clk = clk_register_gate(NULL, "cml0", "pll_e", 0, clk_base + PLLE_AUX,
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index dace2b1b5ae6..41272dcc9e22 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -140,6 +140,8 @@ static struct cpu_clk_suspend_context {
140static void __iomem *clk_base; 140static void __iomem *clk_base;
141static void __iomem *pmc_base; 141static void __iomem *pmc_base;
142 142
143static DEFINE_SPINLOCK(emc_lock);
144
143#define TEGRA_INIT_DATA_MUX(_name, _parents, _offset, \ 145#define TEGRA_INIT_DATA_MUX(_name, _parents, _offset, \
144 _clk_num, _gate_flags, _clk_id) \ 146 _clk_num, _gate_flags, _clk_id) \
145 TEGRA_INIT_DATA(_name, NULL, NULL, _parents, _offset, \ 147 TEGRA_INIT_DATA(_name, NULL, NULL, _parents, _offset, \
@@ -819,11 +821,15 @@ static void __init tegra20_periph_clk_init(void)
819 ARRAY_SIZE(mux_pllmcp_clkm), 821 ARRAY_SIZE(mux_pllmcp_clkm),
820 CLK_SET_RATE_NO_REPARENT, 822 CLK_SET_RATE_NO_REPARENT,
821 clk_base + CLK_SOURCE_EMC, 823 clk_base + CLK_SOURCE_EMC,
822 30, 2, 0, NULL); 824 30, 2, 0, &emc_lock);
823 clk = tegra_clk_register_periph_gate("emc", "emc_mux", 0, clk_base, 0, 825 clk = tegra_clk_register_periph_gate("emc", "emc_mux", 0, clk_base, 0,
824 57, periph_clk_enb_refcnt); 826 57, periph_clk_enb_refcnt);
825 clks[TEGRA20_CLK_EMC] = clk; 827 clks[TEGRA20_CLK_EMC] = clk;
826 828
829 clk = tegra_clk_register_mc("mc", "emc_mux", clk_base + CLK_SOURCE_EMC,
830 &emc_lock);
831 clks[TEGRA20_CLK_MC] = clk;
832
827 /* dsi */ 833 /* dsi */
828 clk = tegra_clk_register_periph_gate("dsi", "pll_d", 0, clk_base, 0, 834 clk = tegra_clk_register_periph_gate("dsi", "pll_d", 0, clk_base, 0,
829 48, periph_clk_enb_refcnt); 835 48, periph_clk_enb_refcnt);
diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
index 5bbacd01094f..4b9d8bd3d0bf 100644
--- a/drivers/clk/tegra/clk-tegra30.c
+++ b/drivers/clk/tegra/clk-tegra30.c
@@ -177,6 +177,7 @@ static unsigned long input_freq;
177 177
178static DEFINE_SPINLOCK(cml_lock); 178static DEFINE_SPINLOCK(cml_lock);
179static DEFINE_SPINLOCK(pll_d_lock); 179static DEFINE_SPINLOCK(pll_d_lock);
180static DEFINE_SPINLOCK(emc_lock);
180 181
181#define TEGRA_INIT_DATA_MUX(_name, _parents, _offset, \ 182#define TEGRA_INIT_DATA_MUX(_name, _parents, _offset, \
182 _clk_num, _gate_flags, _clk_id) \ 183 _clk_num, _gate_flags, _clk_id) \
@@ -1157,11 +1158,15 @@ static void __init tegra30_periph_clk_init(void)
1157 ARRAY_SIZE(mux_pllmcp_clkm), 1158 ARRAY_SIZE(mux_pllmcp_clkm),
1158 CLK_SET_RATE_NO_REPARENT, 1159 CLK_SET_RATE_NO_REPARENT,
1159 clk_base + CLK_SOURCE_EMC, 1160 clk_base + CLK_SOURCE_EMC,
1160 30, 2, 0, NULL); 1161 30, 2, 0, &emc_lock);
1161 clk = tegra_clk_register_periph_gate("emc", "emc_mux", 0, clk_base, 0, 1162 clk = tegra_clk_register_periph_gate("emc", "emc_mux", 0, clk_base, 0,
1162 57, periph_clk_enb_refcnt); 1163 57, periph_clk_enb_refcnt);
1163 clks[TEGRA30_CLK_EMC] = clk; 1164 clks[TEGRA30_CLK_EMC] = clk;
1164 1165
1166 clk = tegra_clk_register_mc("mc", "emc_mux", clk_base + CLK_SOURCE_EMC,
1167 &emc_lock);
1168 clks[TEGRA30_CLK_MC] = clk;
1169
1165 /* cml0 */ 1170 /* cml0 */
1166 clk = clk_register_gate(NULL, "cml0", "pll_e", 0, clk_base + PLLE_AUX, 1171 clk = clk_register_gate(NULL, "cml0", "pll_e", 0, clk_base + PLLE_AUX,
1167 0, 0, &cml_lock); 1172 0, 0, &cml_lock);
diff --git a/drivers/clk/tegra/clk.h b/drivers/clk/tegra/clk.h
index 16ec8d6bb87f..4e458aa8d45c 100644
--- a/drivers/clk/tegra/clk.h
+++ b/drivers/clk/tegra/clk.h
@@ -86,6 +86,8 @@ struct clk *tegra_clk_register_divider(const char *name,
86 const char *parent_name, void __iomem *reg, 86 const char *parent_name, void __iomem *reg,
87 unsigned long flags, u8 clk_divider_flags, u8 shift, u8 width, 87 unsigned long flags, u8 clk_divider_flags, u8 shift, u8 width,
88 u8 frac_width, spinlock_t *lock); 88 u8 frac_width, spinlock_t *lock);
89struct clk *tegra_clk_register_mc(const char *name, const char *parent_name,
90 void __iomem *reg, spinlock_t *lock);
89 91
90/* 92/*
91 * Tegra PLL: 93 * Tegra PLL: