Skip to content

Commit 65f1fa3

Browse files
ichernevandersson
authored andcommitted
clk: qcom: gcc-sm6115: Move alpha pll bramo overrides
sm6115 uses a modified default and bramo alpha pll offsets. Put them in the same place for consistency. Signed-off-by: Iskren Chernev <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 068a060 commit 65f1fa3

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

drivers/clk/qcom/gcc-sm6115.c

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ static const u8 clk_alpha_pll_regs_offset[][PLL_OFF_MAX_REGS] = {
6565
[PLL_OFF_CONFIG_CTL] = 0x20,
6666
[PLL_OFF_STATUS] = 0x24,
6767
},
68+
[CLK_ALPHA_PLL_TYPE_BRAMMO] = {
69+
[PLL_OFF_L_VAL] = 0x04,
70+
[PLL_OFF_ALPHA_VAL] = 0x08,
71+
[PLL_OFF_ALPHA_VAL_U] = 0x0c,
72+
[PLL_OFF_TEST_CTL] = 0x10,
73+
[PLL_OFF_TEST_CTL_U] = 0x14,
74+
[PLL_OFF_USER_CTL] = 0x18,
75+
[PLL_OFF_CONFIG_CTL] = 0x1C,
76+
[PLL_OFF_STATUS] = 0x20,
77+
},
6878
};
6979

7080
static struct clk_alpha_pll gpll0 = {
@@ -106,18 +116,6 @@ static struct clk_alpha_pll_postdiv gpll0_out_aux2 = {
106116
},
107117
};
108118

109-
/* listed as BRAMMO, but it doesn't really match */
110-
static const u8 clk_gpll9_regs[PLL_OFF_MAX_REGS] = {
111-
[PLL_OFF_L_VAL] = 0x04,
112-
[PLL_OFF_ALPHA_VAL] = 0x08,
113-
[PLL_OFF_ALPHA_VAL_U] = 0x0c,
114-
[PLL_OFF_TEST_CTL] = 0x10,
115-
[PLL_OFF_TEST_CTL_U] = 0x14,
116-
[PLL_OFF_USER_CTL] = 0x18,
117-
[PLL_OFF_CONFIG_CTL] = 0x1C,
118-
[PLL_OFF_STATUS] = 0x20,
119-
};
120-
121119
static const struct clk_div_table post_div_table_gpll0_out_main[] = {
122120
{ 0x0, 1 },
123121
{ }
@@ -445,7 +443,7 @@ static struct clk_alpha_pll gpll9 = {
445443
.offset = 0x9000,
446444
.vco_table = gpll9_vco,
447445
.num_vco = ARRAY_SIZE(gpll9_vco),
448-
.regs = clk_gpll9_regs,
446+
.regs = clk_alpha_pll_regs_offset[CLK_ALPHA_PLL_TYPE_BRAMMO],
449447
.clkr = {
450448
.enable_reg = 0x79000,
451449
.enable_mask = BIT(9),
@@ -471,7 +469,7 @@ static struct clk_alpha_pll_postdiv gpll9_out_main = {
471469
.post_div_table = post_div_table_gpll9_out_main,
472470
.num_post_div = ARRAY_SIZE(post_div_table_gpll9_out_main),
473471
.width = 2,
474-
.regs = clk_gpll9_regs,
472+
.regs = clk_alpha_pll_regs_offset[CLK_ALPHA_PLL_TYPE_BRAMMO],
475473
.clkr.hw.init = &(struct clk_init_data){
476474
.name = "gpll9_out_main",
477475
.parent_hws = (const struct clk_hw *[]){ &gpll9.clkr.hw },

0 commit comments

Comments
 (0)