Commit ea2be22f authored by Zixun LI's avatar Zixun LI Committed by Stephen Boyd

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: default avatarZixun LI <admin@hifiphile.com>
Reviewed-by: default avatarClaudiu Beznea <Claudiu.Beznea@microchip.com>
Link: https://lore.kernel.org/r/20220111142051.37957-1-admin@hifiphile.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent e783362e
...@@ -168,7 +168,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) ...@@ -168,7 +168,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
if (IS_ERR(regmap)) if (IS_ERR(regmap))
return; return;
sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPLLCK + 1, sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPINCK + 1,
nck(sama5d2_systemck), nck(sama5d2_systemck),
nck(sama5d2_periph32ck), nck(sama5d2_periph32ck),
nck(sama5d2_gck), 3); nck(sama5d2_gck), 3);
...@@ -216,6 +216,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np) ...@@ -216,6 +216,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
if (IS_ERR(hw)) if (IS_ERR(hw))
goto err_free; goto err_free;
sama5d2_pmc->chws[PMC_AUDIOPINCK] = hw;
hw = at91_clk_register_audio_pll_pmc(regmap, "audiopll_pmcck", hw = at91_clk_register_audio_pll_pmc(regmap, "audiopll_pmcck",
"audiopll_fracck"); "audiopll_fracck");
if (IS_ERR(hw)) if (IS_ERR(hw))
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#define PMC_PLLACK 7 #define PMC_PLLACK 7
#define PMC_PLLBCK 8 #define PMC_PLLBCK 8
#define PMC_AUDIOPLLCK 9 #define PMC_AUDIOPLLCK 9
#define PMC_AUDIOPINCK 10
/* SAMA7G5 */ /* SAMA7G5 */
#define PMC_CPUPLL (PMC_MAIN + 1) #define PMC_CPUPLL (PMC_MAIN + 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment