Skip to content

Commit eaf87e5

Browse files
kholkbebarino
authored andcommitted
clk: qcom: mmcc-msm8996: Migrate gfx3d clock to clk_rcg2_gfx3d
In the previous commit ("clk: qcom: rcg2: Stop hardcoding gfx3d pingpong parent numbers") the gfx3d ping-pong ops (clk_gfx3d_ops) were generalized in order to be able to reuse the same ops for more than just one clock for one SoC: follow the change here in the MSM8996 MMCC. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> Link: https://lore.kernel.org/r/20210113183817.447866-7-angelogioacchino.delregno@somainline.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 7cbb78a commit eaf87e5

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

drivers/clk/qcom/mmcc-msm8996.c

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -528,16 +528,23 @@ static struct clk_rcg2 maxi_clk_src = {
528528
},
529529
};
530530

531-
static struct clk_rcg2 gfx3d_clk_src = {
532-
.cmd_rcgr = 0x4000,
533-
.hid_width = 5,
534-
.parent_map = mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_map,
535-
.clkr.hw.init = &(struct clk_init_data){
536-
.name = "gfx3d_clk_src",
537-
.parent_names = mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0,
538-
.num_parents = 6,
539-
.ops = &clk_gfx3d_ops,
540-
.flags = CLK_SET_RATE_PARENT,
531+
static struct clk_rcg2_gfx3d gfx3d_clk_src = {
532+
.rcg = {
533+
.cmd_rcgr = 0x4000,
534+
.hid_width = 5,
535+
.parent_map = mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_map,
536+
.clkr.hw.init = &(struct clk_init_data){
537+
.name = "gfx3d_clk_src",
538+
.parent_names = mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0,
539+
.num_parents = 6,
540+
.ops = &clk_gfx3d_ops,
541+
.flags = CLK_SET_RATE_PARENT,
542+
},
543+
},
544+
.hws = (struct clk_hw*[]) {
545+
&mmpll9.clkr.hw,
546+
&mmpll2.clkr.hw,
547+
&mmpll8.clkr.hw
541548
},
542549
};
543550

@@ -3089,7 +3096,7 @@ static struct clk_regmap *mmcc_msm8996_clocks[] = {
30893096
[AHB_CLK_SRC] = &ahb_clk_src.clkr,
30903097
[AXI_CLK_SRC] = &axi_clk_src.clkr,
30913098
[MAXI_CLK_SRC] = &maxi_clk_src.clkr,
3092-
[GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr,
3099+
[GFX3D_CLK_SRC] = &gfx3d_clk_src.rcg.clkr,
30933100
[RBBMTIMER_CLK_SRC] = &rbbmtimer_clk_src.clkr,
30943101
[ISENSE_CLK_SRC] = &isense_clk_src.clkr,
30953102
[RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,

0 commit comments

Comments
 (0)