summaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom/gdsc.h
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@codeaurora.org>2015-12-01 21:42:12 +0530
committerStephen Boyd <sboyd@codeaurora.org>2016-02-11 16:24:03 -0800
commit77b1067a19b4986b009f3279cc6b8ad1d29ff51c (patch)
tree0cbe30f554030b78b0bf9779a5d554aeb4f6e43a /drivers/clk/qcom/gdsc.h
parentc2c7f0a47493ae23f9a76fabdbdd4f25e1de0925 (diff)
downloadlinux-77b1067a19b4986b009f3279cc6b8ad1d29ff51c.tar.bz2
clk: qcom: gdsc: Add support for gdscs with gds hw controller
Some gdsc power domains can have a gds_hw_controller block inside to help ensure all slave devices within the power domain are idle before the gdsc is actually switched off. This is mainly useful in power domains which host a MMU, in which case its necessary to make sure there are no outstanding MMU operations or pending bus transactions before the power domain is turned off. In gdscs with gds_hw_controller block, its necessary to check the gds_hw_ctrl status bits instead of the ones in gdscr, to determine the state of the powerdomain. While at it, also move away from using jiffies and use ktime APIs instead for busy looping on status bits. Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/qcom/gdsc.h')
-rw-r--r--drivers/clk/qcom/gdsc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/qcom/gdsc.h b/drivers/clk/qcom/gdsc.h
index 4e9dfc11ef57..66a43beb9f57 100644
--- a/drivers/clk/qcom/gdsc.h
+++ b/drivers/clk/qcom/gdsc.h
@@ -32,6 +32,7 @@ struct reset_controller_dev;
* @pd: generic power domain
* @regmap: regmap for MMIO accesses
* @gdscr: gsdc control register
+ * @gds_hw_ctrl: gds_hw_ctrl register
* @cxcs: offsets of branch registers to toggle mem/periph bits in
* @cxc_count: number of @cxcs
* @pwrsts: Possible powerdomain power states
@@ -44,6 +45,7 @@ struct gdsc {
struct generic_pm_domain *parent;
struct regmap *regmap;
unsigned int gdscr;
+ unsigned int gds_hw_ctrl;
unsigned int *cxcs;
unsigned int cxc_count;
const u8 pwrsts;