summaryrefslogtreecommitdiffstats
path: root/drivers/clk/hisilicon/clk.h
diff options
context:
space:
mode:
authortianshuliang2018-03-05 08:01:31 +0100
committerShawn Guo2018-03-12 08:56:40 +0100
commit811f67cc16ec76c3953ca1b9d7c34e3f0c17f779 (patch)
tree0039cb365be56dadac52263dc5f6bb7413e99495 /drivers/clk/hisilicon/clk.h
parentclk: hi3798cv200: add COMBPHY0 clock support (diff)
downloadkernel-qcow2-linux-811f67cc16ec76c3953ca1b9d7c34e3f0c17f779.tar.gz
kernel-qcow2-linux-811f67cc16ec76c3953ca1b9d7c34e3f0c17f779.tar.xz
kernel-qcow2-linux-811f67cc16ec76c3953ca1b9d7c34e3f0c17f779.zip
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.h19
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 *,