clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers
Subsystems (3)
cover clk: qcom: cleanup sm8250/sdm845/sc7180 clock drivers
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(-)
PATCH 1/15 clk: qcom: dispcc-sc7180: drop unused enum entries
Drop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/dispcc-sc7180.c | 2 -- 1 file changed, 2 deletions(-)
drivers/clk/qcom/dispcc-sc7180.c +0 -2
@@ -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 ,
Signature · 1 line
2.30.2
Re: [PATCH v1 01/15] clk: qcom: dispcc-sc7180: drop unused enum entries
Quoted 21 lines · Dmitry Baryshkov
Drop unused enum entries from the list of parent enums.
Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/clk/qcom/dispcc-sc7180.c | 2 -- 1 file changed, 2 deletions(-)drivers/clk/qcom/dispcc-sc7180.c +0
-2@@ -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 ,
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation. --
PATCH 2/15 clk: qcom: dispcc-sm8250: drop unused enum entries
In reply to Dmitry BaryshkovDrop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/dispcc-sm8250.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/clk/qcom/dispcc-sm8250.c +0 -8
@@ -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[] = {
Signature · 1 line
2.30.2
PATCH 3/15 clk: qcom: gcc-sm8250: drop unused enum entries
In reply to Dmitry BaryshkovDrop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/gcc-sm8250.c | 1 - 1 file changed, 1 deletion(-)
drivers/clk/qcom/gcc-sm8250.c +0 -1
@@ -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 ,
Signature · 1 line
2.30.2
PATCH 4/15 clk: qcom: gpucc-sm8150: drop unused enum entries
In reply to Dmitry BaryshkovDrop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/gpucc-sm8150.c | 1 - 1 file changed, 1 deletion(-)
drivers/clk/qcom/gpucc-sm8150.c +0 -1
@@ -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 ,
Signature · 1 line
2.30.2
PATCH 5/15 clk: qcom: gpucc-sm8250: drop unused enum entries
In reply to Dmitry BaryshkovDrop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/gpucc-sm8250.c | 1 - 1 file changed, 1 deletion(-)
drivers/clk/qcom/gpucc-sm8250.c +0 -1
@@ -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 ,
Signature · 1 line
2.30.2
Re: [PATCH v1 05/15] clk: qcom: gpucc-sm8250: drop unused enum entries
Quoted 20 lines · Dmitry Baryshkov
Drop unused enum entries from the list of parent enums.
Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/clk/qcom/gpucc-sm8250.c | 1 - 1 file changed, 1 deletion(-)drivers/clk/qcom/gpucc-sm8250.c +0
-1@@ -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 ,
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation. --
PATCH 6/15 clk: qcom: videocc-sc7180: drop unused enum entries
In reply to Dmitry BaryshkovDrop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/videocc-sc7180.c | 2 -- 1 file changed, 2 deletions(-)
drivers/clk/qcom/videocc-sc7180.c +0 -2
@@ -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 ,
Signature · 1 line
2.30.2
Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
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.
Quoted 21 lines · Dmitry Baryshkov
Drop unused enum entries from the list of parent enums.
Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/clk/qcom/videocc-sc7180.c | 2 -- 1 file changed, 2 deletions(-)drivers/clk/qcom/videocc-sc7180.c +0
-2@@ -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 ,
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation. --
Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
Hi Tanya,
Quoted 10 lines · Taniya Das
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.
Quoted 29 lines · Dmitry Baryshkov
Quoted 13 lines
Drop unused enum entries from the list of parent enums.
Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/clk/qcom/videocc-sc7180.c | 2 -- 1 file changed, 2 deletions(-)drivers/clk/qcom/videocc-sc7180.c +0
-0drivers/clk/qcom/videocc-sc7180.c line 24
Quoted 8 lines
drivers/clk/qcom/videocc-sc7180.c +0
-2@@ -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.--
Signature · 2 lines
With best wishes Dmitry
A message that is not in the archive (sent off-list or not yet received): 161730706709.2260335.8947402948263904863@swboyd.mtv.corp.google.com
Re: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
Quoted 16 lines · Stephen Boyd
Quoting Dmitry Baryshkov (2021-03-27 01:13:56)
Quoted 14 lines
Hi Tanya,
Quoted 10 lines · Taniya Das
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.
Quoted 7 lines
Quoted 5 lines
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.
Signature · 2 lines
With best wishes Dmitry
Stephen Boyd
maintainerRe: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
Quoting Dmitry Baryshkov (2021-04-01 13:58:28)
Quoted 23 lines · Stephen Boyd
Quoted 22 lines
Quoting Dmitry Baryshkov (2021-03-27 01:13:56)
Quoted 19 lines
Hi Tanya,
Quoted 10 lines · Taniya Das
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.
Quoted 6 lines
Quoted 1 line
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.
Taniya Das
Reviewed-byRe: [PATCH v1 06/15] clk: qcom: videocc-sc7180: drop unused enum entries
In reply to Dmitry BaryshkovQuoted 11 lines · Dmitry Baryshkov
Hi Tanya,
Quoted 8 lines · Taniya Das
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.
Quoted 8 lines
Quoted 2 lines
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.
Quoted 32 lines
Quoted 29 lines · Dmitry Baryshkov
Quoted 13 lines
Drop unused enum entries from the list of parent enums.
Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/clk/qcom/videocc-sc7180.c | 2 -- 1 file changed, 2 deletions(-)drivers/clk/qcom/videocc-sc7180.c +0
-0drivers/clk/qcom/videocc-sc7180.c line 24
Quoted 8 lines
drivers/clk/qcom/videocc-sc7180.c +0
-2@@ -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.--
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation. --
PATCH 7/15 clk: qcom: videocc-sm8150: drop unused enum entries
In reply to Dmitry BaryshkovDrop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/videocc-sm8150.c | 2 -- 1 file changed, 2 deletions(-)
drivers/clk/qcom/videocc-sm8150.c +0 -2
@@ -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 ,
Signature · 1 line
2.30.2
PATCH 8/15 clk: qcom: videocc-sm8250: drop unused enum entries
In reply to Dmitry BaryshkovDrop unused enum entries from the list of parent enums.
--- drivers/clk/qcom/videocc-sm8250.c | 2 -- 1 file changed, 2 deletions(-)
drivers/clk/qcom/videocc-sm8250.c +0 -2
@@ -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 , };
Signature · 1 line
2.30.2
PATCH 9/15 clk: qcom: dispcc-sdm845: convert to parent data
In reply to Dmitry BaryshkovConvert 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.
--- drivers/clk/qcom/dispcc-sdm845.c | 188 ++++++++++++++++--------------- 1 file changed, 95 insertions(+), 93 deletions(-)
drivers/clk/qcom/dispcc-sdm845.c +95 -93
@@ -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 ,
Signature · 1 line
2.30.2
PATCH 10/15 clk: qcom: gpucc-sdm845: convert to parent data
In reply to Dmitry BaryshkovConvert 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.
--- drivers/clk/qcom/gpucc-sdm845.c | 42 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 20 deletions(-)
drivers/clk/qcom/gpucc-sdm845.c +22 -20
@@ -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 ,
Signature · 1 line
2.30.2
PATCH 11/15 clk: qcom: gpucc-sdm845: get rid of the test clock
In reply to Dmitry BaryshkovThe test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it.
--- drivers/clk/qcom/gpucc-sdm845.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/clk/qcom/gpucc-sdm845.c +1 -4
@@ -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, }, };
Signature · 1 line
2.30.2
PATCH 12/15 clk: qcom: dispcc-sdm845: get rid of the test clock
In reply to Dmitry BaryshkovThe test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it.
--- drivers/clk/qcom/dispcc-sdm845.c | 39 ++++++++++++-------------------- 1 file changed, 14 insertions(+), 25 deletions(-)
drivers/clk/qcom/dispcc-sdm845.c +14 -25
@@ -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, }, };
Signature · 1 line
2.30.2
PATCH 13/15 clk: qcom: videocc-sdm845: remove unsupported clock sources
In reply to Dmitry Baryshkovvideo_pll0_out_even/_odd are not supported neither in the upstream nor in the downstream kernels, so drop those clock sources.
--- drivers/clk/qcom/videocc-sdm845.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/clk/qcom/videocc-sdm845.c +1 -7
@@ -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, },
Signature · 1 line
2.30.2
Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
Hi Dmitry,
Quoted 16 lines · Dmitry Baryshkov
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 <[email protected]>--- drivers/clk/qcom/videocc-sdm845.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)drivers/clk/qcom/videocc-sdm845.c +0
-0@@ -21,24 +21,18 @@enum {P_BI_TCXO ,P_CORE_BI_PLL_TEST_SE ,
drivers/clk/qcom/videocc-sdm845.c line 33
Quoted 10 lines
drivers/clk/qcom/videocc-sdm845.c +0
-4-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.
Quoted 21 lines
drivers/clk/qcom/videocc-sdm845.c +1
-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, },
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation. --
Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
Hi Taniya,
Quoted 25 lines · Taniya Das
Hi Dmitry,
Quoted 21 lines · Dmitry Baryshkov
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 <[email protected]>--- drivers/clk/qcom/videocc-sdm845.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)drivers/clk/qcom/videocc-sdm845.c +0
-2@@ -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 , };
Quoted 11 lines
drivers/clk/qcom/videocc-sdm845.c line 33
Quoted 5 lines
drivers/clk/qcom/videocc-sdm845.c +0
-2static 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.
Quoted 28 lines
Quoted 14 lines
drivers/clk/qcom/videocc-sdm845.c +0
-2{ 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" , };drivers/clk/qcom/videocc-sdm845.c static struct clk_rcg2 video_cc_venus_clk_src = { · line 79
Quoted 8 lines
drivers/clk/qcom/videocc-sdm845.c +1
-1@@ -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.--
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
In reply to Taniya DasQuoted 23 lines · Taniya Das
Hi Dmitry,
Quoted 20 lines · Dmitry Baryshkov
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 <[email protected]>---
drivers/clk/qcom/videocc-sdm845.c| 8 +-------1 file changed, 1 insertion(+), 7 deletions(-)drivers/clk/qcom/videocc-sdm845.c +0
-2@@ -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, };
Quoted 8 lines
drivers/clk/qcom/videocc-sdm845.c line 33
Quoted 5 lines
drivers/clk/qcom/videocc-sdm845.c +0
-2static 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.
Quoted 21 lines
Quoted 20 lines
drivers/clk/qcom/videocc-sdm845.c +1
-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, },
Signature · 2 lines
With best wishes Dmitry
Stephen Boyd
maintainerRe: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
Quoting Dmitry Baryshkov (2021-04-01 18:49:37)
Quoted 37 lines · Taniya Das
Quoted 27 lines
Hi Dmitry,
Quoted 24 lines · Dmitry Baryshkov
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 <[email protected]>---
drivers/clk/qcom/videocc-sdm845.c| 8 +-------1 file changed, 1 insertion(+), 7 deletions(-)drivers/clk/qcom/videocc-sdm845.c +0
-2@@ -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 },Quoted 8 lines
drivers/clk/qcom/videocc-sdm845.c line 33
Quoted 2 lines
drivers/clk/qcom/videocc-sdm845.c +0
-2- { 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.
Quoted 8 lines
The problem arises during conversion of these drivers to use
parent_datainstead ofparent_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 noclk_hwentities 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?
Quoted 9 lines
Quoted 9 lines
drivers/clk/qcom/videocc-sdm845.c line 36
Quoted 9 lines
drivers/clk/qcom/videocc-sdm845.c +0
-2{ 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.
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/clk/qcom/videocc-sdm845.c +0
-0};
Re: [PATCH v1 13/15] clk: qcom: videocc-sdm845: remove unsupported clock sources
Quoted 47 lines · Stephen Boyd
Quoting Dmitry Baryshkov (2021-04-01 18:49:37)
Quoted 37 lines · Taniya Das
Quoted 27 lines
Hi Dmitry,
Quoted 24 lines · Dmitry Baryshkov
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 <[email protected]>--- drivers/clk/qcom/videocc-sdm845.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)drivers/clk/qcom/videocc-sdm845.c +0
-2@@ -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 },Quoted 8 lines
drivers/clk/qcom/videocc-sdm845.c line 33
Quoted 2 lines
drivers/clk/qcom/videocc-sdm845.c +0
-2- { 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.Quoted 8 lines
The problem arises during conversion of these drivers to use
parent_datainstead ofparent_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 noclk_hwentities 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.
Quoted 4 lines
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_dataand 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).
Quoted 15 lines
Quoted 10 lines
Quoted 10 lines
drivers/clk/qcom/videocc-sdm845.c line 36
Quoted 10 lines
drivers/clk/qcom/videocc-sdm845.c +0
-2{ 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.
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/clk/qcom/videocc-sdm845.c +0
-0};
Signature · 2 lines
With best wishes Dmitry
PATCH 14/15 clk: qcom: videocc-sdm845: convert to parent data
In reply to Dmitry BaryshkovConvert 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.
--- drivers/clk/qcom/videocc-sdm845.c | 42 ++++++++++++++++--------------- 1 file changed, 22 insertions(+), 20 deletions(-)
drivers/clk/qcom/videocc-sdm845.c +22 -20
@@ -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 ,
Signature · 1 line
2.30.2
PATCH 15/15 clk: qcom: videocc-sdm845: get rid of the test clock
In reply to Dmitry BaryshkovThe test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it.
--- drivers/clk/qcom/videocc-sdm845.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/clk/qcom/videocc-sdm845.c +1 -4
@@ -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, },
Signature · 1 line
2.30.2