Re: [PATCH v2] clk: qcom: camcc: Update the clock ops for the SC7180

2021-03-29 Thread Stephen Boyd
Quoting Taniya Das (2021-03-26 18:41:05)
> Some of the RCGs could be always ON from the XO source and could be used
> as the clock on signal for the GDSC to be operational. In the cases where
> the GDSCs are parked at different source with the source clock disabled,
> it could lead to the GDSC to be stuck at ON/OFF during gdsc disable/enable.
> Thus park the RCGs at XO during clock disable and update the rcg_ops to
> use the shared_ops.
> 
> Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver 
> for SC7180")
> Signed-off-by: Taniya Das 
> ---

Applied to clk-fixes


[PATCH v2] clk: qcom: camcc: Update the clock ops for the SC7180

2021-03-26 Thread Taniya Das
Some of the RCGs could be always ON from the XO source and could be used
as the clock on signal for the GDSC to be operational. In the cases where
the GDSCs are parked at different source with the source clock disabled,
it could lead to the GDSC to be stuck at ON/OFF during gdsc disable/enable.
Thus park the RCGs at XO during clock disable and update the rcg_ops to
use the shared_ops.

Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for 
SC7180")
Signed-off-by: Taniya Das 
---
 drivers/clk/qcom/camcc-sc7180.c | 50 -
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/clk/qcom/camcc-sc7180.c b/drivers/clk/qcom/camcc-sc7180.c
index dbac565..9bcf2f8 100644
--- a/drivers/clk/qcom/camcc-sc7180.c
+++ b/drivers/clk/qcom/camcc-sc7180.c
@@ -304,7 +304,7 @@ static struct clk_rcg2 cam_cc_bps_clk_src = {
.name = "cam_cc_bps_clk_src",
.parent_data = cam_cc_parent_data_2,
.num_parents = 5,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -325,7 +325,7 @@ static struct clk_rcg2 cam_cc_cci_0_clk_src = {
.name = "cam_cc_cci_0_clk_src",
.parent_data = cam_cc_parent_data_5,
.num_parents = 3,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -339,7 +339,7 @@ static struct clk_rcg2 cam_cc_cci_1_clk_src = {
.name = "cam_cc_cci_1_clk_src",
.parent_data = cam_cc_parent_data_5,
.num_parents = 3,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -360,7 +360,7 @@ static struct clk_rcg2 cam_cc_cphy_rx_clk_src = {
.name = "cam_cc_cphy_rx_clk_src",
.parent_data = cam_cc_parent_data_3,
.num_parents = 6,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -379,7 +379,7 @@ static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = {
.name = "cam_cc_csi0phytimer_clk_src",
.parent_data = cam_cc_parent_data_0,
.num_parents = 4,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -393,7 +393,7 @@ static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = {
.name = "cam_cc_csi1phytimer_clk_src",
.parent_data = cam_cc_parent_data_0,
.num_parents = 4,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -407,7 +407,7 @@ static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = {
.name = "cam_cc_csi2phytimer_clk_src",
.parent_data = cam_cc_parent_data_0,
.num_parents = 4,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -421,7 +421,7 @@ static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = {
.name = "cam_cc_csi3phytimer_clk_src",
.parent_data = cam_cc_parent_data_0,
.num_parents = 4,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -443,7 +443,7 @@ static struct clk_rcg2 cam_cc_fast_ahb_clk_src = {
.name = "cam_cc_fast_ahb_clk_src",
.parent_data = cam_cc_parent_data_0,
.num_parents = 4,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -466,7 +466,7 @@ static struct clk_rcg2 cam_cc_icp_clk_src = {
.name = "cam_cc_icp_clk_src",
.parent_data = cam_cc_parent_data_2,
.num_parents = 5,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -488,7 +488,7 @@ static struct clk_rcg2 cam_cc_ife_0_clk_src = {
.name = "cam_cc_ife_0_clk_src",
.parent_data = cam_cc_parent_data_4,
.num_parents = 4,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -510,7 +510,7 @@ static struct clk_rcg2 cam_cc_ife_0_csid_clk_src = {
.name = "cam_cc_ife_0_csid_clk_src",
.parent_data = cam_cc_parent_data_3,
.num_parents = 6,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -524,7 +524,7 @@ static struct clk_rcg2 cam_cc_ife_1_clk_src = {
.name = "cam_cc_ife_1_clk_src",
.parent_data = cam_cc_parent_data_4,
.num_parents = 4,
-   .ops = _rcg2_ops,
+   .ops = _rcg2_shared_ops,
},
 };

@@ -538,7 +538,7 @@ static struct clk_rcg2 cam_cc_ife_1_csid_clk_src = {
.name = "cam_cc_ife_1_csid_clk_src",
.parent_data = cam_cc_parent_data_3,
.num_parents = 6,
-   .ops = _rcg2_ops,
+   .ops =