diff options
author | tianshuliang <tianshuliang@hisilicon.com> | 2018-03-05 15:01:31 +0800 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2018-03-12 15:56:40 +0800 |
commit | 811f67cc16ec76c3953ca1b9d7c34e3f0c17f779 (patch) | |
tree | 0039cb365be56dadac52263dc5f6bb7413e99495 /drivers/clk/hisilicon/clk.h | |
parent | 80f8ce589517c478abdae07a758b37b362886cb2 (diff) |
clk: hisilicon: add hisi phase clock support
Add a phase clock type for HiSilicon SoCs,which supports
clk_set_phase operation.
Signed-off-by: tianshuliang <tianshuliang@hisilicon.com>
Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'drivers/clk/hisilicon/clk.h')
-rw-r--r-- | drivers/clk/hisilicon/clk.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/clk/hisilicon/clk.h b/drivers/clk/hisilicon/clk.h index 4e1d1affc6f5..8d7ee5c3231b 100644 --- a/drivers/clk/hisilicon/clk.h +++ b/drivers/clk/hisilicon/clk.h @@ -68,6 +68,19 @@ struct hisi_mux_clock { const char *alias; }; +struct hisi_phase_clock { + unsigned int id; + const char *name; + const char *parent_names; + unsigned long flags; + unsigned long offset; + u8 shift; + u8 width; + u32 *phase_degrees; + u32 *phase_regvals; + u8 phase_num; +}; + struct hisi_divider_clock { unsigned int id; const char *name; @@ -120,6 +133,12 @@ int hisi_clk_register_fixed_factor(const struct hisi_fixed_factor_clock *, int, struct hisi_clock_data *); int hisi_clk_register_mux(const struct hisi_mux_clock *, int, struct hisi_clock_data *); +struct clk *clk_register_hisi_phase(struct device *dev, + const struct hisi_phase_clock *clks, + void __iomem *base, spinlock_t *lock); +int hisi_clk_register_phase(struct device *dev, + const struct hisi_phase_clock *clks, + int nums, struct hisi_clock_data *data); int hisi_clk_register_divider(const struct hisi_divider_clock *, int, struct hisi_clock_data *); int hisi_clk_register_gate(const struct hisi_gate_clock *, |