diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2013-09-02 08:22:02 -0400 |
---|---|---|
committer | Peter De Schrijver <pdeschrijver@nvidia.com> | 2013-11-26 11:46:18 -0500 |
commit | 343a607cb79259429afbb9820bf524d33084e66c (patch) | |
tree | 508757a525821d7aad6c6d24caa72447c95907bf /drivers/clk/tegra/clk-periph.c | |
parent | d5ff89a82a6d272d210db68a9487877682c94a24 (diff) |
clk: tegra: common periph_clk_enb_refcnt and clks
This patch makes periph_clk_enb_refcnt a global array, dynamically allocated
at boottime. It simplifies the macros somewhat and allows clocks common to
several Tegra SoCs to be defined in a separate files. Also the clks array
becomes global and dynamically allocated which allows the DT registration to
be moved to a generic funcion.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Diffstat (limited to 'drivers/clk/tegra/clk-periph.c')
-rw-r--r-- | drivers/clk/tegra/clk-periph.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c index 735b0243261c..5102d5e58c04 100644 --- a/drivers/clk/tegra/clk-periph.c +++ b/drivers/clk/tegra/clk-periph.c | |||
@@ -197,6 +197,7 @@ static struct clk *_tegra_clk_register_periph(const char *name, | |||
197 | periph->divider.reg = div ? (clk_base + offset) : NULL; | 197 | periph->divider.reg = div ? (clk_base + offset) : NULL; |
198 | periph->gate.clk_base = clk_base; | 198 | periph->gate.clk_base = clk_base; |
199 | periph->gate.regs = bank; | 199 | periph->gate.regs = bank; |
200 | periph->gate.enable_refcnt = periph_clk_enb_refcnt; | ||
200 | 201 | ||
201 | clk = clk_register(NULL, &periph->hw); | 202 | clk = clk_register(NULL, &periph->hw); |
202 | if (IS_ERR(clk)) | 203 | if (IS_ERR(clk)) |