clk: qcom: sc7280: Update clk_init_data to const for clock controllers
Subsystems (3)
PATCH 1/2 clk: qcom: sc7280: Update clk_init_data to const for clock controllers
Update clk_init_data to const and also use index instead of fw_name for global clock controller, camera and display clock controllers.
--- drivers/clk/qcom/camcc-sc7280.c | 252 ++++++++++----------- drivers/clk/qcom/dispcc-sc7280.c | 102 ++++----- drivers/clk/qcom/gcc-sc7280.c | 362 +++++++++++++++---------------- 3 files changed, 358 insertions(+), 358 deletions(-)
drivers/clk/qcom/camcc-sc7280.c +126 -126
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* Copyright (c) 2021, The Linux Foundation. All rights reserved. +* Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include <linux/clk-provider.h>
@@ -63,10 +63,10 @@ static struct clk_alpha_pll cam_cc_pll0 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_pll0", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -86,7 +86,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll0_out_even = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_even), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll0_out_even" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll0.clkr.hw,
@@ -109,7 +109,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll0_out_odd = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_odd), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll0_out_odd" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll0.clkr.hw,
@@ -138,10 +138,10 @@ static struct clk_alpha_pll cam_cc_pll1 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_pll1", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -161,7 +161,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll1_out_even = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll1_out_even), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll1_out_even" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll1.clkr.hw,
@@ -188,10 +188,10 @@ static struct clk_alpha_pll cam_cc_pll2 = { .num_vco = ARRAY_SIZE(zonda_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_ZONDA], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_pll2", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_zonda_ops,
@@ -211,7 +211,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll2_out_aux = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll2_out_aux), .width = 2, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_ZONDA], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll2_out_aux" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll2.clkr.hw,
@@ -234,7 +234,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll2_out_aux2 = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll2_out_aux2), .width = 2, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_ZONDA], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll2_out_aux2" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll2.clkr.hw,
@@ -263,10 +263,10 @@ static struct clk_alpha_pll cam_cc_pll3 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_pll3", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -286,7 +286,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll3_out_even = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll3_out_even), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll3_out_even" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll3.clkr.hw,
@@ -315,10 +315,10 @@ static struct clk_alpha_pll cam_cc_pll4 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_pll4", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -338,7 +338,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll4_out_even = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll4_out_even), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll4_out_even" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll4.clkr.hw,
@@ -367,10 +367,10 @@ static struct clk_alpha_pll cam_cc_pll5 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_pll5", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -390,7 +390,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll5_out_even = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll5_out_even), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll5_out_even" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll5.clkr.hw,
@@ -419,10 +419,10 @@ static struct clk_alpha_pll cam_cc_pll6 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_pll6", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -442,7 +442,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll6_out_even = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_even), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll6_out_even" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll6.clkr.hw,
@@ -465,7 +465,7 @@ static struct clk_alpha_pll_postdiv cam_cc_pll6_out_odd = { .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_odd), .width = 4, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_pll6_out_odd" , .parent_data = &(const struct clk_parent_data ){ .hw = &cam_cc_pll6.clkr.hw,
@@ -485,7 +485,7 @@ static const struct parent_map cam_cc_parent_map_0[] = { };static const struct clk_parent_data cam_cc_parent_data_0[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll0.clkr.hw }, { .hw = &cam_cc_pll0_out_even.clkr.hw }, { .hw = &cam_cc_pll0_out_odd.clkr.hw },
@@ -502,7 +502,7 @@ static const struct parent_map cam_cc_parent_map_1[] = { };static const struct clk_parent_data cam_cc_parent_data_1[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll0.clkr.hw }, { .hw = &cam_cc_pll0_out_even.clkr.hw }, { .hw = &cam_cc_pll0_out_odd.clkr.hw },
@@ -517,7 +517,7 @@ static const struct parent_map cam_cc_parent_map_2[] = { };static const struct clk_parent_data cam_cc_parent_data_2[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll2_out_aux2.clkr.hw }, { .hw = &cam_cc_pll2.clkr.hw }, };
@@ -532,7 +532,7 @@ static const struct parent_map cam_cc_parent_map_3[] = { };static const struct clk_parent_data cam_cc_parent_data_3[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll0.clkr.hw }, { .hw = &cam_cc_pll0_out_even.clkr.hw }, { .hw = &cam_cc_pll0_out_odd.clkr.hw },
@@ -546,7 +546,7 @@ static const struct parent_map cam_cc_parent_map_4[] = { };static const struct clk_parent_data cam_cc_parent_data_4[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll3_out_even.clkr.hw }, };
@@ -556,7 +556,7 @@ static const struct parent_map cam_cc_parent_map_5[] = { };static const struct clk_parent_data cam_cc_parent_data_5[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll4_out_even.clkr.hw }, };
@@ -566,7 +566,7 @@ static const struct parent_map cam_cc_parent_map_6[] = { };static const struct clk_parent_data cam_cc_parent_data_6[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll5_out_even.clkr.hw }, };
@@ -576,7 +576,7 @@ static const struct parent_map cam_cc_parent_map_7[] = { };static const struct clk_parent_data cam_cc_parent_data_7[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &cam_cc_pll1_out_even.clkr.hw }, };
@@ -585,7 +585,7 @@ static const struct parent_map cam_cc_parent_map_8[] = { };static const struct clk_parent_data cam_cc_parent_data_8[] = { - { .fw_name ="sleep_clk" }, + { .index =2 }, };static const struct parent_map cam_cc_parent_map_9[] = {
@@ -593,7 +593,7 @@ static const struct parent_map cam_cc_parent_map_9[] = { };static const struct clk_parent_data cam_cc_parent_data_9_ao[] = { - { .fw_name ="bi_tcxo_ao" }, + { .index =1 }, };static const struct freq_tbl ftbl_cam_cc_bps_clk_src[] = {
@@ -612,7 +612,7 @@ static struct clk_rcg2 cam_cc_bps_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_bps_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_bps_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -636,7 +636,7 @@ static struct clk_rcg2 cam_cc_camnoc_axi_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_3, .freq_tbl = ftbl_cam_cc_camnoc_axi_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_camnoc_axi_clk_src" , .parent_data = cam_cc_parent_data_3, .num_parents =ARRAY_SIZE (cam_cc_parent_data_3),
@@ -656,7 +656,7 @@ static struct clk_rcg2 cam_cc_cci_0_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_cci_0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_cci_0_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -670,7 +670,7 @@ static struct clk_rcg2 cam_cc_cci_1_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_cci_0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_cci_1_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -691,7 +691,7 @@ static struct clk_rcg2 cam_cc_cphy_rx_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_1, .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_cphy_rx_clk_src" , .parent_data = cam_cc_parent_data_1, .num_parents =ARRAY_SIZE (cam_cc_parent_data_1),
@@ -711,7 +711,7 @@ static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_csi0phytimer_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -725,7 +725,7 @@ static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_csi1phytimer_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -739,7 +739,7 @@ static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_csi2phytimer_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -753,7 +753,7 @@ static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_csi3phytimer_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -767,7 +767,7 @@ static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_csi4phytimer_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -791,7 +791,7 @@ static struct clk_rcg2 cam_cc_fast_ahb_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_fast_ahb_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_fast_ahb_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -813,7 +813,7 @@ static struct clk_rcg2 cam_cc_icp_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_icp_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_icp_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -836,7 +836,7 @@ static struct clk_rcg2 cam_cc_ife_0_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_4, .freq_tbl = ftbl_cam_cc_ife_0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_0_clk_src" , .parent_data = cam_cc_parent_data_4, .num_parents =ARRAY_SIZE (cam_cc_parent_data_4),
@@ -860,7 +860,7 @@ static struct clk_rcg2 cam_cc_ife_1_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_5, .freq_tbl = ftbl_cam_cc_ife_1_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_1_clk_src" , .parent_data = cam_cc_parent_data_5, .num_parents =ARRAY_SIZE (cam_cc_parent_data_5),
@@ -883,7 +883,7 @@ static struct clk_rcg2 cam_cc_ife_0_csid_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_1, .freq_tbl = ftbl_cam_cc_ife_0_csid_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_0_csid_clk_src" , .parent_data = cam_cc_parent_data_1, .num_parents =ARRAY_SIZE (cam_cc_parent_data_1),
@@ -897,7 +897,7 @@ static struct clk_rcg2 cam_cc_ife_1_csid_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_1, .freq_tbl = ftbl_cam_cc_ife_0_csid_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_1_csid_clk_src" , .parent_data = cam_cc_parent_data_1, .num_parents =ARRAY_SIZE (cam_cc_parent_data_1),
@@ -920,7 +920,7 @@ static struct clk_rcg2 cam_cc_ife_2_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_6, .freq_tbl = ftbl_cam_cc_ife_2_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_2_clk_src" , .parent_data = cam_cc_parent_data_6, .num_parents =ARRAY_SIZE (cam_cc_parent_data_6),
@@ -935,7 +935,7 @@ static struct clk_rcg2 cam_cc_ife_2_csid_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_1, .freq_tbl = ftbl_cam_cc_ife_0_csid_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_2_csid_clk_src" , .parent_data = cam_cc_parent_data_1, .num_parents =ARRAY_SIZE (cam_cc_parent_data_1),
@@ -958,7 +958,7 @@ static struct clk_rcg2 cam_cc_ife_lite_0_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_3, .freq_tbl = ftbl_cam_cc_ife_lite_0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_lite_0_clk_src" , .parent_data = cam_cc_parent_data_3, .num_parents =ARRAY_SIZE (cam_cc_parent_data_3),
@@ -972,7 +972,7 @@ static struct clk_rcg2 cam_cc_ife_lite_0_csid_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_1, .freq_tbl = ftbl_cam_cc_ife_0_csid_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_lite_0_csid_clk_src" , .parent_data = cam_cc_parent_data_1, .num_parents =ARRAY_SIZE (cam_cc_parent_data_1),
@@ -986,7 +986,7 @@ static struct clk_rcg2 cam_cc_ife_lite_1_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_3, .freq_tbl = ftbl_cam_cc_ife_lite_0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_lite_1_clk_src" , .parent_data = cam_cc_parent_data_3, .num_parents =ARRAY_SIZE (cam_cc_parent_data_3),
@@ -1000,7 +1000,7 @@ static struct clk_rcg2 cam_cc_ife_lite_1_csid_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_1, .freq_tbl = ftbl_cam_cc_ife_0_csid_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ife_lite_1_csid_clk_src" , .parent_data = cam_cc_parent_data_1, .num_parents =ARRAY_SIZE (cam_cc_parent_data_1),
@@ -1023,7 +1023,7 @@ static struct clk_rcg2 cam_cc_ipe_0_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_7, .freq_tbl = ftbl_cam_cc_ipe_0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_ipe_0_clk_src" , .parent_data = cam_cc_parent_data_7, .num_parents =ARRAY_SIZE (cam_cc_parent_data_7),
@@ -1038,7 +1038,7 @@ static struct clk_rcg2 cam_cc_jpeg_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_bps_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_jpeg_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -1062,7 +1062,7 @@ static struct clk_rcg2 cam_cc_lrme_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_3, .freq_tbl = ftbl_cam_cc_lrme_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_lrme_clk_src" , .parent_data = cam_cc_parent_data_3, .num_parents =ARRAY_SIZE (cam_cc_parent_data_3),
@@ -1083,7 +1083,7 @@ static struct clk_rcg2 cam_cc_mclk0_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_2, .freq_tbl = ftbl_cam_cc_mclk0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_mclk0_clk_src" , .parent_data = cam_cc_parent_data_2, .num_parents =ARRAY_SIZE (cam_cc_parent_data_2),
@@ -1097,7 +1097,7 @@ static struct clk_rcg2 cam_cc_mclk1_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_2, .freq_tbl = ftbl_cam_cc_mclk0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_mclk1_clk_src" , .parent_data = cam_cc_parent_data_2, .num_parents =ARRAY_SIZE (cam_cc_parent_data_2),
@@ -1111,7 +1111,7 @@ static struct clk_rcg2 cam_cc_mclk2_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_2, .freq_tbl = ftbl_cam_cc_mclk0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_mclk2_clk_src" , .parent_data = cam_cc_parent_data_2, .num_parents =ARRAY_SIZE (cam_cc_parent_data_2),
@@ -1125,7 +1125,7 @@ static struct clk_rcg2 cam_cc_mclk3_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_2, .freq_tbl = ftbl_cam_cc_mclk0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_mclk3_clk_src" , .parent_data = cam_cc_parent_data_2, .num_parents =ARRAY_SIZE (cam_cc_parent_data_2),
@@ -1139,7 +1139,7 @@ static struct clk_rcg2 cam_cc_mclk4_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_2, .freq_tbl = ftbl_cam_cc_mclk0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_mclk4_clk_src" , .parent_data = cam_cc_parent_data_2, .num_parents =ARRAY_SIZE (cam_cc_parent_data_2),
@@ -1153,7 +1153,7 @@ static struct clk_rcg2 cam_cc_mclk5_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_2, .freq_tbl = ftbl_cam_cc_mclk0_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_mclk5_clk_src" , .parent_data = cam_cc_parent_data_2, .num_parents =ARRAY_SIZE (cam_cc_parent_data_2),
@@ -1172,7 +1172,7 @@ static struct clk_rcg2 cam_cc_sleep_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_8, .freq_tbl = ftbl_cam_cc_sleep_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_sleep_clk_src" , .parent_data = cam_cc_parent_data_8, .num_parents =ARRAY_SIZE (cam_cc_parent_data_8),
@@ -1192,7 +1192,7 @@ static struct clk_rcg2 cam_cc_slow_ahb_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_0, .freq_tbl = ftbl_cam_cc_slow_ahb_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_slow_ahb_clk_src" , .parent_data = cam_cc_parent_data_0, .num_parents =ARRAY_SIZE (cam_cc_parent_data_0),
@@ -1211,7 +1211,7 @@ static struct clk_rcg2 cam_cc_xo_clk_src = { .hid_width = 5, .parent_map = cam_cc_parent_map_9, .freq_tbl = ftbl_cam_cc_xo_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="cam_cc_xo_clk_src" , .parent_data = cam_cc_parent_data_9_ao, .num_parents =ARRAY_SIZE (cam_cc_parent_data_9_ao),
@@ -1225,7 +1225,7 @@ static struct clk_branch cam_cc_bps_ahb_clk = { .clkr = { .enable_reg = 0x7070, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_bps_ahb_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_slow_ahb_clk_src.clkr.hw,
@@ -1243,7 +1243,7 @@ static struct clk_branch cam_cc_bps_areg_clk = { .clkr = { .enable_reg = 0x7054, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_bps_areg_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_fast_ahb_clk_src.clkr.hw,
@@ -1261,7 +1261,7 @@ static struct clk_branch cam_cc_bps_axi_clk = { .clkr = { .enable_reg = 0x7038, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_bps_axi_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_camnoc_axi_clk_src.clkr.hw,
@@ -1279,7 +1279,7 @@ static struct clk_branch cam_cc_bps_clk = { .clkr = { .enable_reg = 0x7028, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_bps_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_bps_clk_src.clkr.hw,
@@ -1297,7 +1297,7 @@ static struct clk_branch cam_cc_camnoc_axi_clk = { .clkr = { .enable_reg = 0xc140, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_camnoc_axi_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_camnoc_axi_clk_src.clkr.hw,
@@ -1315,7 +1315,7 @@ static struct clk_branch cam_cc_camnoc_dcd_xo_clk = { .clkr = { .enable_reg = 0xc148, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_camnoc_dcd_xo_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_xo_clk_src.clkr.hw,
@@ -1333,7 +1333,7 @@ static struct clk_branch cam_cc_cci_0_clk = { .clkr = { .enable_reg = 0xc0f8, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_cci_0_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cci_0_clk_src.clkr.hw,
@@ -1351,7 +1351,7 @@ static struct clk_branch cam_cc_cci_1_clk = { .clkr = { .enable_reg = 0xc114, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_cci_1_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cci_1_clk_src.clkr.hw,
@@ -1369,7 +1369,7 @@ static struct clk_branch cam_cc_core_ahb_clk = { .clkr = { .enable_reg = 0xc1a0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_core_ahb_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_slow_ahb_clk_src.clkr.hw,
@@ -1387,7 +1387,7 @@ static struct clk_branch cam_cc_cpas_ahb_clk = { .clkr = { .enable_reg = 0xc11c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_cpas_ahb_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_slow_ahb_clk_src.clkr.hw,
@@ -1405,7 +1405,7 @@ static struct clk_branch cam_cc_csi0phytimer_clk = { .clkr = { .enable_reg = 0xe0c4, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csi0phytimer_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_csi0phytimer_clk_src.clkr.hw,
@@ -1423,7 +1423,7 @@ static struct clk_branch cam_cc_csi1phytimer_clk = { .clkr = { .enable_reg = 0xe0e8, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csi1phytimer_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_csi1phytimer_clk_src.clkr.hw,
@@ -1441,7 +1441,7 @@ static struct clk_branch cam_cc_csi2phytimer_clk = { .clkr = { .enable_reg = 0xe10c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csi2phytimer_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_csi2phytimer_clk_src.clkr.hw,
@@ -1459,7 +1459,7 @@ static struct clk_branch cam_cc_csi3phytimer_clk = { .clkr = { .enable_reg = 0xe134, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csi3phytimer_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_csi3phytimer_clk_src.clkr.hw,
@@ -1477,7 +1477,7 @@ static struct clk_branch cam_cc_csi4phytimer_clk = { .clkr = { .enable_reg = 0xe158, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csi4phytimer_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_csi4phytimer_clk_src.clkr.hw,
@@ -1495,7 +1495,7 @@ static struct clk_branch cam_cc_csiphy0_clk = { .clkr = { .enable_reg = 0xe0c8, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csiphy0_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1513,7 +1513,7 @@ static struct clk_branch cam_cc_csiphy1_clk = { .clkr = { .enable_reg = 0xe0ec, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csiphy1_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1531,7 +1531,7 @@ static struct clk_branch cam_cc_csiphy2_clk = { .clkr = { .enable_reg = 0xe110, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csiphy2_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1549,7 +1549,7 @@ static struct clk_branch cam_cc_csiphy3_clk = { .clkr = { .enable_reg = 0xe138, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csiphy3_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1567,7 +1567,7 @@ static struct clk_branch cam_cc_csiphy4_clk = { .clkr = { .enable_reg = 0xe15c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_csiphy4_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1585,7 +1585,7 @@ static struct clk_branch cam_cc_gdsc_clk = { .clkr = { .enable_reg = 0xc1bc, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_gdsc_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_xo_clk_src.clkr.hw,
@@ -1603,7 +1603,7 @@ static struct clk_branch cam_cc_icp_ahb_clk = { .clkr = { .enable_reg = 0xc0d8, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_icp_ahb_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_slow_ahb_clk_src.clkr.hw,
@@ -1621,7 +1621,7 @@ static struct clk_branch cam_cc_icp_clk = { .clkr = { .enable_reg = 0xc0d0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_icp_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_icp_clk_src.clkr.hw,
@@ -1639,7 +1639,7 @@ static struct clk_branch cam_cc_ife_0_axi_clk = { .clkr = { .enable_reg = 0xa080, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_0_axi_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_camnoc_axi_clk_src.clkr.hw,
@@ -1657,7 +1657,7 @@ static struct clk_branch cam_cc_ife_0_clk = { .clkr = { .enable_reg = 0xa028, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_0_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_0_clk_src.clkr.hw,
@@ -1675,7 +1675,7 @@ static struct clk_branch cam_cc_ife_0_cphy_rx_clk = { .clkr = { .enable_reg = 0xa07c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_0_cphy_rx_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1693,7 +1693,7 @@ static struct clk_branch cam_cc_ife_0_csid_clk = { .clkr = { .enable_reg = 0xa054, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_0_csid_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_0_csid_clk_src.clkr.hw,
@@ -1711,7 +1711,7 @@ static struct clk_branch cam_cc_ife_0_dsp_clk = { .clkr = { .enable_reg = 0xa038, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_0_dsp_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_0_clk_src.clkr.hw,
@@ -1729,7 +1729,7 @@ static struct clk_branch cam_cc_ife_1_axi_clk = { .clkr = { .enable_reg = 0xb068, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_1_axi_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_camnoc_axi_clk_src.clkr.hw,
@@ -1747,7 +1747,7 @@ static struct clk_branch cam_cc_ife_1_clk = { .clkr = { .enable_reg = 0xb028, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_1_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_1_clk_src.clkr.hw,
@@ -1765,7 +1765,7 @@ static struct clk_branch cam_cc_ife_1_cphy_rx_clk = { .clkr = { .enable_reg = 0xb064, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_1_cphy_rx_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1783,7 +1783,7 @@ static struct clk_branch cam_cc_ife_1_csid_clk = { .clkr = { .enable_reg = 0xb054, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_1_csid_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_1_csid_clk_src.clkr.hw,
@@ -1801,7 +1801,7 @@ static struct clk_branch cam_cc_ife_1_dsp_clk = { .clkr = { .enable_reg = 0xb038, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_1_dsp_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_1_clk_src.clkr.hw,
@@ -1819,7 +1819,7 @@ static struct clk_branch cam_cc_ife_2_axi_clk = { .clkr = { .enable_reg = 0xb0d4, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_2_axi_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_camnoc_axi_clk_src.clkr.hw,
@@ -1837,7 +1837,7 @@ static struct clk_branch cam_cc_ife_2_clk = { .clkr = { .enable_reg = 0xb094, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_2_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_2_clk_src.clkr.hw,
@@ -1855,7 +1855,7 @@ static struct clk_branch cam_cc_ife_2_cphy_rx_clk = { .clkr = { .enable_reg = 0xb0d0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_2_cphy_rx_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1873,7 +1873,7 @@ static struct clk_branch cam_cc_ife_2_csid_clk = { .clkr = { .enable_reg = 0xb0c0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_2_csid_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_2_csid_clk_src.clkr.hw,
@@ -1891,7 +1891,7 @@ static struct clk_branch cam_cc_ife_2_dsp_clk = { .clkr = { .enable_reg = 0xb0a4, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_2_dsp_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_2_clk_src.clkr.hw,
@@ -1909,7 +1909,7 @@ static struct clk_branch cam_cc_ife_lite_0_clk = { .clkr = { .enable_reg = 0xc01c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_lite_0_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_lite_0_clk_src.clkr.hw,
@@ -1927,7 +1927,7 @@ static struct clk_branch cam_cc_ife_lite_0_cphy_rx_clk = { .clkr = { .enable_reg = 0xc040, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_lite_0_cphy_rx_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1945,7 +1945,7 @@ static struct clk_branch cam_cc_ife_lite_0_csid_clk = { .clkr = { .enable_reg = 0xc038, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_lite_0_csid_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_lite_0_csid_clk_src.clkr.hw,
@@ -1963,7 +1963,7 @@ static struct clk_branch cam_cc_ife_lite_1_clk = { .clkr = { .enable_reg = 0xc060, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_lite_1_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_lite_1_clk_src.clkr.hw,
@@ -1981,7 +1981,7 @@ static struct clk_branch cam_cc_ife_lite_1_cphy_rx_clk = { .clkr = { .enable_reg = 0xc084, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_lite_1_cphy_rx_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_cphy_rx_clk_src.clkr.hw,
@@ -1999,7 +1999,7 @@ static struct clk_branch cam_cc_ife_lite_1_csid_clk = { .clkr = { .enable_reg = 0xc07c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ife_lite_1_csid_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ife_lite_1_csid_clk_src.clkr.hw,
@@ -2017,7 +2017,7 @@ static struct clk_branch cam_cc_ipe_0_ahb_clk = { .clkr = { .enable_reg = 0x8040, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ipe_0_ahb_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_slow_ahb_clk_src.clkr.hw,
@@ -2035,7 +2035,7 @@ static struct clk_branch cam_cc_ipe_0_areg_clk = { .clkr = { .enable_reg = 0x803c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ipe_0_areg_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_fast_ahb_clk_src.clkr.hw,
@@ -2053,7 +2053,7 @@ static struct clk_branch cam_cc_ipe_0_axi_clk = { .clkr = { .enable_reg = 0x8038, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ipe_0_axi_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_camnoc_axi_clk_src.clkr.hw,
@@ -2071,7 +2071,7 @@ static struct clk_branch cam_cc_ipe_0_clk = { .clkr = { .enable_reg = 0x8028, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_ipe_0_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_ipe_0_clk_src.clkr.hw,
@@ -2089,7 +2089,7 @@ static struct clk_branch cam_cc_jpeg_clk = { .clkr = { .enable_reg = 0xc0a4, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_jpeg_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_jpeg_clk_src.clkr.hw,
@@ -2107,7 +2107,7 @@ static struct clk_branch cam_cc_lrme_clk = { .clkr = { .enable_reg = 0xc168, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_lrme_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_lrme_clk_src.clkr.hw,
@@ -2125,7 +2125,7 @@ static struct clk_branch cam_cc_mclk0_clk = { .clkr = { .enable_reg = 0xe018, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_mclk0_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_mclk0_clk_src.clkr.hw,
@@ -2143,7 +2143,7 @@ static struct clk_branch cam_cc_mclk1_clk = { .clkr = { .enable_reg = 0xe034, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_mclk1_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_mclk1_clk_src.clkr.hw,
@@ -2161,7 +2161,7 @@ static struct clk_branch cam_cc_mclk2_clk = { .clkr = { .enable_reg = 0xe050, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_mclk2_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_mclk2_clk_src.clkr.hw,
@@ -2179,7 +2179,7 @@ static struct clk_branch cam_cc_mclk3_clk = { .clkr = { .enable_reg = 0xe06c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_mclk3_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_mclk3_clk_src.clkr.hw,
@@ -2197,7 +2197,7 @@ static struct clk_branch cam_cc_mclk4_clk = { .clkr = { .enable_reg = 0xe088, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_mclk4_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_mclk4_clk_src.clkr.hw,
@@ -2215,7 +2215,7 @@ static struct clk_branch cam_cc_mclk5_clk = { .clkr = { .enable_reg = 0xe0a4, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_mclk5_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_mclk5_clk_src.clkr.hw,
@@ -2233,7 +2233,7 @@ static struct clk_branch cam_cc_sleep_clk = { .clkr = { .enable_reg = 0xc1d8, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "cam_cc_sleep_clk", .parent_data = &(const struct clk_parent_data){ .hw = &cam_cc_sleep_clk_src.clkr.hw,
drivers/clk/qcom/dispcc-sc7280.c +51 -51
392 lines not on this page · raw message
drivers/clk/qcom/gcc-sc7280.c +181 -181
1,417 lines not on this page · raw message
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
PATCH 2/2 clk: qcom: sc7280: Update clk_init_data to const for clock controllers
Update clk_init_data to const and also use index instead of fw_name for graphics, lpasscc and video clock controller.
--- drivers/clk/qcom/gpucc-sc7280.c | 56 +++++++++++++++---------------- drivers/clk/qcom/lpasscc-sc7280.c | 14 ++++---- drivers/clk/qcom/videocc-sc7280.c | 26 +++++++------- 3 files changed, 48 insertions(+), 48 deletions(-)
drivers/clk/qcom/gpucc-sc7280.c +28 -28
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* Copyright (c) 2021, The Linux Foundation. All rights reserved. +* Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include <linux/clk-provider.h>
@@ -36,10 +36,10 @@ static struct clk_alpha_pll gpu_cc_pll0 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_pll0", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -65,10 +65,10 @@ static struct clk_alpha_pll gpu_cc_pll1 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_pll1", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -85,11 +85,11 @@ static const struct parent_map gpu_cc_parent_map_0[] = { };static const struct clk_parent_data gpu_cc_parent_data_0[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &gpu_cc_pll0.clkr.hw }, { .hw = &gpu_cc_pll1.clkr.hw }, - { .fw_name ="gcc_gpu_gpll0_clk_src" }, - { .fw_name ="gcc_gpu_gpll0_div_clk_src" }, + { .index =1 },/* gcc_gpu_gpll0_clk_src */ + { .index =2 },/* gcc_gpu_gpll0_div_clk_src */ };static const struct parent_map gpu_cc_parent_map_1[] = {
@@ -100,10 +100,10 @@ static const struct parent_map gpu_cc_parent_map_1[] = { };static const struct clk_parent_data gpu_cc_parent_data_1[] = { - { .fw_name ="bi_tcxo" , }, + { .index =0 , }, { .hw = &gpu_cc_pll1.clkr.hw }, - { .fw_name ="gcc_gpu_gpll0_clk_src" , }, - { .fw_name ="gcc_gpu_gpll0_div_clk_src" , }, + { .index =1 },/* gcc_gpu_gpll0_clk_src */ + { .index =2 },/* gcc_gpu_gpll0_div_clk_src */ };static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
@@ -119,7 +119,7 @@ static struct clk_rcg2 gpu_cc_gmu_clk_src = { .hid_width = 5, .parent_map = gpu_cc_parent_map_0, .freq_tbl = ftbl_gpu_cc_gmu_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_gmu_clk_src" , .parent_data = gpu_cc_parent_data_0, .num_parents =ARRAY_SIZE (gpu_cc_parent_data_0),
@@ -140,7 +140,7 @@ static struct clk_rcg2 gpu_cc_hub_clk_src = { .hid_width = 5, .parent_map = gpu_cc_parent_map_1, .freq_tbl = ftbl_gpu_cc_hub_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_hub_clk_src" , .parent_data = gpu_cc_parent_data_1, .num_parents =ARRAY_SIZE (gpu_cc_parent_data_1),
@@ -152,7 +152,7 @@ static struct clk_regmap_div gpu_cc_hub_ahb_div_clk_src = { .reg = 0x11c0, .shift = 0, .width = 4, - .clkr.hw.init = &(struct clk_init_data ) { + .clkr.hw.init = &(const struct clk_init_data ) { .name ="gpu_cc_hub_ahb_div_clk_src" , .parent_hws = (const struct clk_hw *[]){ &gpu_cc_hub_clk_src.clkr.hw,
@@ -167,7 +167,7 @@ static struct clk_regmap_div gpu_cc_hub_cx_int_div_clk_src = { .reg = 0x11bc, .shift = 0, .width = 4, - .clkr.hw.init = &(struct clk_init_data ) { + .clkr.hw.init = &(const struct clk_init_data ) { .name ="gpu_cc_hub_cx_int_div_clk_src" , .parent_hws = (const struct clk_hw *[]){ &gpu_cc_hub_clk_src.clkr.hw,
@@ -184,7 +184,7 @@ static struct clk_branch gpu_cc_ahb_clk = { .clkr = { .enable_reg = 0x1078, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_ahb_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_ahb_div_clk_src.clkr.hw,
@@ -202,7 +202,7 @@ static struct clk_branch gpu_cc_crc_ahb_clk = { .clkr = { .enable_reg = 0x107c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_crc_ahb_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_ahb_div_clk_src.clkr.hw,
@@ -220,7 +220,7 @@ static struct clk_branch gpu_cc_cx_gmu_clk = { .clkr = { .enable_reg = 0x1098, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_cx_gmu_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_gmu_clk_src.clkr.hw,
@@ -238,7 +238,7 @@ static struct clk_branch gpu_cc_cx_snoc_dvm_clk = { .clkr = { .enable_reg = 0x108c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_cx_snoc_dvm_clk" , .ops = &clk_branch2_ops, },
@@ -251,7 +251,7 @@ static struct clk_branch gpu_cc_cxo_aon_clk = { .clkr = { .enable_reg = 0x1004, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_cxo_aon_clk" , .ops = &clk_branch2_ops, },
@@ -264,7 +264,7 @@ static struct clk_branch gpu_cc_cxo_clk = { .clkr = { .enable_reg = 0x109c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_cxo_clk" , .ops = &clk_branch2_aon_ops, },
@@ -277,7 +277,7 @@ static struct clk_branch gpu_cc_gx_gmu_clk = { .clkr = { .enable_reg = 0x1064, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_gx_gmu_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_gmu_clk_src.clkr.hw,
@@ -295,7 +295,7 @@ static struct clk_branch gpu_cc_hlos1_vote_gpu_smmu_clk = { .clkr = { .enable_reg = 0x5000, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_hlos1_vote_gpu_smmu_clk" , .ops = &clk_branch2_ops, },
@@ -308,7 +308,7 @@ static struct clk_branch gpu_cc_hub_aon_clk = { .clkr = { .enable_reg = 0x1178, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_hub_aon_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_clk_src.clkr.hw,
@@ -326,7 +326,7 @@ static struct clk_branch gpu_cc_hub_cx_int_clk = { .clkr = { .enable_reg = 0x1204, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_hub_cx_int_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_cx_int_div_clk_src.clkr.hw,
@@ -344,7 +344,7 @@ static struct clk_branch gpu_cc_mnd1x_0_gfx3d_clk = { .clkr = { .enable_reg = 0x802c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_mnd1x_0_gfx3d_clk" , .ops = &clk_branch2_ops, },
@@ -357,7 +357,7 @@ static struct clk_branch gpu_cc_mnd1x_1_gfx3d_clk = { .clkr = { .enable_reg = 0x8030, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_mnd1x_1_gfx3d_clk" , .ops = &clk_branch2_ops, },
@@ -370,7 +370,7 @@ static struct clk_branch gpu_cc_sleep_clk = { .clkr = { .enable_reg = 0x1090, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_sleep_clk" , .ops = &clk_branch2_ops, },
drivers/clk/qcom/lpasscc-sc7280.c +7 -7
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 /* -* Copyright (c) 2021, The Linux Foundation. All rights reserved. +* Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include <linux/clk-provider.h>
@@ -23,7 +23,7 @@ static struct clk_branch lpass_q6ss_ahbm_clk = { .clkr = { .enable_reg = 0x1c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_q6ss_ahbm_clk" , .ops = &clk_branch2_ops, },
@@ -36,7 +36,7 @@ static struct clk_branch lpass_q6ss_ahbs_clk = { .clkr = { .enable_reg = 0x20, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_q6ss_ahbs_clk" , .ops = &clk_branch2_ops, },
@@ -49,7 +49,7 @@ static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = { .clkr = { .enable_reg = 0x0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_top_cc_lpi_q6_axim_hs_clk" , .ops = &clk_branch2_ops, },
@@ -63,7 +63,7 @@ static struct clk_branch lpass_qdsp6ss_core_clk = { .clkr = { .enable_reg = 0x20, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_qdsp6ss_core_clk" , .ops = &clk_branch2_ops, },
@@ -77,7 +77,7 @@ static struct clk_branch lpass_qdsp6ss_xo_clk = { .clkr = { .enable_reg = 0x38, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_qdsp6ss_xo_clk" , .ops = &clk_branch2_ops, },
@@ -91,7 +91,7 @@ static struct clk_branch lpass_qdsp6ss_sleep_clk = { .clkr = { .enable_reg = 0x3c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_qdsp6ss_sleep_clk" , .ops = &clk_branch2_ops, },
drivers/clk/qcom/videocc-sc7280.c +13 -13
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* Copyright (c) 2021, The Linux Foundation. All rights reserved. +* Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include <linux/clk-provider.h>
@@ -45,10 +45,10 @@ static struct clk_alpha_pll video_pll0 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_pll0", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,
@@ -62,7 +62,7 @@ static const struct parent_map video_cc_parent_map_0[] = { };static const struct clk_parent_data video_cc_parent_data_0[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &video_pll0.clkr.hw }, };
@@ -89,7 +89,7 @@ static struct clk_rcg2 video_cc_iris_clk_src = { .hid_width = 5, .parent_map = video_cc_parent_map_0, .freq_tbl = ftbl_video_cc_iris_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="video_cc_iris_clk_src" , .parent_data = video_cc_parent_data_0, .num_parents =ARRAY_SIZE (video_cc_parent_data_0),
@@ -109,7 +109,7 @@ static struct clk_rcg2 video_cc_sleep_clk_src = { .hid_width = 5, .parent_map = video_cc_parent_map_1, .freq_tbl = ftbl_video_cc_sleep_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="video_cc_sleep_clk_src" , .parent_data = video_cc_parent_data_1, .num_parents =ARRAY_SIZE (video_cc_parent_data_1),
@@ -123,7 +123,7 @@ static struct clk_branch video_cc_iris_ahb_clk = { .clkr = { .enable_reg = 0x5004, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_iris_ahb_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_iris_clk_src.clkr.hw,
@@ -141,7 +141,7 @@ static struct clk_branch video_cc_mvs0_axi_clk = { .clkr = { .enable_reg = 0x800c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="video_cc_mvs0_axi_clk" , .ops = &clk_branch2_ops, },
@@ -156,7 +156,7 @@ static struct clk_branch video_cc_mvs0_core_clk = { .clkr = { .enable_reg = 0x3010, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_mvs0_core_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_iris_clk_src.clkr.hw,
@@ -174,7 +174,7 @@ static struct clk_branch video_cc_mvsc_core_clk = { .clkr = { .enable_reg = 0x2014, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_mvsc_core_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_iris_clk_src.clkr.hw,
@@ -192,7 +192,7 @@ static struct clk_branch video_cc_mvsc_ctl_axi_clk = { .clkr = { .enable_reg = 0x8004, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="video_cc_mvsc_ctl_axi_clk" , .ops = &clk_branch2_ops, },
@@ -205,7 +205,7 @@ static struct clk_branch video_cc_sleep_clk = { .clkr = { .enable_reg = 0x7034, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_sleep_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_sleep_clk_src.clkr.hw,
@@ -223,7 +223,7 @@ static struct clk_branch video_cc_venus_ahb_clk = { .clkr = { .enable_reg = 0x801c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="video_cc_venus_ahb_clk" , .ops = &clk_branch2_ops, },
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
Quoted 3 lines · Taniya Das
Update
clk_init_datato const and also use index instead offw_namefor graphics, lpasscc and video clock controller.
What is the benefit from using indices here? In my opinion the code becomes more fragile with such a change.
Quoted 416 lines
Fixes 3e0f01d6c7e74 ("clk: qcom: Add graphics clock controller driver for SC7280")Fixes 4ab43d171181d ("clk: qcom: Add lpass clock controller driver for SC7280")Fixes fae7617bb1428 ("clk: qcom: Add video clock controller driver for SC7280")Signed-off-by Taniya Das <[email protected]>--- drivers/clk/qcom/gpucc-sc7280.c | 56 +++++++++++++++---------------- drivers/clk/qcom/lpasscc-sc7280.c | 14 ++++---- drivers/clk/qcom/videocc-sc7280.c | 26 +++++++------- 3 files changed, 48 insertions(+), 48 deletions(-)drivers/clk/qcom/gpucc-sc7280.c +28
-28@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* Copyright (c) 2021, The Linux Foundation. All rights reserved. +* Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include <linux/clk-provider.h> @@ -36,10 +36,10 @@ static struct clk_alpha_pll gpu_cc_pll0 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_pll0", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,@@ -65,10 +65,10 @@ static struct clk_alpha_pll gpu_cc_pll1 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_pll1", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,@@ -85,11 +85,11 @@ static const struct parent_map gpu_cc_parent_map_0[] = { };static const struct clk_parent_data gpu_cc_parent_data_0[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &gpu_cc_pll0.clkr.hw }, { .hw = &gpu_cc_pll1.clkr.hw }, - { .fw_name ="gcc_gpu_gpll0_clk_src" }, - { .fw_name ="gcc_gpu_gpll0_div_clk_src" }, + { .index =1 },/* gcc_gpu_gpll0_clk_src */ + { .index =2 },/* gcc_gpu_gpll0_div_clk_src */ };static const struct parent_map gpu_cc_parent_map_1[] = {@@ -100,10 +100,10 @@ static const struct parent_map gpu_cc_parent_map_1[] = { };static const struct clk_parent_data gpu_cc_parent_data_1[] = { - { .fw_name ="bi_tcxo" , }, + { .index =0 , }, { .hw = &gpu_cc_pll1.clkr.hw }, - { .fw_name ="gcc_gpu_gpll0_clk_src" , }, - { .fw_name ="gcc_gpu_gpll0_div_clk_src" , }, + { .index =1 },/* gcc_gpu_gpll0_clk_src */ + { .index =2 },/* gcc_gpu_gpll0_div_clk_src */ };static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {@@ -119,7 +119,7 @@ static struct clk_rcg2 gpu_cc_gmu_clk_src = { .hid_width = 5, .parent_map = gpu_cc_parent_map_0, .freq_tbl = ftbl_gpu_cc_gmu_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_gmu_clk_src" , .parent_data = gpu_cc_parent_data_0, .num_parents =ARRAY_SIZE (gpu_cc_parent_data_0),@@ -140,7 +140,7 @@ static struct clk_rcg2 gpu_cc_hub_clk_src = { .hid_width = 5, .parent_map = gpu_cc_parent_map_1, .freq_tbl = ftbl_gpu_cc_hub_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_hub_clk_src" , .parent_data = gpu_cc_parent_data_1, .num_parents =ARRAY_SIZE (gpu_cc_parent_data_1),@@ -152,7 +152,7 @@ static struct clk_regmap_div gpu_cc_hub_ahb_div_clk_src = { .reg = 0x11c0, .shift = 0, .width = 4, - .clkr.hw.init = &(struct clk_init_data ) { + .clkr.hw.init = &(const struct clk_init_data ) { .name ="gpu_cc_hub_ahb_div_clk_src" , .parent_hws = (const struct clk_hw *[]){ &gpu_cc_hub_clk_src.clkr.hw,@@ -167,7 +167,7 @@ static struct clk_regmap_div gpu_cc_hub_cx_int_div_clk_src = { .reg = 0x11bc, .shift = 0, .width = 4, - .clkr.hw.init = &(struct clk_init_data ) { + .clkr.hw.init = &(const struct clk_init_data ) { .name ="gpu_cc_hub_cx_int_div_clk_src" , .parent_hws = (const struct clk_hw *[]){ &gpu_cc_hub_clk_src.clkr.hw,@@ -184,7 +184,7 @@ static struct clk_branch gpu_cc_ahb_clk = { .clkr = { .enable_reg = 0x1078, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_ahb_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_ahb_div_clk_src.clkr.hw,@@ -202,7 +202,7 @@ static struct clk_branch gpu_cc_crc_ahb_clk = { .clkr = { .enable_reg = 0x107c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_crc_ahb_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_ahb_div_clk_src.clkr.hw,@@ -220,7 +220,7 @@ static struct clk_branch gpu_cc_cx_gmu_clk = { .clkr = { .enable_reg = 0x1098, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_cx_gmu_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_gmu_clk_src.clkr.hw,@@ -238,7 +238,7 @@ static struct clk_branch gpu_cc_cx_snoc_dvm_clk = { .clkr = { .enable_reg = 0x108c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_cx_snoc_dvm_clk" , .ops = &clk_branch2_ops, },@@ -251,7 +251,7 @@ static struct clk_branch gpu_cc_cxo_aon_clk = { .clkr = { .enable_reg = 0x1004, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_cxo_aon_clk" , .ops = &clk_branch2_ops, },@@ -264,7 +264,7 @@ static struct clk_branch gpu_cc_cxo_clk = { .clkr = { .enable_reg = 0x109c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_cxo_clk" , .ops = &clk_branch2_aon_ops, },@@ -277,7 +277,7 @@ static struct clk_branch gpu_cc_gx_gmu_clk = { .clkr = { .enable_reg = 0x1064, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_gx_gmu_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_gmu_clk_src.clkr.hw,@@ -295,7 +295,7 @@ static struct clk_branch gpu_cc_hlos1_vote_gpu_smmu_clk = { .clkr = { .enable_reg = 0x5000, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_hlos1_vote_gpu_smmu_clk" , .ops = &clk_branch2_ops, },@@ -308,7 +308,7 @@ static struct clk_branch gpu_cc_hub_aon_clk = { .clkr = { .enable_reg = 0x1178, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_hub_aon_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_clk_src.clkr.hw,@@ -326,7 +326,7 @@ static struct clk_branch gpu_cc_hub_cx_int_clk = { .clkr = { .enable_reg = 0x1204, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "gpu_cc_hub_cx_int_clk", .parent_hws = (const struct clk_hw*[]){ &gpu_cc_hub_cx_int_div_clk_src.clkr.hw,@@ -344,7 +344,7 @@ static struct clk_branch gpu_cc_mnd1x_0_gfx3d_clk = { .clkr = { .enable_reg = 0x802c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_mnd1x_0_gfx3d_clk" , .ops = &clk_branch2_ops, },@@ -357,7 +357,7 @@ static struct clk_branch gpu_cc_mnd1x_1_gfx3d_clk = { .clkr = { .enable_reg = 0x8030, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_mnd1x_1_gfx3d_clk" , .ops = &clk_branch2_ops, },@@ -370,7 +370,7 @@ static struct clk_branch gpu_cc_sleep_clk = { .clkr = { .enable_reg = 0x1090, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="gpu_cc_sleep_clk" , .ops = &clk_branch2_ops, },drivers/clk/qcom/lpasscc-sc7280.c +7
-7@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 /* -* Copyright (c) 2021, The Linux Foundation. All rights reserved. +* Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include <linux/clk-provider.h> @@ -23,7 +23,7 @@ static struct clk_branch lpass_q6ss_ahbm_clk = { .clkr = { .enable_reg = 0x1c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_q6ss_ahbm_clk" , .ops = &clk_branch2_ops, },@@ -36,7 +36,7 @@ static struct clk_branch lpass_q6ss_ahbs_clk = { .clkr = { .enable_reg = 0x20, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_q6ss_ahbs_clk" , .ops = &clk_branch2_ops, },@@ -49,7 +49,7 @@ static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = { .clkr = { .enable_reg = 0x0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_top_cc_lpi_q6_axim_hs_clk" , .ops = &clk_branch2_ops, },@@ -63,7 +63,7 @@ static struct clk_branch lpass_qdsp6ss_core_clk = { .clkr = { .enable_reg = 0x20, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_qdsp6ss_core_clk" , .ops = &clk_branch2_ops, },@@ -77,7 +77,7 @@ static struct clk_branch lpass_qdsp6ss_xo_clk = { .clkr = { .enable_reg = 0x38, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_qdsp6ss_xo_clk" , .ops = &clk_branch2_ops, },@@ -91,7 +91,7 @@ static struct clk_branch lpass_qdsp6ss_sleep_clk = { .clkr = { .enable_reg = 0x3c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="lpass_qdsp6ss_sleep_clk" , .ops = &clk_branch2_ops, },drivers/clk/qcom/videocc-sc7280.c +13
-14@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* Copyright (c) 2021, The Linux Foundation. All rights reserved. +* Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include <linux/clk-provider.h> @@ -45,10 +45,10 @@ static struct clk_alpha_pll video_pll0 = { .num_vco = ARRAY_SIZE(lucid_vco), .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID], .clkr = { - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_pll0", .parent_data = &(const struct clk_parent_data){ - .fw_name = "bi_tcxo", + .index = 0, }, .num_parents = 1, .ops = &clk_alpha_pll_lucid_ops,@@ -62,7 +62,7 @@ static const struct parent_map video_cc_parent_map_0[] = { };static const struct clk_parent_data video_cc_parent_data_0[] = { - { .fw_name ="bi_tcxo" }, + { .index =0 }, { .hw = &video_pll0.clkr.hw }, };@@ -89,7 +89,7 @@ static struct clk_rcg2 video_cc_iris_clk_src = { .hid_width = 5, .parent_map = video_cc_parent_map_0, .freq_tbl = ftbl_video_cc_iris_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="video_cc_iris_clk_src" , .parent_data = video_cc_parent_data_0, .num_parents =ARRAY_SIZE (video_cc_parent_data_0),@@ -109,7 +109,7 @@ static struct clk_rcg2 video_cc_sleep_clk_src = { .hid_width = 5, .parent_map = video_cc_parent_map_1, .freq_tbl = ftbl_video_cc_sleep_clk_src, - .clkr.hw.init = &(struct clk_init_data ){ + .clkr.hw.init = &(const struct clk_init_data ){ .name ="video_cc_sleep_clk_src" , .parent_data = video_cc_parent_data_1, .num_parents =ARRAY_SIZE (video_cc_parent_data_1),@@ -123,7 +123,7 @@ static struct clk_branch video_cc_iris_ahb_clk = { .clkr = { .enable_reg = 0x5004, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_iris_ahb_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_iris_clk_src.clkr.hw,@@ -141,7 +141,7 @@ static struct clk_branch video_cc_mvs0_axi_clk = { .clkr = { .enable_reg = 0x800c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="video_cc_mvs0_axi_clk" , .ops = &clk_branch2_ops, },@@ -156,7 +156,7 @@ static struct clk_branch video_cc_mvs0_core_clk = { .clkr = { .enable_reg = 0x3010, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_mvs0_core_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_iris_clk_src.clkr.hw,@@ -174,7 +174,7 @@ static struct clk_branch video_cc_mvsc_core_clk = { .clkr = { .enable_reg = 0x2014, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_mvsc_core_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_iris_clk_src.clkr.hw,@@ -192,7 +192,7 @@ static struct clk_branch video_cc_mvsc_ctl_axi_clk = { .clkr = { .enable_reg = 0x8004, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="video_cc_mvsc_ctl_axi_clk" , .ops = &clk_branch2_ops, },@@ -205,7 +205,7 @@ static struct clk_branch video_cc_sleep_clk = { .clkr = { .enable_reg = 0x7034, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data){ .name = "video_cc_sleep_clk", .parent_hws = (const struct clk_hw*[]){ &video_cc_sleep_clk_src.clkr.hw,@@ -223,7 +223,7 @@ static struct clk_branch video_cc_venus_ahb_clk = { .clkr = { .enable_reg = 0x801c, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data ){ + .hw.init = &(const struct clk_init_data ){ .name ="video_cc_venus_ahb_clk" , .ops = &clk_branch2_ops, }, --Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
Signature · 2 lines
With best wishes Dmitry
Stephen Boyd
maintainerQuoting Dmitry Baryshkov (2022-02-02 14:34:11)
Quoted 7 lines · Taniya Das
Quoted 3 lines
Update
clk_init_datato const and also use index instead offw_namefor graphics, lpasscc and video clock controller.What is the benefit from using indices here? In my opinion the code becomes more fragile with such a change.
The benefit is smaller code size. Please run scripts/bloat-o-meter