2023-05-31 09:17:56

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH 0/4] MMCC MSM8998 fixes

8998 has a couple of issues related to its clock controllers. This series
attemps to fix some of them.

The DT patch should go in first for bisectability, otherwise
clk/pd_ignore_unused will need to be used, as the SMMU GDSC is no longer
considered always-on.

This series results in less "clk stuck at 'on/off'" messages and should
marginally reduce power consumption.

Signed-off-by: Konrad Dybcio <[email protected]>
---
Konrad Dybcio (4):
arm64: dts: qcom: msm8998: Properly describe MMSS SMMU
clk: qcom: gcc-msm8998: Don't check halt bit on some branch clks
clk: qcom: mmcc-msm8998: Don't check halt bit on some branch clks
clk: qcom: mmcc-msm8998: Fix the SMMU GDSC

arch/arm64/boot/dts/qcom/msm8998.dtsi | 8 +++++---
drivers/clk/qcom/gcc-msm8998.c | 6 +++---
drivers/clk/qcom/mmcc-msm8998.c | 7 ++++++-
3 files changed, 14 insertions(+), 7 deletions(-)
---
base-commit: d4cee89031c80066ec461bb77b5e13a4f37d5fd2
change-id: 20230531-topic-8998_mmssclk-fd4b2fb7f8c1

Best regards,
--
Konrad Dybcio <[email protected]>



2023-05-31 09:20:13

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH 3/4] clk: qcom: mmcc-msm8998: Don't check halt bit on some branch clks

Some branch clocks are governed externally and we're only supposed to
send a request concerning their shutdown, not actually ensure it happens.

Use the BRANCH_HALT_SKIP define to skip checking the halt bit.

Fixes: d14b15b5931c ("clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver")
Signed-off-by: Konrad Dybcio <[email protected]>
---
drivers/clk/qcom/mmcc-msm8998.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/clk/qcom/mmcc-msm8998.c b/drivers/clk/qcom/mmcc-msm8998.c
index 4490594bde69..9b98e0fb8b91 100644
--- a/drivers/clk/qcom/mmcc-msm8998.c
+++ b/drivers/clk/qcom/mmcc-msm8998.c
@@ -2453,6 +2453,7 @@ static struct clk_branch fd_ahb_clk = {

static struct clk_branch mnoc_ahb_clk = {
.halt_reg = 0x5024,
+ .halt_check = BRANCH_HALT_SKIP,
.clkr = {
.enable_reg = 0x5024,
.enable_mask = BIT(0),
@@ -2468,6 +2469,7 @@ static struct clk_branch mnoc_ahb_clk = {

static struct clk_branch bimc_smmu_ahb_clk = {
.halt_reg = 0xe004,
+ .halt_check = BRANCH_HALT_SKIP,
.hwcg_reg = 0xe004,
.hwcg_bit = 1,
.clkr = {
@@ -2485,6 +2487,7 @@ static struct clk_branch bimc_smmu_ahb_clk = {

static struct clk_branch bimc_smmu_axi_clk = {
.halt_reg = 0xe008,
+ .halt_check = BRANCH_HALT_SKIP,
.hwcg_reg = 0xe008,
.hwcg_bit = 1,
.clkr = {

--
2.40.1


2023-06-02 14:25:04

by Jeffrey Hugo

[permalink] [raw]
Subject: Re: [PATCH 3/4] clk: qcom: mmcc-msm8998: Don't check halt bit on some branch clks

On 5/31/2023 3:01 AM, Konrad Dybcio wrote:
> Some branch clocks are governed externally and we're only supposed to
> send a request concerning their shutdown, not actually ensure it happens.
>
> Use the BRANCH_HALT_SKIP define to skip checking the halt bit.
>
> Fixes: d14b15b5931c ("clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver")
> Signed-off-by: Konrad Dybcio <[email protected]>

Reviewed-by: Jeffrey Hugo <[email protected]>