linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers
@ 2021-03-25 11:11 Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries Dmitry Baryshkov
                   ` (14 more replies)
  0 siblings, 15 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Cleanup several Qualcomm clock drivers by removing unused entries from
parents map, removing test clock, etc.

The following changes since commit a38fd8748464831584a19438cbb3082b5a2dab15:

  Linux 5.12-rc2 (2021-03-05 17:33:41 -0800)

are available in the Git repository at:

  https://git.linaro.org/people/dmitry.baryshkov/kernel.git qcom-clk-cleanup

for you to fetch changes up to 4b3bb3df68f187dcda8ab229f9ffd793395452c5:

  clk: qcom: videocc-sdm845: get rid of the test clock (2021-03-25 14:06:52 +0300)

----------------------------------------------------------------
Dmitry Baryshkov (15):
      clk: qcom: dispcc-sc7180: drop unused enum entries
      clk: qcom: dispcc-sm8250: drop unused enum entries
      clk: qcom: gcc-sm8250: drop unused enum entries
      clk: qcom: gpucc-sm8150: drop unused enum entries
      clk: qcom: gpucc-sm8250: drop unused enum entries
      clk: qcom: videocc-sc7180: drop unused enum entries
      clk: qcom: videocc-sm8150: drop unused enum entries
      clk: qcom: videocc-sm8250: drop unused enum entries
      clk: qcom: dispcc-sdm845: convert to parent data
      clk: qcom: gpucc-sdm845: convert to parent data
      clk: qcom: gpucc-sdm845: get rid of the test clock
      clk: qcom: dispcc-sdm845: get rid of the test clock
      clk: qcom: videocc-sdm845: remove unsupported clock sources
      clk: qcom: videocc-sdm845: convert to parent data
      clk: qcom: videocc-sdm845: get rid of the test clock

 drivers/clk/qcom/dispcc-sc7180.c  |   2 -
 drivers/clk/qcom/dispcc-sdm845.c  | 217 ++++++++++++++++++--------------------
 drivers/clk/qcom/dispcc-sm8250.c  |   8 --
 drivers/clk/qcom/gcc-sm8250.c     |   1 -
 drivers/clk/qcom/gpucc-sdm845.c   |  43 ++++----
 drivers/clk/qcom/gpucc-sm8150.c   |   1 -
 drivers/clk/qcom/gpucc-sm8250.c   |   1 -
 drivers/clk/qcom/videocc-sc7180.c |   2 -
 drivers/clk/qcom/videocc-sdm845.c |  49 ++++-----
 drivers/clk/qcom/videocc-sm8150.c |   2 -
 drivers/clk/qcom/videocc-sm8250.c |   2 -
 11 files changed, 146 insertions(+), 182 deletions(-)



^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-04-02  1:19   ` Taniya Das
  2021-03-25 11:11 ` [PATCH v1 02/15] clk: qcom: dispcc-sm8250: " Dmitry Baryshkov
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/dispcc-sc7180.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sc7180.c b/drivers/clk/qcom/dispcc-sc7180.c
index f487515701e3..3334bf9cfb94 100644
--- a/drivers/clk/qcom/dispcc-sc7180.c
+++ b/drivers/clk/qcom/dispcc-sc7180.c
@@ -19,8 +19,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CHIP_SLEEP_CLK,
-	P_CORE_BI_PLL_TEST_SE,
 	P_DISP_CC_PLL0_OUT_EVEN,
 	P_DISP_CC_PLL0_OUT_MAIN,
 	P_DP_PHY_PLL_LINK_CLK,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 02/15] clk: qcom: dispcc-sm8250: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 03/15] clk: qcom: gcc-sm8250: " Dmitry Baryshkov
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/dispcc-sm8250.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c
index 588575e1169d..86275814e055 100644
--- a/drivers/clk/qcom/dispcc-sm8250.c
+++ b/drivers/clk/qcom/dispcc-sm8250.c
@@ -21,23 +21,15 @@
 
 enum {
 	P_BI_TCXO,
-	P_CHIP_SLEEP_CLK,
-	P_CORE_BI_PLL_TEST_SE,
 	P_DISP_CC_PLL0_OUT_MAIN,
 	P_DISP_CC_PLL1_OUT_EVEN,
 	P_DISP_CC_PLL1_OUT_MAIN,
 	P_DP_PHY_PLL_LINK_CLK,
 	P_DP_PHY_PLL_VCO_DIV_CLK,
-	P_DPTX1_PHY_PLL_LINK_CLK,
-	P_DPTX1_PHY_PLL_VCO_DIV_CLK,
-	P_DPTX2_PHY_PLL_LINK_CLK,
-	P_DPTX2_PHY_PLL_VCO_DIV_CLK,
 	P_DSI0_PHY_PLL_OUT_BYTECLK,
 	P_DSI0_PHY_PLL_OUT_DSICLK,
 	P_DSI1_PHY_PLL_OUT_BYTECLK,
 	P_DSI1_PHY_PLL_OUT_DSICLK,
-	P_EDP_PHY_PLL_LINK_CLK,
-	P_EDP_PHY_PLL_VCO_DIV_CLK,
 };
 
 static struct pll_vco vco_table[] = {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 03/15] clk: qcom: gcc-sm8250: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 02/15] clk: qcom: dispcc-sm8250: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 04/15] clk: qcom: gpucc-sm8150: " Dmitry Baryshkov
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/gcc-sm8250.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/qcom/gcc-sm8250.c b/drivers/clk/qcom/gcc-sm8250.c
index ab594a0f0c40..86626a027f6f 100644
--- a/drivers/clk/qcom/gcc-sm8250.c
+++ b/drivers/clk/qcom/gcc-sm8250.c
@@ -25,7 +25,6 @@
 enum {
 	P_BI_TCXO,
 	P_AUD_REF_CLK,
-	P_CORE_BI_PLL_TEST_SE,
 	P_GPLL0_OUT_EVEN,
 	P_GPLL0_OUT_MAIN,
 	P_GPLL4_OUT_MAIN,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 04/15] clk: qcom: gpucc-sm8150: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 03/15] clk: qcom: gcc-sm8250: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 05/15] clk: qcom: gpucc-sm8250: " Dmitry Baryshkov
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/gpucc-sm8150.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/qcom/gpucc-sm8150.c b/drivers/clk/qcom/gpucc-sm8150.c
index 27c40754b2c7..2b952f561537 100644
--- a/drivers/clk/qcom/gpucc-sm8150.c
+++ b/drivers/clk/qcom/gpucc-sm8150.c
@@ -21,7 +21,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CORE_BI_PLL_TEST_SE,
 	P_GPLL0_OUT_MAIN,
 	P_GPLL0_OUT_MAIN_DIV,
 	P_GPU_CC_PLL1_OUT_MAIN,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 05/15] clk: qcom: gpucc-sm8250: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 04/15] clk: qcom: gpucc-sm8150: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-04-02  1:18   ` Taniya Das
  2021-03-25 11:11 ` [PATCH v1 06/15] clk: qcom: videocc-sc7180: " Dmitry Baryshkov
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/gpucc-sm8250.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/qcom/gpucc-sm8250.c b/drivers/clk/qcom/gpucc-sm8250.c
index 3fa7d1f9ff98..67c136a77efb 100644
--- a/drivers/clk/qcom/gpucc-sm8250.c
+++ b/drivers/clk/qcom/gpucc-sm8250.c
@@ -26,7 +26,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CORE_BI_PLL_TEST_SE,
 	P_GPLL0_OUT_MAIN,
 	P_GPLL0_OUT_MAIN_DIV,
 	P_GPU_CC_PLL0_OUT_MAIN,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 05/15] clk: qcom: gpucc-sm8250: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-27  1:48   ` Taniya Das
  2021-03-25 11:11 ` [PATCH v1 07/15] clk: qcom: videocc-sm8150: " Dmitry Baryshkov
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sc7180.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/qcom/videocc-sc7180.c b/drivers/clk/qcom/videocc-sc7180.c
index 276e5ecd4840..f5d04791a3cd 100644
--- a/drivers/clk/qcom/videocc-sc7180.c
+++ b/drivers/clk/qcom/videocc-sc7180.c
@@ -19,8 +19,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CHIP_SLEEP_CLK,
-	P_CORE_BI_PLL_TEST_SE,
 	P_VIDEO_PLL0_OUT_EVEN,
 	P_VIDEO_PLL0_OUT_MAIN,
 	P_VIDEO_PLL0_OUT_ODD,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 07/15] clk: qcom: videocc-sm8150: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (5 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 06/15] clk: qcom: videocc-sc7180: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 08/15] clk: qcom: videocc-sm8250: " Dmitry Baryshkov
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sm8150.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/qcom/videocc-sm8150.c b/drivers/clk/qcom/videocc-sm8150.c
index 3087e2ec8fd4..de09e5456555 100644
--- a/drivers/clk/qcom/videocc-sm8150.c
+++ b/drivers/clk/qcom/videocc-sm8150.c
@@ -20,8 +20,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CHIP_SLEEP_CLK,
-	P_CORE_BI_PLL_TEST_SE,
 	P_VIDEO_PLL0_OUT_EVEN,
 	P_VIDEO_PLL0_OUT_MAIN,
 	P_VIDEO_PLL0_OUT_ODD,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 08/15] clk: qcom: videocc-sm8250: drop unused enum entries
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (6 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 07/15] clk: qcom: videocc-sm8150: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 09/15] clk: qcom: dispcc-sdm845: convert to parent data Dmitry Baryshkov
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Drop unused enum entries from the list of parent enums.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sm8250.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/qcom/videocc-sm8250.c b/drivers/clk/qcom/videocc-sm8250.c
index b0efadc19634..06a8a2c98deb 100644
--- a/drivers/clk/qcom/videocc-sm8250.c
+++ b/drivers/clk/qcom/videocc-sm8250.c
@@ -21,8 +21,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CHIP_SLEEP_CLK,
-	P_CORE_BI_PLL_TEST_SE,
 	P_VIDEO_PLL0_OUT_MAIN,
 	P_VIDEO_PLL1_OUT_MAIN,
 };
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 09/15] clk: qcom: dispcc-sdm845: convert to parent data
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (7 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 08/15] clk: qcom: videocc-sm8250: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 10/15] clk: qcom: gpucc-sdm845: " Dmitry Baryshkov
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Convert the clock driver to specify parent data rather than parent
names, to actually bind using 'clock-names' specified in the DTS rather
than global clock names.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/dispcc-sdm845.c | 188 ++++++++++++++++---------------
 1 file changed, 95 insertions(+), 93 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sdm845.c b/drivers/clk/qcom/dispcc-sdm845.c
index 5c932cd17b14..bf5e8a4a0230 100644
--- a/drivers/clk/qcom/dispcc-sdm845.c
+++ b/drivers/clk/qcom/dispcc-sdm845.c
@@ -33,6 +33,21 @@ enum {
 	P_DP_PHY_PLL_VCO_DIV_CLK,
 };
 
+static struct clk_alpha_pll disp_cc_pll0 = {
+	.offset = 0x0,
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
+	.clkr = {
+		.hw.init = &(struct clk_init_data){
+			.name = "disp_cc_pll0",
+			.parent_data = &(const struct clk_parent_data){
+				.fw_name = "bi_tcxo", .name = "bi_tcxo",
+			},
+			.num_parents = 1,
+			.ops = &clk_alpha_pll_fabia_ops,
+		},
+	},
+};
+
 static const struct parent_map disp_cc_parent_map_0[] = {
 	{ P_BI_TCXO, 0 },
 	{ P_DSI0_PHY_PLL_OUT_BYTECLK, 1 },
@@ -40,11 +55,11 @@ static const struct parent_map disp_cc_parent_map_0[] = {
 	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
-static const char * const disp_cc_parent_names_0[] = {
-	"bi_tcxo",
-	"dsi0_phy_pll_out_byteclk",
-	"dsi1_phy_pll_out_byteclk",
-	"core_bi_pll_test_se",
+static const struct clk_parent_data disp_cc_parent_data_0[] = {
+	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
+	{ .fw_name = "dsi0_phy_pll_out_byteclk", .name = "dsi0_phy_pll_out_byteclk" },
+	{ .fw_name = "dsi1_phy_pll_out_byteclk", .name = "dsi1_phy_pll_out_byteclk" },
+	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_1[] = {
@@ -54,11 +69,11 @@ static const struct parent_map disp_cc_parent_map_1[] = {
 	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
-static const char * const disp_cc_parent_names_1[] = {
-	"bi_tcxo",
-	"dp_link_clk_divsel_ten",
-	"dp_vco_divided_clk_src_mux",
-	"core_bi_pll_test_se",
+static const struct clk_parent_data disp_cc_parent_data_1[] = {
+	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
+	{ .fw_name = "dp_link_clk_divsel_ten", .name = "dp_link_clk_divsel_ten" },
+	{ .fw_name = "dp_vco_divided_clk_src_mux", .name = "dp_vco_divided_clk_src_mux" },
+	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_2[] = {
@@ -66,9 +81,9 @@ static const struct parent_map disp_cc_parent_map_2[] = {
 	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
-static const char * const disp_cc_parent_names_2[] = {
-	"bi_tcxo",
-	"core_bi_pll_test_se",
+static const struct clk_parent_data disp_cc_parent_data_2[] = {
+	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
+	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_3[] = {
@@ -79,12 +94,12 @@ static const struct parent_map disp_cc_parent_map_3[] = {
 	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
-static const char * const disp_cc_parent_names_3[] = {
-	"bi_tcxo",
-	"disp_cc_pll0",
-	"gcc_disp_gpll0_clk_src",
-	"gcc_disp_gpll0_div_clk_src",
-	"core_bi_pll_test_se",
+static const struct clk_parent_data disp_cc_parent_data_3[] = {
+	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
+	{ .hw = &disp_cc_pll0.clkr.hw },
+	{ .fw_name = "gcc_disp_gpll0_clk_src", .name = "gcc_disp_gpll0_clk_src" },
+	{ .fw_name = "gcc_disp_gpll0_div_clk_src", .name = "gcc_disp_gpll0_div_clk_src" },
+	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_4[] = {
@@ -94,24 +109,11 @@ static const struct parent_map disp_cc_parent_map_4[] = {
 	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
-static const char * const disp_cc_parent_names_4[] = {
-	"bi_tcxo",
-	"dsi0_phy_pll_out_dsiclk",
-	"dsi1_phy_pll_out_dsiclk",
-	"core_bi_pll_test_se",
-};
-
-static struct clk_alpha_pll disp_cc_pll0 = {
-	.offset = 0x0,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
-	.clkr = {
-		.hw.init = &(struct clk_init_data){
-			.name = "disp_cc_pll0",
-			.parent_names = (const char *[]){ "bi_tcxo" },
-			.num_parents = 1,
-			.ops = &clk_alpha_pll_fabia_ops,
-		},
-	},
+static const struct clk_parent_data disp_cc_parent_data_4[] = {
+	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
+	{ .fw_name = "dsi0_phy_pll_out_dsiclk", .name = "dsi0_phy_pll_out_dsiclk" },
+	{ .fw_name = "dsi1_phy_pll_out_dsiclk", .name = "dsi1_phy_pll_out_dsiclk" },
+	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 /* Return the HW recalc rate for idle use case */
@@ -122,7 +124,7 @@ static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = {
 	.parent_map = disp_cc_parent_map_0,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_byte0_clk_src",
-		.parent_names = disp_cc_parent_names_0,
+		.parent_data = disp_cc_parent_data_0,
 		.num_parents = 4,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_byte2_ops,
@@ -137,7 +139,7 @@ static struct clk_rcg2 disp_cc_mdss_byte1_clk_src = {
 	.parent_map = disp_cc_parent_map_0,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_byte1_clk_src",
-		.parent_names = disp_cc_parent_names_0,
+		.parent_data = disp_cc_parent_data_0,
 		.num_parents = 4,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_byte2_ops,
@@ -157,7 +159,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = {
 	.freq_tbl = ftbl_disp_cc_mdss_dp_aux_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_aux_clk_src",
-		.parent_names = disp_cc_parent_names_2,
+		.parent_data = disp_cc_parent_data_2,
 		.num_parents = 2,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_rcg2_ops,
@@ -171,7 +173,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_crypto_clk_src = {
 	.parent_map = disp_cc_parent_map_1,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_crypto_clk_src",
-		.parent_names = disp_cc_parent_names_1,
+		.parent_data = disp_cc_parent_data_1,
 		.num_parents = 4,
 		.ops = &clk_byte2_ops,
 	},
@@ -184,7 +186,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_link_clk_src = {
 	.parent_map = disp_cc_parent_map_1,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_link_clk_src",
-		.parent_names = disp_cc_parent_names_1,
+		.parent_data = disp_cc_parent_data_1,
 		.num_parents = 4,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_byte2_ops,
@@ -198,7 +200,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_pixel1_clk_src = {
 	.parent_map = disp_cc_parent_map_1,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_pixel1_clk_src",
-		.parent_names = disp_cc_parent_names_1,
+		.parent_data = disp_cc_parent_data_1,
 		.num_parents = 4,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_dp_ops,
@@ -212,7 +214,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_pixel_clk_src = {
 	.parent_map = disp_cc_parent_map_1,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_pixel_clk_src",
-		.parent_names = disp_cc_parent_names_1,
+		.parent_data = disp_cc_parent_data_1,
 		.num_parents = 4,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_dp_ops,
@@ -232,7 +234,7 @@ static struct clk_rcg2 disp_cc_mdss_esc0_clk_src = {
 	.freq_tbl = ftbl_disp_cc_mdss_esc0_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_esc0_clk_src",
-		.parent_names = disp_cc_parent_names_0,
+		.parent_data = disp_cc_parent_data_0,
 		.num_parents = 4,
 		.ops = &clk_rcg2_ops,
 	},
@@ -246,7 +248,7 @@ static struct clk_rcg2 disp_cc_mdss_esc1_clk_src = {
 	.freq_tbl = ftbl_disp_cc_mdss_esc0_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_esc1_clk_src",
-		.parent_names = disp_cc_parent_names_0,
+		.parent_data = disp_cc_parent_data_0,
 		.num_parents = 4,
 		.ops = &clk_rcg2_ops,
 	},
@@ -273,7 +275,7 @@ static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
 	.freq_tbl = ftbl_disp_cc_mdss_mdp_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_mdp_clk_src",
-		.parent_names = disp_cc_parent_names_3,
+		.parent_data = disp_cc_parent_data_3,
 		.num_parents = 5,
 		.ops = &clk_rcg2_shared_ops,
 	},
@@ -287,7 +289,7 @@ static struct clk_rcg2 disp_cc_mdss_pclk0_clk_src = {
 	.parent_map = disp_cc_parent_map_4,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_pclk0_clk_src",
-		.parent_names = disp_cc_parent_names_4,
+		.parent_data = disp_cc_parent_data_4,
 		.num_parents = 4,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_pixel_ops,
@@ -302,7 +304,7 @@ static struct clk_rcg2 disp_cc_mdss_pclk1_clk_src = {
 	.parent_map = disp_cc_parent_map_4,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_pclk1_clk_src",
-		.parent_names = disp_cc_parent_names_4,
+		.parent_data = disp_cc_parent_data_4,
 		.num_parents = 4,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_pixel_ops,
@@ -326,7 +328,7 @@ static struct clk_rcg2 disp_cc_mdss_rot_clk_src = {
 	.freq_tbl = ftbl_disp_cc_mdss_rot_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_rot_clk_src",
-		.parent_names = disp_cc_parent_names_3,
+		.parent_data = disp_cc_parent_data_3,
 		.num_parents = 5,
 		.ops = &clk_rcg2_shared_ops,
 	},
@@ -340,7 +342,7 @@ static struct clk_rcg2 disp_cc_mdss_vsync_clk_src = {
 	.freq_tbl = ftbl_disp_cc_mdss_esc0_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_vsync_clk_src",
-		.parent_names = disp_cc_parent_names_2,
+		.parent_data = disp_cc_parent_data_2,
 		.num_parents = 2,
 		.ops = &clk_rcg2_ops,
 	},
@@ -381,8 +383,8 @@ static struct clk_branch disp_cc_mdss_byte0_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_byte0_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_byte0_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_byte0_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -399,8 +401,8 @@ static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = {
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_byte0_div_clk_src",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_byte0_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_byte0_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.ops = &clk_regmap_div_ops,
@@ -417,8 +419,8 @@ static struct clk_branch disp_cc_mdss_byte0_intf_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_byte0_intf_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_byte0_div_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_byte0_div_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -436,8 +438,8 @@ static struct clk_branch disp_cc_mdss_byte1_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_byte1_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_byte1_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_byte1_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -454,8 +456,8 @@ static struct clk_regmap_div disp_cc_mdss_byte1_div_clk_src = {
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_byte1_div_clk_src",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_byte1_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_byte1_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.ops = &clk_regmap_div_ops,
@@ -472,8 +474,8 @@ static struct clk_branch disp_cc_mdss_byte1_intf_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_byte1_intf_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_byte1_div_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_byte1_div_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -490,8 +492,8 @@ static struct clk_branch disp_cc_mdss_dp_aux_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_dp_aux_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_dp_aux_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_dp_aux_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -508,8 +510,8 @@ static struct clk_branch disp_cc_mdss_dp_crypto_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_dp_crypto_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_dp_crypto_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_dp_crypto_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -526,8 +528,8 @@ static struct clk_branch disp_cc_mdss_dp_link_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_dp_link_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_dp_link_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_dp_link_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -545,8 +547,8 @@ static struct clk_branch disp_cc_mdss_dp_link_intf_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_dp_link_intf_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_dp_link_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_dp_link_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.ops = &clk_branch2_ops,
@@ -562,8 +564,8 @@ static struct clk_branch disp_cc_mdss_dp_pixel1_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_dp_pixel1_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_dp_pixel1_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_dp_pixel1_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -580,8 +582,8 @@ static struct clk_branch disp_cc_mdss_dp_pixel_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_dp_pixel_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_dp_pixel_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_dp_pixel_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -598,8 +600,8 @@ static struct clk_branch disp_cc_mdss_esc0_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_esc0_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_esc0_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_esc0_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -616,8 +618,8 @@ static struct clk_branch disp_cc_mdss_esc1_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_esc1_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_esc1_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_esc1_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -634,8 +636,8 @@ static struct clk_branch disp_cc_mdss_mdp_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_mdp_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_mdp_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_mdp_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -652,8 +654,8 @@ static struct clk_branch disp_cc_mdss_mdp_lut_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_mdp_lut_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_mdp_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_mdp_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.ops = &clk_branch2_ops,
@@ -670,8 +672,8 @@ static struct clk_branch disp_cc_mdss_pclk0_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_pclk0_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_pclk0_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_pclk0_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -689,8 +691,8 @@ static struct clk_branch disp_cc_mdss_pclk1_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_pclk1_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_pclk1_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_pclk1_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -707,8 +709,8 @@ static struct clk_branch disp_cc_mdss_rot_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_rot_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_rot_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_rot_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -738,8 +740,8 @@ static struct clk_branch disp_cc_mdss_rscc_vsync_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_rscc_vsync_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_vsync_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_vsync_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -756,8 +758,8 @@ static struct clk_branch disp_cc_mdss_vsync_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "disp_cc_mdss_vsync_clk",
-			.parent_names = (const char *[]){
-				"disp_cc_mdss_vsync_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &disp_cc_mdss_vsync_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 10/15] clk: qcom: gpucc-sdm845: convert to parent data
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (8 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 09/15] clk: qcom: dispcc-sdm845: convert to parent data Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 11/15] clk: qcom: gpucc-sdm845: get rid of the test clock Dmitry Baryshkov
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Convert the clock driver to specify parent data rather than parent
names, to actually bind using 'clock-names' specified in the DTS rather
than global clock names.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/gpucc-sdm845.c | 42 +++++++++++++++++----------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/drivers/clk/qcom/gpucc-sdm845.c b/drivers/clk/qcom/gpucc-sdm845.c
index 5663698b306b..2d637b113ac8 100644
--- a/drivers/clk/qcom/gpucc-sdm845.c
+++ b/drivers/clk/qcom/gpucc-sdm845.c
@@ -35,22 +35,6 @@ enum {
 	P_GPU_CC_PLL1_OUT_ODD,
 };
 
-static const struct parent_map gpu_cc_parent_map_0[] = {
-	{ P_BI_TCXO, 0 },
-	{ P_GPU_CC_PLL1_OUT_MAIN, 3 },
-	{ P_GPLL0_OUT_MAIN, 5 },
-	{ P_GPLL0_OUT_MAIN_DIV, 6 },
-	{ P_CORE_BI_PLL_TEST_SE, 7 },
-};
-
-static const char * const gpu_cc_parent_names_0[] = {
-	"bi_tcxo",
-	"gpu_cc_pll1",
-	"gcc_gpu_gpll0_clk_src",
-	"gcc_gpu_gpll0_div_clk_src",
-	"core_bi_pll_test_se",
-};
-
 static const struct alpha_pll_config gpu_cc_pll1_config = {
 	.l = 0x1a,
 	.alpha = 0xaab,
@@ -62,13 +46,31 @@ static struct clk_alpha_pll gpu_cc_pll1 = {
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "gpu_cc_pll1",
-			.parent_names = (const char *[]){ "bi_tcxo" },
+			.parent_data = &(const struct clk_parent_data){
+				.fw_name = "bi_tcxo", .name = "bi_tcxo",
+			},
 			.num_parents = 1,
 			.ops = &clk_alpha_pll_fabia_ops,
 		},
 	},
 };
 
+static const struct parent_map gpu_cc_parent_map_0[] = {
+	{ P_BI_TCXO, 0 },
+	{ P_GPU_CC_PLL1_OUT_MAIN, 3 },
+	{ P_GPLL0_OUT_MAIN, 5 },
+	{ P_GPLL0_OUT_MAIN_DIV, 6 },
+	{ P_CORE_BI_PLL_TEST_SE, 7 },
+};
+
+static const struct clk_parent_data gpu_cc_parent_data_0[] = {
+	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
+	{ .hw = &gpu_cc_pll1.clkr.hw },
+	{ .fw_name = "gcc_gpu_gpll0_clk_src", .name = "gcc_gpu_gpll0_clk_src" },
+	{ .fw_name = "gcc_gpu_gpll0_div_clk_src", .name = "gcc_gpu_gpll0_div_clk_src" },
+	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
+};
+
 static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
 	F(19200000, P_BI_TCXO, 1, 0, 0),
 	F(200000000, P_GPLL0_OUT_MAIN_DIV, 1.5, 0, 0),
@@ -84,7 +86,7 @@ static struct clk_rcg2 gpu_cc_gmu_clk_src = {
 	.freq_tbl = ftbl_gpu_cc_gmu_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "gpu_cc_gmu_clk_src",
-		.parent_names = gpu_cc_parent_names_0,
+		.parent_data = gpu_cc_parent_data_0,
 		.num_parents = 5,
 		.ops = &clk_rcg2_shared_ops,
 	},
@@ -98,8 +100,8 @@ static struct clk_branch gpu_cc_cx_gmu_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "gpu_cc_cx_gmu_clk",
-			.parent_names = (const char *[]){
-				"gpu_cc_gmu_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &gpu_cc_gmu_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 11/15] clk: qcom: gpucc-sdm845: get rid of the test clock
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (9 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 10/15] clk: qcom: gpucc-sdm845: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 12/15] clk: qcom: dispcc-sdm845: " Dmitry Baryshkov
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk, Stephen Boyd

The test clock isn't in the bindings and apparently it's not used by
anyone upstream.  Remove it.

Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/gpucc-sdm845.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/qcom/gpucc-sdm845.c b/drivers/clk/qcom/gpucc-sdm845.c
index 2d637b113ac8..6f53c6b4c6ed 100644
--- a/drivers/clk/qcom/gpucc-sdm845.c
+++ b/drivers/clk/qcom/gpucc-sdm845.c
@@ -27,7 +27,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CORE_BI_PLL_TEST_SE,
 	P_GPLL0_OUT_MAIN,
 	P_GPLL0_OUT_MAIN_DIV,
 	P_GPU_CC_PLL1_OUT_EVEN,
@@ -60,7 +59,6 @@ static const struct parent_map gpu_cc_parent_map_0[] = {
 	{ P_GPU_CC_PLL1_OUT_MAIN, 3 },
 	{ P_GPLL0_OUT_MAIN, 5 },
 	{ P_GPLL0_OUT_MAIN_DIV, 6 },
-	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
 static const struct clk_parent_data gpu_cc_parent_data_0[] = {
@@ -68,7 +66,6 @@ static const struct clk_parent_data gpu_cc_parent_data_0[] = {
 	{ .hw = &gpu_cc_pll1.clkr.hw },
 	{ .fw_name = "gcc_gpu_gpll0_clk_src", .name = "gcc_gpu_gpll0_clk_src" },
 	{ .fw_name = "gcc_gpu_gpll0_div_clk_src", .name = "gcc_gpu_gpll0_div_clk_src" },
-	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
@@ -87,7 +84,7 @@ static struct clk_rcg2 gpu_cc_gmu_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "gpu_cc_gmu_clk_src",
 		.parent_data = gpu_cc_parent_data_0,
-		.num_parents = 5,
+		.num_parents = 4,
 		.ops = &clk_rcg2_shared_ops,
 	},
 };
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 12/15] clk: qcom: dispcc-sdm845: get rid of the test clock
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (10 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 11/15] clk: qcom: gpucc-sdm845: get rid of the test clock Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources Dmitry Baryshkov
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk, Stephen Boyd

The test clock isn't in the bindings and apparently it's not used by
anyone upstream.  Remove it.

Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/dispcc-sdm845.c | 39 ++++++++++++--------------------
 1 file changed, 14 insertions(+), 25 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sdm845.c b/drivers/clk/qcom/dispcc-sdm845.c
index bf5e8a4a0230..195cecf9f294 100644
--- a/drivers/clk/qcom/dispcc-sdm845.c
+++ b/drivers/clk/qcom/dispcc-sdm845.c
@@ -21,7 +21,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CORE_BI_PLL_TEST_SE,
 	P_DISP_CC_PLL0_OUT_MAIN,
 	P_DSI0_PHY_PLL_OUT_BYTECLK,
 	P_DSI0_PHY_PLL_OUT_DSICLK,
@@ -52,38 +51,32 @@ static const struct parent_map disp_cc_parent_map_0[] = {
 	{ P_BI_TCXO, 0 },
 	{ P_DSI0_PHY_PLL_OUT_BYTECLK, 1 },
 	{ P_DSI1_PHY_PLL_OUT_BYTECLK, 2 },
-	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
 static const struct clk_parent_data disp_cc_parent_data_0[] = {
 	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
 	{ .fw_name = "dsi0_phy_pll_out_byteclk", .name = "dsi0_phy_pll_out_byteclk" },
 	{ .fw_name = "dsi1_phy_pll_out_byteclk", .name = "dsi1_phy_pll_out_byteclk" },
-	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_1[] = {
 	{ P_BI_TCXO, 0 },
 	{ P_DP_PHY_PLL_LINK_CLK, 1 },
 	{ P_DP_PHY_PLL_VCO_DIV_CLK, 2 },
-	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
 static const struct clk_parent_data disp_cc_parent_data_1[] = {
 	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
 	{ .fw_name = "dp_link_clk_divsel_ten", .name = "dp_link_clk_divsel_ten" },
 	{ .fw_name = "dp_vco_divided_clk_src_mux", .name = "dp_vco_divided_clk_src_mux" },
-	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_2[] = {
 	{ P_BI_TCXO, 0 },
-	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
 static const struct clk_parent_data disp_cc_parent_data_2[] = {
 	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
-	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_3[] = {
@@ -91,7 +84,6 @@ static const struct parent_map disp_cc_parent_map_3[] = {
 	{ P_DISP_CC_PLL0_OUT_MAIN, 1 },
 	{ P_GPLL0_OUT_MAIN, 4 },
 	{ P_GPLL0_OUT_MAIN_DIV, 5 },
-	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
 static const struct clk_parent_data disp_cc_parent_data_3[] = {
@@ -99,21 +91,18 @@ static const struct clk_parent_data disp_cc_parent_data_3[] = {
 	{ .hw = &disp_cc_pll0.clkr.hw },
 	{ .fw_name = "gcc_disp_gpll0_clk_src", .name = "gcc_disp_gpll0_clk_src" },
 	{ .fw_name = "gcc_disp_gpll0_div_clk_src", .name = "gcc_disp_gpll0_div_clk_src" },
-	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct parent_map disp_cc_parent_map_4[] = {
 	{ P_BI_TCXO, 0 },
 	{ P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
 	{ P_DSI1_PHY_PLL_OUT_DSICLK, 2 },
-	{ P_CORE_BI_PLL_TEST_SE, 7 },
 };
 
 static const struct clk_parent_data disp_cc_parent_data_4[] = {
 	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
 	{ .fw_name = "dsi0_phy_pll_out_dsiclk", .name = "dsi0_phy_pll_out_dsiclk" },
 	{ .fw_name = "dsi1_phy_pll_out_dsiclk", .name = "dsi1_phy_pll_out_dsiclk" },
-	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 /* Return the HW recalc rate for idle use case */
@@ -125,7 +114,7 @@ static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_byte0_clk_src",
 		.parent_data = disp_cc_parent_data_0,
-		.num_parents = 4,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_byte2_ops,
 	},
@@ -140,7 +129,7 @@ static struct clk_rcg2 disp_cc_mdss_byte1_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_byte1_clk_src",
 		.parent_data = disp_cc_parent_data_0,
-		.num_parents = 4,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_byte2_ops,
 	},
@@ -160,7 +149,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_aux_clk_src",
 		.parent_data = disp_cc_parent_data_2,
-		.num_parents = 2,
+		.num_parents = 1,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_rcg2_ops,
 	},
@@ -174,7 +163,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_crypto_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_crypto_clk_src",
 		.parent_data = disp_cc_parent_data_1,
-		.num_parents = 4,
+		.num_parents = 3,
 		.ops = &clk_byte2_ops,
 	},
 };
@@ -187,7 +176,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_link_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_link_clk_src",
 		.parent_data = disp_cc_parent_data_1,
-		.num_parents = 4,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_byte2_ops,
 	},
@@ -201,7 +190,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_pixel1_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_pixel1_clk_src",
 		.parent_data = disp_cc_parent_data_1,
-		.num_parents = 4,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_dp_ops,
 	},
@@ -215,7 +204,7 @@ static struct clk_rcg2 disp_cc_mdss_dp_pixel_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_dp_pixel_clk_src",
 		.parent_data = disp_cc_parent_data_1,
-		.num_parents = 4,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_dp_ops,
 	},
@@ -235,7 +224,7 @@ static struct clk_rcg2 disp_cc_mdss_esc0_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_esc0_clk_src",
 		.parent_data = disp_cc_parent_data_0,
-		.num_parents = 4,
+		.num_parents = 3,
 		.ops = &clk_rcg2_ops,
 	},
 };
@@ -249,7 +238,7 @@ static struct clk_rcg2 disp_cc_mdss_esc1_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_esc1_clk_src",
 		.parent_data = disp_cc_parent_data_0,
-		.num_parents = 4,
+		.num_parents = 3,
 		.ops = &clk_rcg2_ops,
 	},
 };
@@ -276,7 +265,7 @@ static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_mdp_clk_src",
 		.parent_data = disp_cc_parent_data_3,
-		.num_parents = 5,
+		.num_parents = 4,
 		.ops = &clk_rcg2_shared_ops,
 	},
 };
@@ -290,7 +279,7 @@ static struct clk_rcg2 disp_cc_mdss_pclk0_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_pclk0_clk_src",
 		.parent_data = disp_cc_parent_data_4,
-		.num_parents = 4,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_pixel_ops,
 	},
@@ -305,7 +294,7 @@ static struct clk_rcg2 disp_cc_mdss_pclk1_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_pclk1_clk_src",
 		.parent_data = disp_cc_parent_data_4,
-		.num_parents = 4,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_pixel_ops,
 	},
@@ -329,7 +318,7 @@ static struct clk_rcg2 disp_cc_mdss_rot_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_rot_clk_src",
 		.parent_data = disp_cc_parent_data_3,
-		.num_parents = 5,
+		.num_parents = 4,
 		.ops = &clk_rcg2_shared_ops,
 	},
 };
@@ -343,7 +332,7 @@ static struct clk_rcg2 disp_cc_mdss_vsync_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "disp_cc_mdss_vsync_clk_src",
 		.parent_data = disp_cc_parent_data_2,
-		.num_parents = 2,
+		.num_parents = 1,
 		.ops = &clk_rcg2_ops,
 	},
 };
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (11 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 12/15] clk: qcom: dispcc-sdm845: " Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-04-02  1:23   ` Taniya Das
  2021-03-25 11:11 ` [PATCH v1 14/15] clk: qcom: videocc-sdm845: convert to parent data Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 15/15] clk: qcom: videocc-sdm845: get rid of the test clock Dmitry Baryshkov
  14 siblings, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

video_pll0_out_even/_odd are not supported neither in the upstream nor
in the downstream kernels, so drop those clock sources.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sdm845.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/clk/qcom/videocc-sdm845.c b/drivers/clk/qcom/videocc-sdm845.c
index 5d6a7724a194..7153f044504f 100644
--- a/drivers/clk/qcom/videocc-sdm845.c
+++ b/drivers/clk/qcom/videocc-sdm845.c
@@ -21,24 +21,18 @@
 enum {
 	P_BI_TCXO,
 	P_CORE_BI_PLL_TEST_SE,
-	P_VIDEO_PLL0_OUT_EVEN,
 	P_VIDEO_PLL0_OUT_MAIN,
-	P_VIDEO_PLL0_OUT_ODD,
 };
 
 static const struct parent_map video_cc_parent_map_0[] = {
 	{ P_BI_TCXO, 0 },
 	{ P_VIDEO_PLL0_OUT_MAIN, 1 },
-	{ P_VIDEO_PLL0_OUT_EVEN, 2 },
-	{ P_VIDEO_PLL0_OUT_ODD, 3 },
 	{ P_CORE_BI_PLL_TEST_SE, 4 },
 };
 
 static const char * const video_cc_parent_names_0[] = {
 	"bi_tcxo",
 	"video_pll0",
-	"video_pll0_out_even",
-	"video_pll0_out_odd",
 	"core_bi_pll_test_se",
 };
 
@@ -79,7 +73,7 @@ static struct clk_rcg2 video_cc_venus_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "video_cc_venus_clk_src",
 		.parent_names = video_cc_parent_names_0,
-		.num_parents = 5,
+		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_rcg2_shared_ops,
 	},
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 14/15] clk: qcom: videocc-sdm845: convert to parent data
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (12 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  2021-03-25 11:11 ` [PATCH v1 15/15] clk: qcom: videocc-sdm845: get rid of the test clock Dmitry Baryshkov
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

Convert the clock driver to specify parent data rather than parent
names, to actually bind using 'clock-names' specified in the DTS rather
than global clock names.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sdm845.c | 42 ++++++++++++++++---------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/drivers/clk/qcom/videocc-sdm845.c b/drivers/clk/qcom/videocc-sdm845.c
index 7153f044504f..c8e9a4153b74 100644
--- a/drivers/clk/qcom/videocc-sdm845.c
+++ b/drivers/clk/qcom/videocc-sdm845.c
@@ -24,18 +24,6 @@ enum {
 	P_VIDEO_PLL0_OUT_MAIN,
 };
 
-static const struct parent_map video_cc_parent_map_0[] = {
-	{ P_BI_TCXO, 0 },
-	{ P_VIDEO_PLL0_OUT_MAIN, 1 },
-	{ P_CORE_BI_PLL_TEST_SE, 4 },
-};
-
-static const char * const video_cc_parent_names_0[] = {
-	"bi_tcxo",
-	"video_pll0",
-	"core_bi_pll_test_se",
-};
-
 static const struct alpha_pll_config video_pll0_config = {
 	.l = 0x10,
 	.alpha = 0xaaab,
@@ -47,13 +35,27 @@ static struct clk_alpha_pll video_pll0 = {
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "video_pll0",
-			.parent_names = (const char *[]){ "bi_tcxo" },
+			.parent_data = &(const struct clk_parent_data){
+				.fw_name = "bi_tcxo", .name = "bi_tcxo",
+			},
 			.num_parents = 1,
 			.ops = &clk_alpha_pll_fabia_ops,
 		},
 	},
 };
 
+static const struct parent_map video_cc_parent_map_0[] = {
+	{ P_BI_TCXO, 0 },
+	{ P_VIDEO_PLL0_OUT_MAIN, 1 },
+	{ P_CORE_BI_PLL_TEST_SE, 4 },
+};
+
+static const struct clk_parent_data video_cc_parent_data_0[] = {
+	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
+	{ .hw = &video_pll0.clkr.hw },
+	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
+};
+
 static const struct freq_tbl ftbl_video_cc_venus_clk_src[] = {
 	F(100000000, P_VIDEO_PLL0_OUT_MAIN, 4, 0, 0),
 	F(200000000, P_VIDEO_PLL0_OUT_MAIN, 2, 0, 0),
@@ -72,7 +74,7 @@ static struct clk_rcg2 video_cc_venus_clk_src = {
 	.freq_tbl = ftbl_video_cc_venus_clk_src,
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "video_cc_venus_clk_src",
-		.parent_names = video_cc_parent_names_0,
+		.parent_data = video_cc_parent_data_0,
 		.num_parents = 3,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_rcg2_shared_ops,
@@ -152,8 +154,8 @@ static struct clk_branch video_cc_vcodec0_core_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "video_cc_vcodec0_core_clk",
-			.parent_names = (const char *[]){
-				"video_cc_venus_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &video_cc_venus_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -183,8 +185,8 @@ static struct clk_branch video_cc_vcodec1_core_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "video_cc_vcodec1_core_clk",
-			.parent_names = (const char *[]){
-				"video_cc_venus_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &video_cc_venus_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
@@ -227,8 +229,8 @@ static struct clk_branch video_cc_venus_ctl_core_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(struct clk_init_data){
 			.name = "video_cc_venus_ctl_core_clk",
-			.parent_names = (const char *[]){
-				"video_cc_venus_clk_src",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &video_cc_venus_clk_src.clkr.hw,
 			},
 			.num_parents = 1,
 			.flags = CLK_SET_RATE_PARENT,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v1 15/15] clk: qcom: videocc-sdm845: get rid of the test clock
  2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
                   ` (13 preceding siblings ...)
  2021-03-25 11:11 ` [PATCH v1 14/15] clk: qcom: videocc-sdm845: convert to parent data Dmitry Baryshkov
@ 2021-03-25 11:11 ` Dmitry Baryshkov
  14 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-25 11:11 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk, Stephen Boyd

The test clock isn't in the bindings and apparently it's not used by
anyone upstream.  Remove it.

Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sdm845.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/qcom/videocc-sdm845.c b/drivers/clk/qcom/videocc-sdm845.c
index c8e9a4153b74..312097ca785d 100644
--- a/drivers/clk/qcom/videocc-sdm845.c
+++ b/drivers/clk/qcom/videocc-sdm845.c
@@ -20,7 +20,6 @@
 
 enum {
 	P_BI_TCXO,
-	P_CORE_BI_PLL_TEST_SE,
 	P_VIDEO_PLL0_OUT_MAIN,
 };
 
@@ -47,13 +46,11 @@ static struct clk_alpha_pll video_pll0 = {
 static const struct parent_map video_cc_parent_map_0[] = {
 	{ P_BI_TCXO, 0 },
 	{ P_VIDEO_PLL0_OUT_MAIN, 1 },
-	{ P_CORE_BI_PLL_TEST_SE, 4 },
 };
 
 static const struct clk_parent_data video_cc_parent_data_0[] = {
 	{ .fw_name = "bi_tcxo", .name = "bi_tcxo" },
 	{ .hw = &video_pll0.clkr.hw },
-	{ .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" },
 };
 
 static const struct freq_tbl ftbl_video_cc_venus_clk_src[] = {
@@ -75,7 +72,7 @@ static struct clk_rcg2 video_cc_venus_clk_src = {
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "video_cc_venus_clk_src",
 		.parent_data = video_cc_parent_data_0,
-		.num_parents = 3,
+		.num_parents = 2,
 		.flags = CLK_SET_RATE_PARENT,
 		.ops = &clk_rcg2_shared_ops,
 	},
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
  2021-03-25 11:11 ` [PATCH v1 06/15] clk: qcom: videocc-sc7180: " Dmitry Baryshkov
@ 2021-03-27  1:48   ` Taniya Das
  2021-03-27  8:13     ` Dmitry Baryshkov
  0 siblings, 1 reply; 28+ messages in thread
From: Taniya Das @ 2021-03-27  1:48 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Stephen Boyd,
	Michael Turquette
  Cc: linux-arm-msm, linux-clk

Hi Dmitry,

Thanks for the patch for cleanup.
It is okay to remove TEST source, but you can still keep the sleep clock 
source as it could be still connected to certain RCGs and could be used 
to derive low frequencies if required.

As these sources are generated from the HW plans it would be good if we 
keep them as they are except the TEST source.

On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
> Drop unused enum entries from the list of parent enums.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/clk/qcom/videocc-sc7180.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/clk/qcom/videocc-sc7180.c b/drivers/clk/qcom/videocc-sc7180.c
> index 276e5ecd4840..f5d04791a3cd 100644
> --- a/drivers/clk/qcom/videocc-sc7180.c
> +++ b/drivers/clk/qcom/videocc-sc7180.c
> @@ -19,8 +19,6 @@
>   
>   enum {
>   	P_BI_TCXO,
> -	P_CHIP_SLEEP_CLK,
> -	P_CORE_BI_PLL_TEST_SE,
>   	P_VIDEO_PLL0_OUT_EVEN,
>   	P_VIDEO_PLL0_OUT_MAIN,
>   	P_VIDEO_PLL0_OUT_ODD,
> 

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
  2021-03-27  1:48   ` Taniya Das
@ 2021-03-27  8:13     ` Dmitry Baryshkov
       [not found]       ` <161730706709.2260335.8947402948263904863@swboyd.mtv.corp.google.com>
  2021-04-02  1:14       ` Taniya Das
  0 siblings, 2 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-03-27  8:13 UTC (permalink / raw)
  To: Taniya Das
  Cc: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette,
	open list:DRM DRIVER FOR MSM ADRENO GPU,
	open list:COMMON CLK FRAMEWORK

Hi Tanya,

On Sat, 27 Mar 2021 at 04:49, Taniya Das <tdas@codeaurora.org> wrote:
>
> Hi Dmitry,
>
> Thanks for the patch for cleanup.
> It is okay to remove TEST source, but you can still keep the sleep clock
> source as it could be still connected to certain RCGs and could be used
> to derive low frequencies if required.
>
> As these sources are generated from the HW plans it would be good if we
> keep them as they are except the TEST source.

Please note that I've barely removed the unused enum entry, which is
not used in any of clock parent maps. So I'd suggest to either add it
to relevant clock parent maps and to the videocc bindings or to drop
unused enum entry.

>
> On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
> > Drop unused enum entries from the list of parent enums.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >   drivers/clk/qcom/videocc-sc7180.c | 2 --
> >   1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/clk/qcom/videocc-sc7180.c b/drivers/clk/qcom/videocc-sc7180.c
> > index 276e5ecd4840..f5d04791a3cd 100644
> > --- a/drivers/clk/qcom/videocc-sc7180.c
> > +++ b/drivers/clk/qcom/videocc-sc7180.c
> > @@ -19,8 +19,6 @@
> >
> >   enum {
> >       P_BI_TCXO,
> > -     P_CHIP_SLEEP_CLK,
> > -     P_CORE_BI_PLL_TEST_SE,
> >       P_VIDEO_PLL0_OUT_EVEN,
> >       P_VIDEO_PLL0_OUT_MAIN,
> >       P_VIDEO_PLL0_OUT_ODD,
> >
>
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation.
>
> --



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
       [not found]       ` <161730706709.2260335.8947402948263904863@swboyd.mtv.corp.google.com>
@ 2021-04-01 20:58         ` Dmitry Baryshkov
  2021-04-01 23:06           ` Stephen Boyd
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-04-01 20:58 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Taniya Das, Andy Gross, Bjorn Andersson, Michael Turquette,
	DRM DRIVER FOR MSM ADRENO GPU, open list:COMMON CLK FRAMEWORK

On Thu, 1 Apr 2021 at 22:57, Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Dmitry Baryshkov (2021-03-27 01:13:56)
> > Hi Tanya,
> >
> > On Sat, 27 Mar 2021 at 04:49, Taniya Das <tdas@codeaurora.org> wrote:
> > >
> > > Hi Dmitry,
> > >
> > > Thanks for the patch for cleanup.
> > > It is okay to remove TEST source, but you can still keep the sleep clock
> > > source as it could be still connected to certain RCGs and could be used
> > > to derive low frequencies if required.
> > >
> > > As these sources are generated from the HW plans it would be good if we
> > > keep them as they are except the TEST source.
> >
> > Please note that I've barely removed the unused enum entry, which is
> > not used in any of clock parent maps. So I'd suggest to either add it
> > to relevant clock parent maps and to the videocc bindings or to drop
> > unused enum entry.
> >
>
> Is this going to be resent?

Is there a reason to resend the patches?
I'm not removing any actual clock sources, only unused(!) enum entries
are removed. No functional changes.


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
  2021-04-01 20:58         ` Dmitry Baryshkov
@ 2021-04-01 23:06           ` Stephen Boyd
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Boyd @ 2021-04-01 23:06 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Taniya Das, Andy Gross, Bjorn Andersson, Michael Turquette,
	DRM DRIVER FOR MSM ADRENO GPU, COMMON CLK FRAMEWORK,

Quoting Dmitry Baryshkov (2021-04-01 13:58:28)
> On Thu, 1 Apr 2021 at 22:57, Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Quoting Dmitry Baryshkov (2021-03-27 01:13:56)
> > > Hi Tanya,
> > >
> > > On Sat, 27 Mar 2021 at 04:49, Taniya Das <tdas@codeaurora.org> wrote:
> > > >
> > > > Hi Dmitry,
> > > >
> > > > Thanks for the patch for cleanup.
> > > > It is okay to remove TEST source, but you can still keep the sleep clock
> > > > source as it could be still connected to certain RCGs and could be used
> > > > to derive low frequencies if required.
> > > >
> > > > As these sources are generated from the HW plans it would be good if we
> > > > keep them as they are except the TEST source.
> > >
> > > Please note that I've barely removed the unused enum entry, which is
> > > not used in any of clock parent maps. So I'd suggest to either add it
> > > to relevant clock parent maps and to the videocc bindings or to drop
> > > unused enum entry.
> > >
> >
> > Is this going to be resent?
> 
> Is there a reason to resend the patches?
> I'm not removing any actual clock sources, only unused(!) enum entries
> are removed. No functional changes.
> 

That's fine if we're just removing enums. I was hoping Taniya would
respond with a reviewed-by tag or at least to this thread so we know
everyone is OK.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
  2021-03-27  8:13     ` Dmitry Baryshkov
       [not found]       ` <161730706709.2260335.8947402948263904863@swboyd.mtv.corp.google.com>
@ 2021-04-02  1:14       ` Taniya Das
  1 sibling, 0 replies; 28+ messages in thread
From: Taniya Das @ 2021-04-02  1:14 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette,
	open list:DRM DRIVER FOR MSM ADRENO GPU,
	open list:COMMON CLK FRAMEWORK


On 3/27/2021 1:43 PM, Dmitry Baryshkov wrote:
> Hi Tanya,
> 
> On Sat, 27 Mar 2021 at 04:49, Taniya Das <tdas@codeaurora.org> wrote:
>>
>> Hi Dmitry,
>>
>> Thanks for the patch for cleanup.
>> It is okay to remove TEST source, but you can still keep the sleep clock
>> source as it could be still connected to certain RCGs and could be used
>> to derive low frequencies if required.
>>
>> As these sources are generated from the HW plans it would be good if we
>> keep them as they are except the TEST source.
> 
> Please note that I've barely removed the unused enum entry, which is
> not used in any of clock parent maps. So I'd suggest to either add it
> to relevant clock parent maps and to the videocc bindings or to drop
> unused enum entry.
> 

Reviewed-by: Taniya Das <tdas@codeaurora.org>
>>
>> On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
>>> Drop unused enum entries from the list of parent enums.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>    drivers/clk/qcom/videocc-sc7180.c | 2 --
>>>    1 file changed, 2 deletions(-)
>>>
>>> diff --git a/drivers/clk/qcom/videocc-sc7180.c b/drivers/clk/qcom/videocc-sc7180.c
>>> index 276e5ecd4840..f5d04791a3cd 100644
>>> --- a/drivers/clk/qcom/videocc-sc7180.c
>>> +++ b/drivers/clk/qcom/videocc-sc7180.c
>>> @@ -19,8 +19,6 @@
>>>
>>>    enum {
>>>        P_BI_TCXO,
>>> -     P_CHIP_SLEEP_CLK,
>>> -     P_CORE_BI_PLL_TEST_SE,
>>>        P_VIDEO_PLL0_OUT_EVEN,
>>>        P_VIDEO_PLL0_OUT_MAIN,
>>>        P_VIDEO_PLL0_OUT_ODD,
>>>
>>
>> --
>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
>> of Code Aurora Forum, hosted by The Linux Foundation.
>>
>> --
> 
> 
> 

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 05/15] clk: qcom: gpucc-sm8250: drop unused enum entries
  2021-03-25 11:11 ` [PATCH v1 05/15] clk: qcom: gpucc-sm8250: " Dmitry Baryshkov
@ 2021-04-02  1:18   ` Taniya Das
  0 siblings, 0 replies; 28+ messages in thread
From: Taniya Das @ 2021-04-02  1:18 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Stephen Boyd,
	Michael Turquette
  Cc: linux-arm-msm, linux-clk

Reviewed-by: Taniya Das <tdas@codeaurora.org>

On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
> Drop unused enum entries from the list of parent enums.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/clk/qcom/gpucc-sm8250.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/clk/qcom/gpucc-sm8250.c b/drivers/clk/qcom/gpucc-sm8250.c
> index 3fa7d1f9ff98..67c136a77efb 100644
> --- a/drivers/clk/qcom/gpucc-sm8250.c
> +++ b/drivers/clk/qcom/gpucc-sm8250.c
> @@ -26,7 +26,6 @@
>   
>   enum {
>   	P_BI_TCXO,
> -	P_CORE_BI_PLL_TEST_SE,
>   	P_GPLL0_OUT_MAIN,
>   	P_GPLL0_OUT_MAIN_DIV,
>   	P_GPU_CC_PLL0_OUT_MAIN,
> 

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries
  2021-03-25 11:11 ` [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries Dmitry Baryshkov
@ 2021-04-02  1:19   ` Taniya Das
  0 siblings, 0 replies; 28+ messages in thread
From: Taniya Das @ 2021-04-02  1:19 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Stephen Boyd,
	Michael Turquette
  Cc: linux-arm-msm, linux-clk

Reviewed-by: Taniya Das <tdas@codeaurora.org>

On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
> Drop unused enum entries from the list of parent enums.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/clk/qcom/dispcc-sc7180.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/clk/qcom/dispcc-sc7180.c b/drivers/clk/qcom/dispcc-sc7180.c
> index f487515701e3..3334bf9cfb94 100644
> --- a/drivers/clk/qcom/dispcc-sc7180.c
> +++ b/drivers/clk/qcom/dispcc-sc7180.c
> @@ -19,8 +19,6 @@
>   
>   enum {
>   	P_BI_TCXO,
> -	P_CHIP_SLEEP_CLK,
> -	P_CORE_BI_PLL_TEST_SE,
>   	P_DISP_CC_PLL0_OUT_EVEN,
>   	P_DISP_CC_PLL0_OUT_MAIN,
>   	P_DP_PHY_PLL_LINK_CLK,
> 

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
  2021-03-25 11:11 ` [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources Dmitry Baryshkov
@ 2021-04-02  1:23   ` Taniya Das
  2021-04-02  1:32     ` Dmitry Baryshkov
  2021-04-02  1:49     ` Dmitry Baryshkov
  0 siblings, 2 replies; 28+ messages in thread
From: Taniya Das @ 2021-04-02  1:23 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Stephen Boyd,
	Michael Turquette
  Cc: linux-arm-msm, linux-clk

Hi Dmitry,

On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
> video_pll0_out_even/_odd are not supported neither in the upstream nor
> in the downstream kernels, so drop those clock sources.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/clk/qcom/videocc-sdm845.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/clk/qcom/videocc-sdm845.c b/drivers/clk/qcom/videocc-sdm845.c
> index 5d6a7724a194..7153f044504f 100644
> --- a/drivers/clk/qcom/videocc-sdm845.c
> +++ b/drivers/clk/qcom/videocc-sdm845.c
> @@ -21,24 +21,18 @@
>   enum {
>   	P_BI_TCXO,
>   	P_CORE_BI_PLL_TEST_SE,
> -	P_VIDEO_PLL0_OUT_EVEN,
>   	P_VIDEO_PLL0_OUT_MAIN,
> -	P_VIDEO_PLL0_OUT_ODD,
>   };
>   
>   static const struct parent_map video_cc_parent_map_0[] = {
>   	{ P_BI_TCXO, 0 },
>   	{ P_VIDEO_PLL0_OUT_MAIN, 1 },
> -	{ P_VIDEO_PLL0_OUT_EVEN, 2 },
> -	{ P_VIDEO_PLL0_OUT_ODD, 3 },

These are supported from the design, please do not remove them. It is 
just that in SW currently it is not being used.
But SW can decide to use them as they want. As said earlier these are 
defined in the HW plans and thus do not want them to be updated manually 
to create a mismatch.

>   	{ P_CORE_BI_PLL_TEST_SE, 4 },
>   };
>   
>   static const char * const video_cc_parent_names_0[] = {
>   	"bi_tcxo",
>   	"video_pll0",
> -	"video_pll0_out_even",
> -	"video_pll0_out_odd",
>   	"core_bi_pll_test_se",
>   };
>   
> @@ -79,7 +73,7 @@ static struct clk_rcg2 video_cc_venus_clk_src = {
>   	.clkr.hw.init = &(struct clk_init_data){
>   		.name = "video_cc_venus_clk_src",
>   		.parent_names = video_cc_parent_names_0,
> -		.num_parents = 5,
> +		.num_parents = 3,
>   		.flags = CLK_SET_RATE_PARENT,
>   		.ops = &clk_rcg2_shared_ops,
>   	},
> 

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
  2021-04-02  1:23   ` Taniya Das
@ 2021-04-02  1:32     ` Dmitry Baryshkov
  2021-04-02  1:49     ` Dmitry Baryshkov
  1 sibling, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-04-02  1:32 UTC (permalink / raw)
  To: Taniya Das
  Cc: Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette,
	open list:DRM DRIVER FOR MSM ADRENO GPU,
	open list:COMMON CLK FRAMEWORK

Hi Taniya,

On Fri, 2 Apr 2021 at 04:23, Taniya Das <tdas@codeaurora.org> wrote:
>
> Hi Dmitry,
>
> On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
> > video_pll0_out_even/_odd are not supported neither in the upstream nor
> > in the downstream kernels, so drop those clock sources.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >   drivers/clk/qcom/videocc-sdm845.c | 8 +-------
> >   1 file changed, 1 insertion(+), 7 deletions(-)
> >
> > diff --git a/drivers/clk/qcom/videocc-sdm845.c b/drivers/clk/qcom/videocc-sdm845.c
> > index 5d6a7724a194..7153f044504f 100644
> > --- a/drivers/clk/qcom/videocc-sdm845.c
> > +++ b/drivers/clk/qcom/videocc-sdm845.c
> > @@ -21,24 +21,18 @@
> >   enum {
> >       P_BI_TCXO,
> >       P_CORE_BI_PLL_TEST_SE,
> > -     P_VIDEO_PLL0_OUT_EVEN,
> >       P_VIDEO_PLL0_OUT_MAIN,
> > -     P_VIDEO_PLL0_OUT_ODD,
> >   };
> >
> >   static const struct parent_map video_cc_parent_map_0[] = {
> >       { P_BI_TCXO, 0 },
> >       { P_VIDEO_PLL0_OUT_MAIN, 1 },
> > -     { P_VIDEO_PLL0_OUT_EVEN, 2 },
> > -     { P_VIDEO_PLL0_OUT_ODD, 3 },
>
> These are supported from the design, please do not remove them. It is
> just that in SW currently it is not being used.
> But SW can decide to use them as they want. As said earlier these are
> defined in the HW plans and thus do not want them to be updated manually
> to create a mismatch.

I see your point here. I'll drop these patches and refresh the
parent_data conversion patches.

>
> >       { P_CORE_BI_PLL_TEST_SE, 4 },
> >   };
> >
> >   static const char * const video_cc_parent_names_0[] = {
> >       "bi_tcxo",
> >       "video_pll0",
> > -     "video_pll0_out_even",
> > -     "video_pll0_out_odd",
> >       "core_bi_pll_test_se",
> >   };
> >
> > @@ -79,7 +73,7 @@ static struct clk_rcg2 video_cc_venus_clk_src = {
> >       .clkr.hw.init = &(struct clk_init_data){
> >               .name = "video_cc_venus_clk_src",
> >               .parent_names = video_cc_parent_names_0,
> > -             .num_parents = 5,
> > +             .num_parents = 3,
> >               .flags = CLK_SET_RATE_PARENT,
> >               .ops = &clk_rcg2_shared_ops,
> >       },
> >
>
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation.
>
> --



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
  2021-04-02  1:23   ` Taniya Das
  2021-04-02  1:32     ` Dmitry Baryshkov
@ 2021-04-02  1:49     ` Dmitry Baryshkov
  2021-04-02 17:34       ` Stephen Boyd
  1 sibling, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-04-02  1:49 UTC (permalink / raw)
  To: Taniya Das, Andy Gross, Bjorn Andersson, Stephen Boyd, Michael Turquette
  Cc: linux-arm-msm, linux-clk

On 02/04/2021 04:23, Taniya Das wrote:
> Hi Dmitry,
> 
> On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
>> video_pll0_out_even/_odd are not supported neither in the upstream nor
>> in the downstream kernels, so drop those clock sources.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   drivers/clk/qcom/videocc-sdm845.c | 8 +-------
>>   1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/drivers/clk/qcom/videocc-sdm845.c 
>> b/drivers/clk/qcom/videocc-sdm845.c
>> index 5d6a7724a194..7153f044504f 100644
>> --- a/drivers/clk/qcom/videocc-sdm845.c
>> +++ b/drivers/clk/qcom/videocc-sdm845.c
>> @@ -21,24 +21,18 @@
>>   enum {
>>       P_BI_TCXO,
>>       P_CORE_BI_PLL_TEST_SE,
>> -    P_VIDEO_PLL0_OUT_EVEN,
>>       P_VIDEO_PLL0_OUT_MAIN,
>> -    P_VIDEO_PLL0_OUT_ODD,
>>   };
>>   static const struct parent_map video_cc_parent_map_0[] = {
>>       { P_BI_TCXO, 0 },
>>       { P_VIDEO_PLL0_OUT_MAIN, 1 },
>> -    { P_VIDEO_PLL0_OUT_EVEN, 2 },
>> -    { P_VIDEO_PLL0_OUT_ODD, 3 },
> 
> These are supported from the design, please do not remove them. It is 
> just that in SW currently it is not being used.
> But SW can decide to use them as they want. As said earlier these are 
> defined in the HW plans and thus do not want them to be updated manually 
> to create a mismatch.

The problem arises during conversion of these drivers to use parent_data 
instead of parent_names. You see, video_pll0_odd/_even are clocks which 
should be referenced using .hw (and thus defined inside the videocc 
driver) as we do for "video_pll0" parent. However there are no clk_hw 
entities defined for those clocks. For now I'd just use the { .name = 
video_pll0_out_odd" } entry for those clocks, however I still think this 
is not correct.

> 
>>       { P_CORE_BI_PLL_TEST_SE, 4 },
>>   };
>>   static const char * const video_cc_parent_names_0[] = {
>>       "bi_tcxo",
>>       "video_pll0",
>> -    "video_pll0_out_even",
>> -    "video_pll0_out_odd",
>>       "core_bi_pll_test_se",
>>   };
>> @@ -79,7 +73,7 @@ static struct clk_rcg2 video_cc_venus_clk_src = {
>>       .clkr.hw.init = &(struct clk_init_data){
>>           .name = "video_cc_venus_clk_src",
>>           .parent_names = video_cc_parent_names_0,
>> -        .num_parents = 5,
>> +        .num_parents = 3,
>>           .flags = CLK_SET_RATE_PARENT,
>>           .ops = &clk_rcg2_shared_ops,
>>       },
>>
> 


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
  2021-04-02  1:49     ` Dmitry Baryshkov
@ 2021-04-02 17:34       ` Stephen Boyd
  2021-04-02 20:01         ` Dmitry Baryshkov
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Boyd @ 2021-04-02 17:34 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Dmitry Baryshkov, Michael Turquette,
	Taniya Das
  Cc: linux-arm-msm, linux-clk

Quoting Dmitry Baryshkov (2021-04-01 18:49:37)
> On 02/04/2021 04:23, Taniya Das wrote:
> > Hi Dmitry,
> > 
> > On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
> >> video_pll0_out_even/_odd are not supported neither in the upstream nor
> >> in the downstream kernels, so drop those clock sources.
> >>
> >> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >> ---
> >>   drivers/clk/qcom/videocc-sdm845.c | 8 +-------
> >>   1 file changed, 1 insertion(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/clk/qcom/videocc-sdm845.c 
> >> b/drivers/clk/qcom/videocc-sdm845.c
> >> index 5d6a7724a194..7153f044504f 100644
> >> --- a/drivers/clk/qcom/videocc-sdm845.c
> >> +++ b/drivers/clk/qcom/videocc-sdm845.c
> >> @@ -21,24 +21,18 @@
> >>   enum {
> >>       P_BI_TCXO,
> >>       P_CORE_BI_PLL_TEST_SE,
> >> -    P_VIDEO_PLL0_OUT_EVEN,
> >>       P_VIDEO_PLL0_OUT_MAIN,
> >> -    P_VIDEO_PLL0_OUT_ODD,
> >>   };
> >>   static const struct parent_map video_cc_parent_map_0[] = {
> >>       { P_BI_TCXO, 0 },
> >>       { P_VIDEO_PLL0_OUT_MAIN, 1 },
> >> -    { P_VIDEO_PLL0_OUT_EVEN, 2 },
> >> -    { P_VIDEO_PLL0_OUT_ODD, 3 },
> > 
> > These are supported from the design, please do not remove them. It is 
> > just that in SW currently it is not being used.
> > But SW can decide to use them as they want. As said earlier these are 
> > defined in the HW plans and thus do not want them to be updated manually 
> > to create a mismatch.
> 
> The problem arises during conversion of these drivers to use parent_data 
> instead of parent_names. You see, video_pll0_odd/_even are clocks which 
> should be referenced using .hw (and thus defined inside the videocc 
> driver) as we do for "video_pll0" parent. However there are no clk_hw 
> entities defined for those clocks. For now I'd just use the { .name = 
> video_pll0_out_odd" } entry for those clocks, however I still think this 
> is not correct.
> 

Yes we shouldn't be adding .name anymore. Can we add the
video_pll0_out_{even,odd} clks? Or if they're not used then can we
remove them from the parent_data and leave some sort of comment
indicating that they may be there?

> > 
> >>       { P_CORE_BI_PLL_TEST_SE, 4 },
> >>   };
> >>   static const char * const video_cc_parent_names_0[] = {
> >>       "bi_tcxo",
> >>       "video_pll0",
> >> -    "video_pll0_out_even",
> >> -    "video_pll0_out_odd",
> >>       "core_bi_pll_test_se",

Looks like in this case it would be OK because the array would be length
2 instead of length 5.

> >>   };

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
  2021-04-02 17:34       ` Stephen Boyd
@ 2021-04-02 20:01         ` Dmitry Baryshkov
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2021-04-02 20:01 UTC (permalink / raw)
  To: Stephen Boyd, Andy Gross, Bjorn Andersson, Michael Turquette, Taniya Das
  Cc: linux-arm-msm, linux-clk

On 02/04/2021 20:34, Stephen Boyd wrote:
> Quoting Dmitry Baryshkov (2021-04-01 18:49:37)
>> On 02/04/2021 04:23, Taniya Das wrote:
>>> Hi Dmitry,
>>>
>>> On 3/25/2021 4:41 PM, Dmitry Baryshkov wrote:
>>>> video_pll0_out_even/_odd are not supported neither in the upstream nor
>>>> in the downstream kernels, so drop those clock sources.
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>> ---
>>>>    drivers/clk/qcom/videocc-sdm845.c | 8 +-------
>>>>    1 file changed, 1 insertion(+), 7 deletions(-)
>>>>
>>>> diff --git a/drivers/clk/qcom/videocc-sdm845.c
>>>> b/drivers/clk/qcom/videocc-sdm845.c
>>>> index 5d6a7724a194..7153f044504f 100644
>>>> --- a/drivers/clk/qcom/videocc-sdm845.c
>>>> +++ b/drivers/clk/qcom/videocc-sdm845.c
>>>> @@ -21,24 +21,18 @@
>>>>    enum {
>>>>        P_BI_TCXO,
>>>>        P_CORE_BI_PLL_TEST_SE,
>>>> -    P_VIDEO_PLL0_OUT_EVEN,
>>>>        P_VIDEO_PLL0_OUT_MAIN,
>>>> -    P_VIDEO_PLL0_OUT_ODD,
>>>>    };
>>>>    static const struct parent_map video_cc_parent_map_0[] = {
>>>>        { P_BI_TCXO, 0 },
>>>>        { P_VIDEO_PLL0_OUT_MAIN, 1 },
>>>> -    { P_VIDEO_PLL0_OUT_EVEN, 2 },
>>>> -    { P_VIDEO_PLL0_OUT_ODD, 3 },
>>>
>>> These are supported from the design, please do not remove them. It is
>>> just that in SW currently it is not being used.
>>> But SW can decide to use them as they want. As said earlier these are
>>> defined in the HW plans and thus do not want them to be updated manually
>>> to create a mismatch.
>>
>> The problem arises during conversion of these drivers to use parent_data
>> instead of parent_names. You see, video_pll0_odd/_even are clocks which
>> should be referenced using .hw (and thus defined inside the videocc
>> driver) as we do for "video_pll0" parent. However there are no clk_hw
>> entities defined for those clocks. For now I'd just use the { .name =
>> video_pll0_out_odd" } entry for those clocks, however I still think this
>> is not correct.
>>
> 
> Yes we shouldn't be adding .name anymore. Can we add the
> video_pll0_out_{even,odd} clks? Or if they're not used then can we
> remove them from the parent_data and leave some sort of comment
> indicating that they may be there?

Downstream kernel provides no information regarding these clocks. I'll 
just leave them commented out (but inplace).

> 
>>>
>>>>        { P_CORE_BI_PLL_TEST_SE, 4 },
>>>>    };
>>>>    static const char * const video_cc_parent_names_0[] = {
>>>>        "bi_tcxo",
>>>>        "video_pll0",
>>>> -    "video_pll0_out_even",
>>>> -    "video_pll0_out_odd",
>>>>        "core_bi_pll_test_se",
> 
> Looks like in this case it would be OK because the array would be length
> 2 instead of length 5.
> 
>>>>    };


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-04-02 20:01 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 11:11 [PATCH v1 00/15] clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries Dmitry Baryshkov
2021-04-02  1:19   ` Taniya Das
2021-03-25 11:11 ` [PATCH v1 02/15] clk: qcom: dispcc-sm8250: " Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 03/15] clk: qcom: gcc-sm8250: " Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 04/15] clk: qcom: gpucc-sm8150: " Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 05/15] clk: qcom: gpucc-sm8250: " Dmitry Baryshkov
2021-04-02  1:18   ` Taniya Das
2021-03-25 11:11 ` [PATCH v1 06/15] clk: qcom: videocc-sc7180: " Dmitry Baryshkov
2021-03-27  1:48   ` Taniya Das
2021-03-27  8:13     ` Dmitry Baryshkov
     [not found]       ` <161730706709.2260335.8947402948263904863@swboyd.mtv.corp.google.com>
2021-04-01 20:58         ` Dmitry Baryshkov
2021-04-01 23:06           ` Stephen Boyd
2021-04-02  1:14       ` Taniya Das
2021-03-25 11:11 ` [PATCH v1 07/15] clk: qcom: videocc-sm8150: " Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 08/15] clk: qcom: videocc-sm8250: " Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 09/15] clk: qcom: dispcc-sdm845: convert to parent data Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 10/15] clk: qcom: gpucc-sdm845: " Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 11/15] clk: qcom: gpucc-sdm845: get rid of the test clock Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 12/15] clk: qcom: dispcc-sdm845: " Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources Dmitry Baryshkov
2021-04-02  1:23   ` Taniya Das
2021-04-02  1:32     ` Dmitry Baryshkov
2021-04-02  1:49     ` Dmitry Baryshkov
2021-04-02 17:34       ` Stephen Boyd
2021-04-02 20:01         ` Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 14/15] clk: qcom: videocc-sdm845: convert to parent data Dmitry Baryshkov
2021-03-25 11:11 ` [PATCH v1 15/15] clk: qcom: videocc-sdm845: get rid of the test clock Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).