Skip to content

Commit 35a99c6

Browse files
juhosgandersson
authored andcommitted
clk: qcom: apss-ipq-pll: move Huayra register map to 'clk_alpha_pll_regs'
Move the locally defined Huayra register map to 'clk_alpha_pll_regs' in order to allow using that by other drivers, like the clk-cbf-8996. 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 ac3ee36 commit 35a99c6

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

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

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,9 @@
88

99
#include "clk-alpha-pll.h"
1010

11-
/*
12-
* Even though APSS PLL type is of existing one (like Huayra), its offsets
13-
* are different from the one mentioned in the clk-alpha-pll.c, since the
14-
* PLL is specific to APSS, so lets the define the same.
15-
*/
16-
static const u8 ipq_pll_offsets[][PLL_OFF_MAX_REGS] = {
17-
[CLK_ALPHA_PLL_TYPE_HUAYRA] = {
18-
[PLL_OFF_L_VAL] = 0x08,
19-
[PLL_OFF_ALPHA_VAL] = 0x10,
20-
[PLL_OFF_USER_CTL] = 0x18,
21-
[PLL_OFF_CONFIG_CTL] = 0x20,
22-
[PLL_OFF_CONFIG_CTL_U] = 0x24,
23-
[PLL_OFF_STATUS] = 0x28,
24-
[PLL_OFF_TEST_CTL] = 0x30,
25-
[PLL_OFF_TEST_CTL_U] = 0x34,
26-
},
27-
};
28-
2911
static struct clk_alpha_pll ipq_pll_huayra = {
3012
.offset = 0x0,
31-
.regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_HUAYRA],
13+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA_APSS],
3214
.flags = SUPPORTS_DYNAMIC_UPDATE,
3315
.clkr = {
3416
.enable_reg = 0x0,

drivers/clk/qcom/clk-alpha-pll.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = {
8383
[PLL_OFF_TEST_CTL_U] = 0x20,
8484
[PLL_OFF_STATUS] = 0x24,
8585
},
86+
[CLK_ALPHA_PLL_TYPE_HUAYRA_APSS] = {
87+
[PLL_OFF_L_VAL] = 0x08,
88+
[PLL_OFF_ALPHA_VAL] = 0x10,
89+
[PLL_OFF_USER_CTL] = 0x18,
90+
[PLL_OFF_CONFIG_CTL] = 0x20,
91+
[PLL_OFF_CONFIG_CTL_U] = 0x24,
92+
[PLL_OFF_STATUS] = 0x28,
93+
[PLL_OFF_TEST_CTL] = 0x30,
94+
[PLL_OFF_TEST_CTL_U] = 0x34,
95+
},
8696
[CLK_ALPHA_PLL_TYPE_BRAMMO] = {
8797
[PLL_OFF_L_VAL] = 0x04,
8898
[PLL_OFF_ALPHA_VAL] = 0x08,

drivers/clk/qcom/clk-alpha-pll.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
enum {
1616
CLK_ALPHA_PLL_TYPE_DEFAULT,
1717
CLK_ALPHA_PLL_TYPE_HUAYRA,
18+
CLK_ALPHA_PLL_TYPE_HUAYRA_APSS,
1819
CLK_ALPHA_PLL_TYPE_BRAMMO,
1920
CLK_ALPHA_PLL_TYPE_FABIA,
2021
CLK_ALPHA_PLL_TYPE_TRION,

0 commit comments

Comments
 (0)