Skip to content

Commit ea2be22

Browse files
HiFiPhilebebarino
authored andcommitted
clk: at91: allow setting PMC_AUDIOPINCK clock parents via DT
Make AUDIOPINCK accessible via phandle to select it as peripheral clock parent using assigned-clock-parents in DT where available. Signed-off-by: Zixun LI <admin@hifiphile.com> Reviewed-by: Claudiu Beznea <Claudiu.Beznea@microchip.com> Link: https://lore.kernel.org/r/20220111142051.37957-1-admin@hifiphile.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent e783362 commit ea2be22

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/clk/at91/sama5d2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
168168
if (IS_ERR(regmap))
169169
return;
170170

171-
sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPLLCK + 1,
171+
sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPINCK + 1,
172172
nck(sama5d2_systemck),
173173
nck(sama5d2_periph32ck),
174174
nck(sama5d2_gck), 3);
@@ -216,6 +216,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
216216
if (IS_ERR(hw))
217217
goto err_free;
218218

219+
sama5d2_pmc->chws[PMC_AUDIOPINCK] = hw;
220+
219221
hw = at91_clk_register_audio_pll_pmc(regmap, "audiopll_pmcck",
220222
"audiopll_fracck");
221223
if (IS_ERR(hw))

include/dt-bindings/clock/at91.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#define PMC_PLLACK 7
2525
#define PMC_PLLBCK 8
2626
#define PMC_AUDIOPLLCK 9
27+
#define PMC_AUDIOPINCK 10
2728

2829
/* SAMA7G5 */
2930
#define PMC_CPUPLL (PMC_MAIN + 1)

0 commit comments

Comments
 (0)