Skip to content

Commit d6dabaf

Browse files
bijudasgeertu
authored andcommitted
clk: renesas: r9a07g044: Change core clock "I" from DEF_FIXED->DEF_DIV
Core clock "I" is sourced from CPG_PL1_DDIV divider as per HW manual Rev.1.00. This patch adds clock divider table "dtable_1_8" and switches to DEF_DIV for "I" clock. Signed-off-by: Biju Das <[email protected]> Reviewed-by: Lad Prabhakar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 86e122c commit d6dabaf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/clk/renesas/r9a07g044-cpg.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ enum clk_ids {
5656
};
5757

5858
/* Divider tables */
59+
static const struct clk_div_table dtable_1_8[] = {
60+
{0, 1},
61+
{1, 2},
62+
{2, 4},
63+
{3, 8},
64+
{0, 0},
65+
};
66+
5967
static const struct clk_div_table dtable_1_32[] = {
6068
{0, 1},
6169
{1, 2},
@@ -110,7 +118,8 @@ static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
110118
DEF_FIXED(".pll6_250", CLK_PLL6_250, CLK_PLL6, 1, 2),
111119

112120
/* Core output clk */
113-
DEF_FIXED("I", R9A07G044_CLK_I, CLK_PLL1, 1, 1),
121+
DEF_DIV("I", R9A07G044_CLK_I, CLK_PLL1, DIVPL1A, dtable_1_8,
122+
CLK_DIVIDER_HIWORD_MASK),
114123
DEF_DIV("P0", R9A07G044_CLK_P0, CLK_PLL2_DIV2_8, DIVPL2A,
115124
dtable_1_32, CLK_DIVIDER_HIWORD_MASK),
116125
DEF_FIXED("P0_DIV2", R9A07G044_CLK_P0_DIV2, R9A07G044_CLK_P0, 1, 2),

0 commit comments

Comments
 (0)