diff options
| author | Odelu Kukatla <okukatla@codeaurora.org> | 2016-07-09 21:30:24 +0530 |
|---|---|---|
| committer | Odelu Kukatla <okukatla@codeaurora.org> | 2016-08-07 03:33:06 +0530 |
| commit | 405ccdf00c15ded98c601481b00ceb692020fea5 (patch) | |
| tree | 9f98be2498c0ddb23bb2b068477333015ecbfb88 /drivers | |
| parent | 28352998dee80f33641dd7b28479350bd480b823 (diff) | |
clk: qcom: Add support to not check for branch halt status
The new flag BRANCH_HALT_NO_CHECK_ON_DISABLE is required if a branch
is not required to check for branch halt status during clock disable.
Change-Id: I8b9f6ed33193a465bfa44b86430e8ade3466f560
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/clk/qcom/clk-branch.c | 5 | ||||
| -rw-r--r-- | drivers/clk/qcom/clk-branch.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c index 26f7af315066..3d7b14a8ef28 100644 --- a/drivers/clk/qcom/clk-branch.c +++ b/drivers/clk/qcom/clk-branch.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2013, 2016, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -83,6 +83,9 @@ static int clk_branch_wait(const struct clk_branch *br, bool enabling, if (br->halt_check == BRANCH_HALT_DELAY || (!enabling && voted)) { udelay(10); + } else if ((br->halt_check == BRANCH_HALT_NO_CHECK_ON_DISABLE) && + !enabling) { + return 0; } else if (br->halt_check == BRANCH_HALT_ENABLE || br->halt_check == BRANCH_HALT || (enabling && voted)) { diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h index 284df3f3c55f..074c16c4e845 100644 --- a/drivers/clk/qcom/clk-branch.h +++ b/drivers/clk/qcom/clk-branch.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2013, 2016, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -42,6 +42,10 @@ struct clk_branch { #define BRANCH_HALT_ENABLE 1 /* pol: 0 = halt */ #define BRANCH_HALT_ENABLE_VOTED (BRANCH_HALT_ENABLE | BRANCH_VOTED) #define BRANCH_HALT_DELAY 2 /* No bit to check; just delay */ +/* No halt check during clk disable for the clocks controlled by other masters + * via voting registers like SMMU clocks. + */ +#define BRANCH_HALT_NO_CHECK_ON_DISABLE 4 struct clk_regmap clkr; }; |
