aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk/qcom/clk-hfpll.h
diff options
context:
space:
mode:
authorAndrey Konovalov <andrey.konovalov@linaro.org>2015-11-19 13:01:56 +0300
committerAndrey Konovalov <andrey.konovalov@linaro.org>2015-11-19 13:01:56 +0300
commit4b131c9bf8af9bc7a25441251f60a8ca7fc69c07 (patch)
treeba0bc4861f2f606b088b09c53389f06e88a69894 /drivers/clk/qcom/clk-hfpll.h
parentd4e209db57abe07163fe84b43b533a4b6246b0c3 (diff)
parent08fad54a88981323247c7199ccbb8d42c596466a (diff)
Automatically merging tracking-integration-linux-qcomlt into merge-linux-linaroHEADll-20151119.0linux-linaro-4.3-2015.11ll_20151119.0linux-linaro
Conflicting files:
Diffstat (limited to 'drivers/clk/qcom/clk-hfpll.h')
-rw-r--r--drivers/clk/qcom/clk-hfpll.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/clk/qcom/clk-hfpll.h b/drivers/clk/qcom/clk-hfpll.h
new file mode 100644
index 000000000000..48c18d664f4e
--- /dev/null
+++ b/drivers/clk/qcom/clk-hfpll.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#ifndef __QCOM_CLK_HFPLL_H__
+#define __QCOM_CLK_HFPLL_H__
+
+#include <linux/clk-provider.h>
+#include <linux/spinlock.h>
+#include "clk-regmap.h"
+
+struct hfpll_data {
+ u32 mode_reg;
+ u32 l_reg;
+ u32 m_reg;
+ u32 n_reg;
+ u32 user_reg;
+ u32 droop_reg;
+ u32 config_reg;
+ u32 status_reg;
+ u8 lock_bit;
+
+ u32 droop_val;
+ u32 config_val;
+ u32 user_val;
+ u32 user_vco_mask;
+ unsigned long low_vco_max_rate;
+
+ unsigned long min_rate;
+ unsigned long max_rate;
+};
+
+struct clk_hfpll {
+ struct hfpll_data const *d;
+ int init_done;
+
+ struct clk_regmap clkr;
+ spinlock_t lock;
+};
+
+#define to_clk_hfpll(_hw) \
+ container_of(to_clk_regmap(_hw), struct clk_hfpll, clkr)
+
+extern const struct clk_ops clk_ops_hfpll;
+
+#endif