OSDN Git Service

clk: qcom: gdsc: Add support for gdscs with gds hw controller
authorRajendra Nayak <rnayak@codeaurora.org>
Tue, 1 Dec 2015 16:12:12 +0000 (21:42 +0530)
committerKyle Yan <kyan@codeaurora.org>
Wed, 29 Jun 2016 18:23:16 +0000 (11:23 -0700)
commit530b25ca4775109ae2faab5cd065166e2606daff
tree2a2f33ae781d7b9d1ed1ec73e7d48e796ecf474f
parent7546cb41d88c7c7370262a34bfaa4685a7b0f820
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.

Change-Id: I9e435ba071a9d1aa67bddc5d2c7cd7b66fb86c58
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
drivers/clk/qcom/gdsc.c
drivers/clk/qcom/gdsc.h