Skip to content

Commit ac3ee36

Browse files
juhosgandersson
authored andcommitted
clk: qcom: apss-ipq-pll: reuse Stromer reg offsets from 'clk_alpha_pll_regs'
The register offset array defined locally for the CLK_ALPHA_PLL_TYPE_STROMER_PLUS is the same as the entry defined for CLK_ALPHA_PLL_TYPE_STROMER in the 'clk_alpha_pll_regs' array. To avoid code duplication, remove the local definition and use the global one instead. No functional changes. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Gabor Juhos <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 2d52699 commit ac3ee36

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

drivers/clk/qcom/apss-ipq-pll.c

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ static const u8 ipq_pll_offsets[][PLL_OFF_MAX_REGS] = {
2424
[PLL_OFF_TEST_CTL] = 0x30,
2525
[PLL_OFF_TEST_CTL_U] = 0x34,
2626
},
27-
[CLK_ALPHA_PLL_TYPE_STROMER_PLUS] = {
28-
[PLL_OFF_L_VAL] = 0x08,
29-
[PLL_OFF_ALPHA_VAL] = 0x10,
30-
[PLL_OFF_ALPHA_VAL_U] = 0x14,
31-
[PLL_OFF_USER_CTL] = 0x18,
32-
[PLL_OFF_USER_CTL_U] = 0x1c,
33-
[PLL_OFF_CONFIG_CTL] = 0x20,
34-
[PLL_OFF_STATUS] = 0x28,
35-
[PLL_OFF_TEST_CTL] = 0x30,
36-
[PLL_OFF_TEST_CTL_U] = 0x34,
37-
},
3827
};
3928

4029
static struct clk_alpha_pll ipq_pll_huayra = {
@@ -57,12 +46,7 @@ static struct clk_alpha_pll ipq_pll_huayra = {
5746

5847
static struct clk_alpha_pll ipq_pll_stromer = {
5948
.offset = 0x0,
60-
/*
61-
* Reuse CLK_ALPHA_PLL_TYPE_STROMER_PLUS register offsets.
62-
* Although this is a bit confusing, but the offset values
63-
* are correct nevertheless.
64-
*/
65-
.regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_STROMER_PLUS],
49+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_STROMER],
6650
.flags = SUPPORTS_DYNAMIC_UPDATE,
6751
.clkr = {
6852
.enable_reg = 0x0,
@@ -80,7 +64,11 @@ static struct clk_alpha_pll ipq_pll_stromer = {
8064

8165
static struct clk_alpha_pll ipq_pll_stromer_plus = {
8266
.offset = 0x0,
83-
.regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_STROMER_PLUS],
67+
/*
68+
* The register offsets of the Stromer Plus PLL used in IPQ5332
69+
* are the same as the Stromer PLL's offsets.
70+
*/
71+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_STROMER],
8472
.flags = SUPPORTS_DYNAMIC_UPDATE,
8573
.clkr = {
8674
.enable_reg = 0x0,

0 commit comments

Comments
 (0)