Skip to content

Commit 4c63e9a

Browse files
committed
clk: renesas: r8a779a0: Use defines for PLL control registers
Add symbolic definitions for the various PLL control registers. Replace hardcoded register offsets by the new definitions. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/8cac464c7dfb15ecd299b8ab4ba88a16135f8123.1721648548.git.geert+renesas@glider.be
1 parent 732a610 commit 4c63e9a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

drivers/clk/renesas/r8a779a0-cpg-mssr.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ enum clk_ids {
6161
DEF_BASE(_name, _id, CLK_TYPE_GEN4_PLL2X_3X, CLK_MAIN, \
6262
.offset = _offset)
6363

64+
#define CPG_PLL20CR 0x0834 /* PLL20 Control Register */
65+
#define CPG_PLL21CR 0x0838 /* PLL21 Control Register */
66+
#define CPG_PLL30CR 0x083c /* PLL30 Control Register */
67+
#define CPG_PLL31CR 0x0840 /* PLL31 Control Register */
68+
6469
static const struct cpg_core_clk r8a779a0_core_clks[] __initconst = {
6570
/* External Clock Inputs */
6671
DEF_INPUT("extal", CLK_EXTAL),
@@ -70,10 +75,10 @@ static const struct cpg_core_clk r8a779a0_core_clks[] __initconst = {
7075
DEF_BASE(".main", CLK_MAIN, CLK_TYPE_GEN4_MAIN, CLK_EXTAL),
7176
DEF_BASE(".pll1", CLK_PLL1, CLK_TYPE_GEN4_PLL1, CLK_MAIN),
7277
DEF_BASE(".pll5", CLK_PLL5, CLK_TYPE_GEN4_PLL5, CLK_MAIN),
73-
DEF_PLL(".pll20", CLK_PLL20, 0x0834),
74-
DEF_PLL(".pll21", CLK_PLL21, 0x0838),
75-
DEF_PLL(".pll30", CLK_PLL30, 0x083c),
76-
DEF_PLL(".pll31", CLK_PLL31, 0x0840),
78+
DEF_PLL(".pll20", CLK_PLL20, CPG_PLL20CR),
79+
DEF_PLL(".pll21", CLK_PLL21, CPG_PLL21CR),
80+
DEF_PLL(".pll30", CLK_PLL30, CPG_PLL30CR),
81+
DEF_PLL(".pll31", CLK_PLL31, CPG_PLL31CR),
7782

7883
DEF_FIXED(".pll1_div2", CLK_PLL1_DIV2, CLK_PLL1, 2, 1),
7984
DEF_FIXED(".pll20_div2", CLK_PLL20_DIV2, CLK_PLL20, 2, 1),

0 commit comments

Comments
 (0)