summaryrefslogtreecommitdiffstats
path: root/drivers/clk/tegra/clk.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2015-04-20 14:34:57 +0200
committerThierry Reding <treding@nvidia.com>2016-04-28 12:41:47 +0200
commit1ec7032ad517714108cc53a6ee7067276ca21e80 (patch)
treee852e5e9f0788c4dc448f0c9fe41c43e533a82f8 /drivers/clk/tegra/clk.h
parent07314fc108e195044c074f4b443974b5aaa2d5d7 (diff)
downloadlinux-1ec7032ad517714108cc53a6ee7067276ca21e80.tar.bz2
clk: tegra: Add fixed factor peripheral clock type
Some of the peripheral clocks on Tegra are derived from one of the top- level PLLs with a fixed factor. Support these clocks by implementing the ->enable() and ->disable() callbacks using the peripheral clock register banks and the ->recalc_rate() by dividing the parent rate by the fixed factor. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/clk/tegra/clk.h')
-rw-r--r--drivers/clk/tegra/clk.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/clk/tegra/clk.h b/drivers/clk/tegra/clk.h
index 3ef530a8989d..7264f17e269e 100644
--- a/drivers/clk/tegra/clk.h
+++ b/drivers/clk/tegra/clk.h
@@ -516,6 +516,23 @@ struct clk *tegra_clk_register_periph_gate(const char *name,
const char *parent_name, u8 gate_flags, void __iomem *clk_base,
unsigned long flags, int clk_num, int *enable_refcnt);
+struct tegra_clk_periph_fixed {
+ struct clk_hw hw;
+ void __iomem *base;
+ const struct tegra_clk_periph_regs *regs;
+ unsigned int mul;
+ unsigned int div;
+ unsigned int num;
+};
+
+struct clk *tegra_clk_register_periph_fixed(const char *name,
+ const char *parent,
+ unsigned long flags,
+ void __iomem *base,
+ unsigned int mul,
+ unsigned int div,
+ unsigned int num);
+
/**
* struct clk-periph - peripheral clock
*