Skip to content

Commit 626a069

Browse files
AlbanBedelralfbaechle
authored andcommitted
MIPS: ath79: Correctly name the defines for the PLL_FB register
This register is named PLL_FB and is not a divider but a multiplier. To make things less confusing rename the ARxxxx_PLL_DIV_SHIFT and ARxxxx_PLL_DIV_MASK macros to ARxxxx_PLL_FB_SHIFT and ARxxxx_PLL_FB_MASK. Signed-off-by: Alban Bedel <[email protected]> Cc: [email protected] Cc: Andrew Bresticker <[email protected]> Cc: Qais Yousef <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: Sergey Ryazanov <[email protected]> Cc: Gabor Juhos <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/9772/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent da628e8 commit 626a069

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

arch/mips/ath79/clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void __init ar71xx_clocks_init(void)
6262

6363
pll = ath79_pll_rr(AR71XX_PLL_REG_CPU_CONFIG);
6464

65-
div = ((pll >> AR71XX_PLL_DIV_SHIFT) & AR71XX_PLL_DIV_MASK) + 1;
65+
div = ((pll >> AR71XX_PLL_FB_SHIFT) & AR71XX_PLL_FB_MASK) + 1;
6666
freq = div * ref_rate;
6767

6868
div = ((pll >> AR71XX_CPU_DIV_SHIFT) & AR71XX_CPU_DIV_MASK) + 1;
@@ -96,7 +96,7 @@ static void __init ar724x_clocks_init(void)
9696
ref_rate = AR724X_BASE_FREQ;
9797
pll = ath79_pll_rr(AR724X_PLL_REG_CPU_CONFIG);
9898

99-
div = ((pll >> AR724X_PLL_DIV_SHIFT) & AR724X_PLL_DIV_MASK);
99+
div = ((pll >> AR724X_PLL_FB_SHIFT) & AR724X_PLL_FB_MASK);
100100
freq = div * ref_rate;
101101

102102
div = ((pll >> AR724X_PLL_REF_DIV_SHIFT) & AR724X_PLL_REF_DIV_MASK);
@@ -132,7 +132,7 @@ static void __init ar913x_clocks_init(void)
132132
ref_rate = AR913X_BASE_FREQ;
133133
pll = ath79_pll_rr(AR913X_PLL_REG_CPU_CONFIG);
134134

135-
div = ((pll >> AR913X_PLL_DIV_SHIFT) & AR913X_PLL_DIV_MASK);
135+
div = ((pll >> AR913X_PLL_FB_SHIFT) & AR913X_PLL_FB_MASK);
136136
freq = div * ref_rate;
137137

138138
cpu_rate = freq;

arch/mips/include/asm/mach-ath79/ar71xx_regs.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@
157157
#define AR71XX_PLL_REG_ETH0_INT_CLOCK 0x10
158158
#define AR71XX_PLL_REG_ETH1_INT_CLOCK 0x14
159159

160-
#define AR71XX_PLL_DIV_SHIFT 3
161-
#define AR71XX_PLL_DIV_MASK 0x1f
160+
#define AR71XX_PLL_FB_SHIFT 3
161+
#define AR71XX_PLL_FB_MASK 0x1f
162162
#define AR71XX_CPU_DIV_SHIFT 16
163163
#define AR71XX_CPU_DIV_MASK 0x3
164164
#define AR71XX_DDR_DIV_SHIFT 18
@@ -169,8 +169,8 @@
169169
#define AR724X_PLL_REG_CPU_CONFIG 0x00
170170
#define AR724X_PLL_REG_PCIE_CONFIG 0x18
171171

172-
#define AR724X_PLL_DIV_SHIFT 0
173-
#define AR724X_PLL_DIV_MASK 0x3ff
172+
#define AR724X_PLL_FB_SHIFT 0
173+
#define AR724X_PLL_FB_MASK 0x3ff
174174
#define AR724X_PLL_REF_DIV_SHIFT 10
175175
#define AR724X_PLL_REF_DIV_MASK 0xf
176176
#define AR724X_AHB_DIV_SHIFT 19
@@ -183,8 +183,8 @@
183183
#define AR913X_PLL_REG_ETH0_INT_CLOCK 0x14
184184
#define AR913X_PLL_REG_ETH1_INT_CLOCK 0x18
185185

186-
#define AR913X_PLL_DIV_SHIFT 0
187-
#define AR913X_PLL_DIV_MASK 0x3ff
186+
#define AR913X_PLL_FB_SHIFT 0
187+
#define AR913X_PLL_FB_MASK 0x3ff
188188
#define AR913X_DDR_DIV_SHIFT 22
189189
#define AR913X_DDR_DIV_MASK 0x3
190190
#define AR913X_AHB_DIV_SHIFT 19

0 commit comments

Comments
 (0)