Skip to content

Commit 31ba299

Browse files
committed
Merge tag 'renesas-clk-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas
Pull Renesas clk driver updates from Geert Uytterhoeven: - Add Cortex-A55 core clocks and Interrupt Control Unit (ICU) clock and reset on Renesas RZ/V2H(P) * tag 'renesas-clk-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks clk: renesas: r9a09g057: Add clock and reset entries for ICU clk: renesas: r9a09g057: Add CA55 core clocks clk: renesas: Remove duplicate and trailing empty lines
2 parents 9852d85 + 92850be commit 31ba299

File tree

10 files changed

+27
-14
lines changed

10 files changed

+27
-14
lines changed

drivers/clk/renesas/clk-r8a73a4.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ r8a73a4_cpg_register_clock(struct device_node *np, struct r8a73a4_cpg *cpg,
6464
unsigned int mult = 1;
6565
unsigned int div = 1;
6666

67-
6867
if (!strcmp(name, "main")) {
6968
u32 ckscr = readl(base + CPG_CKSCR);
7069

drivers/clk/renesas/clk-r8a7778.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ r8a7778_cpg_register_clock(struct device_node *np, const char *name)
6767
return ERR_PTR(-EINVAL);
6868
}
6969

70-
7170
static void __init r8a7778_cpg_clocks_init(struct device_node *np)
7271
{
7372
struct clk_onecell_data *data;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ static const struct rcar_gen4_cpg_pll_config cpg_pll_configs[4] __initconst = {
266266
{ 2, 128, 1, 192, 1, 32, },
267267
};
268268

269-
270269
static int __init r8a779a0_cpg_mssr_init(struct device *dev)
271270
{
272271
const struct rcar_gen4_cpg_pll_config *cpg_pll_config;

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ enum clk_ids {
3737
CLK_PLL5,
3838
CLK_PLL6,
3939
CLK_PLL1_DIV2,
40-
CLK_PLL2_DIV2,
4140
CLK_PLL3_DIV2,
4241
CLK_PLL4_DIV2,
4342
CLK_PLL4_DIV5,
@@ -78,7 +77,6 @@ static const struct cpg_core_clk r8a779h0_core_clks[] __initconst = {
7877
DEF_GEN4_PLL_V8_25(".pll6", 6, CLK_PLL6, CLK_MAIN),
7978

8079
DEF_FIXED(".pll1_div2", CLK_PLL1_DIV2, CLK_PLL1, 2, 1),
81-
DEF_FIXED(".pll2_div2", CLK_PLL2_DIV2, CLK_PLL2, 2, 1),
8280
DEF_FIXED(".pll3_div2", CLK_PLL3_DIV2, CLK_PLL3, 2, 1),
8381
DEF_FIXED(".pll4_div2", CLK_PLL4_DIV2, CLK_PLL4, 2, 1),
8482
DEF_FIXED(".pll4_div5", CLK_PLL4_DIV5, CLK_PLL4, 5, 1),
@@ -101,10 +99,10 @@ static const struct cpg_core_clk r8a779h0_core_clks[] __initconst = {
10199
DEF_RATE(".oco", CLK_OCO, 32768),
102100

103101
/* Core Clock Outputs */
104-
DEF_GEN4_Z("zc0", R8A779H0_CLK_ZC0, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 0),
105-
DEF_GEN4_Z("zc1", R8A779H0_CLK_ZC1, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 8),
106-
DEF_GEN4_Z("zc2", R8A779H0_CLK_ZC2, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 32),
107-
DEF_GEN4_Z("zc3", R8A779H0_CLK_ZC3, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 40),
102+
DEF_GEN4_Z("zc0", R8A779H0_CLK_ZC0, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 0),
103+
DEF_GEN4_Z("zc1", R8A779H0_CLK_ZC1, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 8),
104+
DEF_GEN4_Z("zc2", R8A779H0_CLK_ZC2, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 32),
105+
DEF_GEN4_Z("zc3", R8A779H0_CLK_ZC3, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 40),
108106
DEF_FIXED("s0d2", R8A779H0_CLK_S0D2, CLK_S0, 2, 1),
109107
DEF_FIXED("s0d3", R8A779H0_CLK_S0D3, CLK_S0, 3, 1),
110108
DEF_FIXED("s0d4", R8A779H0_CLK_S0D4, CLK_S0, 4, 1),

drivers/clk/renesas/r9a09g011-cpg.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static const struct clk_div_table dtable_divd[] = {
9898
{0, 0},
9999
};
100100

101-
102101
static const struct clk_div_table dtable_divw[] = {
103102
{0, 6},
104103
{1, 7},

drivers/clk/renesas/r9a09g057-cpg.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ enum clk_ids {
4141
MOD_CLK_BASE,
4242
};
4343

44+
static const struct clk_div_table dtable_1_8[] = {
45+
{0, 1},
46+
{1, 2},
47+
{2, 4},
48+
{3, 8},
49+
{0, 0},
50+
};
51+
4452
static const struct clk_div_table dtable_2_64[] = {
4553
{0, 2},
4654
{1, 4},
@@ -74,10 +82,19 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
7482

7583
/* Core Clocks */
7684
DEF_FIXED("sys_0_pclk", R9A09G057_SYS_0_PCLK, CLK_QEXTAL, 1, 1),
85+
DEF_DDIV("ca55_0_coreclk0", R9A09G057_CA55_0_CORE_CLK0, CLK_PLLCA55,
86+
CDDIV1_DIVCTL0, dtable_1_8),
87+
DEF_DDIV("ca55_0_coreclk1", R9A09G057_CA55_0_CORE_CLK1, CLK_PLLCA55,
88+
CDDIV1_DIVCTL1, dtable_1_8),
89+
DEF_DDIV("ca55_0_coreclk2", R9A09G057_CA55_0_CORE_CLK2, CLK_PLLCA55,
90+
CDDIV1_DIVCTL2, dtable_1_8),
91+
DEF_DDIV("ca55_0_coreclk3", R9A09G057_CA55_0_CORE_CLK3, CLK_PLLCA55,
92+
CDDIV1_DIVCTL3, dtable_1_8),
7793
DEF_FIXED("iotop_0_shclk", R9A09G057_IOTOP_0_SHCLK, CLK_PLLCM33_DIV16, 1, 1),
7894
};
7995

8096
static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
97+
DEF_MOD_CRITICAL("icu_0_pclk_i", CLK_PLLCM33_DIV16, 0, 5, 0, 5),
8198
DEF_MOD("gtm_0_pclk", CLK_PLLCM33_DIV16, 4, 3, 2, 3),
8299
DEF_MOD("gtm_1_pclk", CLK_PLLCM33_DIV16, 4, 4, 2, 4),
83100
DEF_MOD("gtm_2_pclk", CLK_PLLCLN_DIV16, 4, 5, 2, 5),
@@ -119,6 +136,7 @@ static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
119136
};
120137

121138
static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
139+
DEF_RST(3, 6, 1, 7), /* ICU_0_PRESETN_I */
122140
DEF_RST(6, 13, 2, 30), /* GTM_0_PRESETZ */
123141
DEF_RST(6, 14, 2, 31), /* GTM_1_PRESETZ */
124142
DEF_RST(6, 15, 3, 0), /* GTM_2_PRESETZ */

drivers/clk/renesas/rcar-cpg-lib.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,3 @@ struct clk * __init cpg_rpcd2_clk_register(const char *name,
206206

207207
return clk;
208208
}
209-

drivers/clk/renesas/rcar-gen3-cpg.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ static u32 cpg_quirks __initdata;
335335

336336
#define RCKCR_CKSEL BIT(1) /* Manual RCLK parent selection */
337337

338-
339338
static const struct soc_device_attribute cpg_quirks_match[] __initconst = {
340339
{
341340
.soc_id = "r8a7796", .revision = "ES1.0",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#define WARN_DEBUG(x) do { } while (0)
4040
#endif
4141

42-
4342
/*
4443
* Module Standby and Software Reset register offets.
4544
*
@@ -716,7 +715,6 @@ static inline int cpg_mssr_reset_controller_register(struct cpg_mssr_priv *priv)
716715
}
717716
#endif /* !CONFIG_RESET_CONTROLLER */
718717

719-
720718
static const struct of_device_id cpg_mssr_match[] = {
721719
#ifdef CONFIG_CLK_R7S9210
722720
{

drivers/clk/renesas/rzv2h-cpg.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ struct ddiv {
3232
})
3333

3434
#define CPG_CDDIV0 (0x400)
35+
#define CPG_CDDIV1 (0x404)
3536

3637
#define CDDIV0_DIVCTL2 DDIV_PACK(CPG_CDDIV0, 8, 3, 2)
38+
#define CDDIV1_DIVCTL0 DDIV_PACK(CPG_CDDIV1, 0, 2, 4)
39+
#define CDDIV1_DIVCTL1 DDIV_PACK(CPG_CDDIV1, 4, 2, 5)
40+
#define CDDIV1_DIVCTL2 DDIV_PACK(CPG_CDDIV1, 8, 2, 6)
41+
#define CDDIV1_DIVCTL3 DDIV_PACK(CPG_CDDIV1, 12, 2, 7)
3742

3843
/**
3944
* Definitions of CPG Core Clocks

0 commit comments

Comments
 (0)