Skip to content

Commit 36a2390

Browse files
prabhakarladgeertu
authored andcommitted
clk: renesas: rzv2h: Add instance field to struct pll
Add a two-bit "instance" member to struct pll and extend the PLL_PACK() macro to accept an instance parameter. Initialize all existing PLL definitions with instance 0 to preserve legacy behavior. This change enables support for SoCs with multiple PLL instances (for example, RZ/G3E we have two PLL DSIs). Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20251015192611.241920-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 3a86608 commit 36a2390

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

drivers/clk/renesas/rzv2h-cpg.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,23 @@
1616
*
1717
* @offset: STBY register offset
1818
* @has_clkn: Flag to indicate if CLK1/2 are accessible or not
19+
* @instance: PLL instance number
1920
*/
2021
struct pll {
2122
unsigned int offset:9;
2223
unsigned int has_clkn:1;
24+
unsigned int instance:2;
2325
};
2426

25-
#define PLL_PACK(_offset, _has_clkn) \
27+
#define PLL_PACK(_offset, _has_clkn, _instance) \
2628
((struct pll){ \
2729
.offset = _offset, \
28-
.has_clkn = _has_clkn \
30+
.has_clkn = _has_clkn, \
31+
.instance = _instance \
2932
})
3033

31-
#define PLLCA55 PLL_PACK(0x60, 1)
32-
#define PLLGPU PLL_PACK(0x120, 1)
34+
#define PLLCA55 PLL_PACK(0x60, 1, 0)
35+
#define PLLGPU PLL_PACK(0x120, 1, 0)
3336

3437
/**
3538
* struct ddiv - Structure for dynamic switching divider

0 commit comments

Comments
 (0)