Skip to content

Commit fca3925

Browse files
robimarkoandersson
authored andcommitted
clk: qcom: gcc-ipq4019: move pcnoc clocks up
Move pcnoc clocks up just after PLL-s to be able to use their HW fields. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230214162325.312057-6-robert.marko@sartura.hr
1 parent 9679799 commit fca3925

1 file changed

Lines changed: 37 additions & 37 deletions

File tree

drivers/clk/qcom/gcc-ipq4019.c

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,43 @@ static struct clk_fepll gcc_fepllwcss5g_clk = {
499499
.pll_vco = &gcc_fepll_vco,
500500
};
501501

502+
static const struct freq_tbl ftbl_gcc_pcnoc_ahb_clk[] = {
503+
F(48000000, P_XO, 1, 0, 0),
504+
F(100000000, P_FEPLL200, 2, 0, 0),
505+
{ }
506+
};
507+
508+
static struct clk_rcg2 gcc_pcnoc_ahb_clk_src = {
509+
.cmd_rcgr = 0x21024,
510+
.hid_width = 5,
511+
.parent_map = gcc_xo_200_500_map,
512+
.freq_tbl = ftbl_gcc_pcnoc_ahb_clk,
513+
.clkr.hw.init = &(struct clk_init_data){
514+
.name = "gcc_pcnoc_ahb_clk_src",
515+
.parent_names = gcc_xo_200_500,
516+
.num_parents = 3,
517+
.ops = &clk_rcg2_ops,
518+
},
519+
};
520+
521+
static struct clk_branch pcnoc_clk_src = {
522+
.halt_reg = 0x21030,
523+
.clkr = {
524+
.enable_reg = 0x21030,
525+
.enable_mask = BIT(0),
526+
.hw.init = &(struct clk_init_data){
527+
.name = "pcnoc_clk_src",
528+
.parent_names = (const char *[]){
529+
"gcc_pcnoc_ahb_clk_src",
530+
},
531+
.num_parents = 1,
532+
.ops = &clk_branch2_ops,
533+
.flags = CLK_SET_RATE_PARENT |
534+
CLK_IS_CRITICAL,
535+
},
536+
},
537+
};
538+
502539
static const struct freq_tbl ftbl_gcc_audio_pwm_clk[] = {
503540
F(48000000, P_XO, 1, 0, 0),
504541
F(200000000, P_FEPLL200, 1, 0, 0),
@@ -1541,43 +1578,6 @@ static struct clk_branch gcc_wcss5g_rtc_clk = {
15411578
},
15421579
};
15431580

1544-
static const struct freq_tbl ftbl_gcc_pcnoc_ahb_clk[] = {
1545-
F(48000000, P_XO, 1, 0, 0),
1546-
F(100000000, P_FEPLL200, 2, 0, 0),
1547-
{ }
1548-
};
1549-
1550-
static struct clk_rcg2 gcc_pcnoc_ahb_clk_src = {
1551-
.cmd_rcgr = 0x21024,
1552-
.hid_width = 5,
1553-
.parent_map = gcc_xo_200_500_map,
1554-
.freq_tbl = ftbl_gcc_pcnoc_ahb_clk,
1555-
.clkr.hw.init = &(struct clk_init_data){
1556-
.name = "gcc_pcnoc_ahb_clk_src",
1557-
.parent_names = gcc_xo_200_500,
1558-
.num_parents = 3,
1559-
.ops = &clk_rcg2_ops,
1560-
},
1561-
};
1562-
1563-
static struct clk_branch pcnoc_clk_src = {
1564-
.halt_reg = 0x21030,
1565-
.clkr = {
1566-
.enable_reg = 0x21030,
1567-
.enable_mask = BIT(0),
1568-
.hw.init = &(struct clk_init_data){
1569-
.name = "pcnoc_clk_src",
1570-
.parent_names = (const char *[]){
1571-
"gcc_pcnoc_ahb_clk_src",
1572-
},
1573-
.num_parents = 1,
1574-
.ops = &clk_branch2_ops,
1575-
.flags = CLK_SET_RATE_PARENT |
1576-
CLK_IS_CRITICAL,
1577-
},
1578-
},
1579-
};
1580-
15811581
static struct clk_regmap *gcc_ipq4019_clocks[] = {
15821582
[AUDIO_CLK_SRC] = &audio_clk_src.clkr,
15831583
[BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,

0 commit comments

Comments
 (0)