Skip to contentSkip to conversation

clk: at91: allow setting PMC_AUDIOPINCK clock parents via DT

PATCH Applied Zixun LI 2 participants 2 messages Jan 11, 2022 – Jan 25, 2022

Subsystems (3)
lore
Share & tools
lore

Zixun LI

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/clk/at91/sama5d2.c       | 4 +++-
 include/dt-bindings/clock/at91.h | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/clk/at91/sama5d2.c +3 -1
index d027294a0089..f479e39e3bb2 100644
@@ -168,7 +168,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
 	if (IS_ERR(regmap))
 		return;
 
-	sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPLLCK + 1,
+	sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPINCK + 1,
 					nck(sama5d2_systemck),
 					nck(sama5d2_periph32ck),
 					nck(sama5d2_gck), 3);
@@ -216,6 +216,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
 	if (IS_ERR(hw))
 		goto err_free;
 
+	sama5d2_pmc->chws[PMC_AUDIOPINCK] = hw;
+
 	hw = at91_clk_register_audio_pll_pmc(regmap, "audiopll_pmcck",
 					     "audiopll_fracck");
 	if (IS_ERR(hw))
include/dt-bindings/clock/at91.h +1 -0
index 98e1b2ab6403..573cf8c25eb4 100644
@@ -24,6 +24,7 @@
 #define PMC_PLLACK		7
 #define PMC_PLLBCK		8
 #define PMC_AUDIOPLLCK		9
+#define PMC_AUDIOPINCK		10
 
 /* SAMA7G5 */
 #define PMC_CPUPLL		(PMC_MAIN + 1)
Signature · 1 line
2.30.2
maintainer Applied
#1 lore raw

Quoting Zixun LI (2022-01-11 06:20:50)

Quoted 7 lines

Make AUDIOPINCK accessible via phandle to select it as peripheral clock parent using assigned-clock-parents in DT where available.

---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel