aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/tegra/clk-tegra20.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/tegra/clk-tegra20.c')
-rw-r--r--drivers/clk/tegra/clk-tegra20.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index 5d41569883a7..143ce1f899ad 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -194,6 +194,7 @@ static void __iomem *clk_base;
194static void __iomem *pmc_base; 194static void __iomem *pmc_base;
195 195
196static DEFINE_SPINLOCK(pll_div_lock); 196static DEFINE_SPINLOCK(pll_div_lock);
197static DEFINE_SPINLOCK(sysrate_lock);
197 198
198#define TEGRA_INIT_DATA_MUX(_name, _con_id, _dev_id, _parents, _offset, \ 199#define TEGRA_INIT_DATA_MUX(_name, _con_id, _dev_id, _parents, _offset, \
199 _clk_num, _regs, _gate_flags, _clk_id) \ 200 _clk_num, _regs, _gate_flags, _clk_id) \
@@ -239,8 +240,8 @@ enum tegra20_clk {
239 uartb = 96, vfir, spdif_in, spdif_out, vi, vi_sensor, tvo, cve, 240 uartb = 96, vfir, spdif_in, spdif_out, vi, vi_sensor, tvo, cve,
240 osc, clk_32k, clk_m, sclk, cclk, hclk, pclk, blink, pll_a, pll_a_out0, 241 osc, clk_32k, clk_m, sclk, cclk, hclk, pclk, blink, pll_a, pll_a_out0,
241 pll_c, pll_c_out1, pll_d, pll_d_out0, pll_e, pll_m, pll_m_out1, 242 pll_c, pll_c_out1, pll_d, pll_d_out0, pll_e, pll_m, pll_m_out1,
242 pll_p, pll_p_out1, pll_p_out2, pll_p_out3, pll_p_out4, pll_u, 243 pll_p, pll_p_out1, pll_p_out2, pll_p_out3, pll_p_out4, pll_s, pll_u,
243 pll_x, audio, pll_ref, twd, clk_max, 244 pll_x, cop, audio, pll_ref, twd, clk_max,
244}; 245};
245 246
246static struct clk *clks[clk_max]; 247static struct clk *clks[clk_max];
@@ -768,19 +769,21 @@ static void tegra20_super_clk_init(void)
768 769
769 /* HCLK */ 770 /* HCLK */
770 clk = clk_register_divider(NULL, "hclk_div", "sclk", 0, 771 clk = clk_register_divider(NULL, "hclk_div", "sclk", 0,
771 clk_base + CLK_SYSTEM_RATE, 4, 2, 0, NULL); 772 clk_base + CLK_SYSTEM_RATE, 4, 2, 0,
773 &sysrate_lock);
772 clk = clk_register_gate(NULL, "hclk", "hclk_div", CLK_SET_RATE_PARENT, 774 clk = clk_register_gate(NULL, "hclk", "hclk_div", CLK_SET_RATE_PARENT,
773 clk_base + CLK_SYSTEM_RATE, 7, 775 clk_base + CLK_SYSTEM_RATE, 7,
774 CLK_GATE_SET_TO_DISABLE, NULL); 776 CLK_GATE_SET_TO_DISABLE, &sysrate_lock);
775 clk_register_clkdev(clk, "hclk", NULL); 777 clk_register_clkdev(clk, "hclk", NULL);
776 clks[hclk] = clk; 778 clks[hclk] = clk;
777 779
778 /* PCLK */ 780 /* PCLK */
779 clk = clk_register_divider(NULL, "pclk_div", "hclk", 0, 781 clk = clk_register_divider(NULL, "pclk_div", "hclk", 0,
780 clk_base + CLK_SYSTEM_RATE, 0, 2, 0, NULL); 782 clk_base + CLK_SYSTEM_RATE, 0, 2, 0,
783 &sysrate_lock);
781 clk = clk_register_gate(NULL, "pclk", "pclk_div", CLK_SET_RATE_PARENT, 784 clk = clk_register_gate(NULL, "pclk", "pclk_div", CLK_SET_RATE_PARENT,
782 clk_base + CLK_SYSTEM_RATE, 3, 785 clk_base + CLK_SYSTEM_RATE, 3,
783 CLK_GATE_SET_TO_DISABLE, NULL); 786 CLK_GATE_SET_TO_DISABLE, &sysrate_lock);
784 clk_register_clkdev(clk, "pclk", NULL); 787 clk_register_clkdev(clk, "pclk", NULL);
785 clks[pclk] = clk; 788 clks[pclk] = clk;
786 789
@@ -1251,8 +1254,11 @@ static __initdata struct tegra_clk_init_table init_table[] = {
1251 {csite, clk_max, 0, 1}, 1254 {csite, clk_max, 0, 1},
1252 {emc, clk_max, 0, 1}, 1255 {emc, clk_max, 0, 1},
1253 {cclk, clk_max, 0, 1}, 1256 {cclk, clk_max, 0, 1},
1254 {uarta, pll_p, 0, 1}, 1257 {uarta, pll_p, 0, 0},
1255 {uartd, pll_p, 0, 1}, 1258 {uartb, pll_p, 0, 0},
1259 {uartc, pll_p, 0, 0},
1260 {uartd, pll_p, 0, 0},
1261 {uarte, pll_p, 0, 0},
1256 {usbd, clk_max, 12000000, 0}, 1262 {usbd, clk_max, 12000000, 0},
1257 {usb2, clk_max, 12000000, 0}, 1263 {usb2, clk_max, 12000000, 0},
1258 {usb3, clk_max, 12000000, 0}, 1264 {usb3, clk_max, 12000000, 0},