diff options
Diffstat (limited to 'drivers/clk/tegra/clk-tegra20.c')
-rw-r--r-- | drivers/clk/tegra/clk-tegra20.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index 5d41569883a7..4612b2e4a5a9 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c | |||
@@ -194,6 +194,7 @@ static void __iomem *clk_base; | |||
194 | static void __iomem *pmc_base; | 194 | static void __iomem *pmc_base; |
195 | 195 | ||
196 | static DEFINE_SPINLOCK(pll_div_lock); | 196 | static DEFINE_SPINLOCK(pll_div_lock); |
197 | static 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) \ |
@@ -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 | ||