[PATCH v5 11/11] ASoC: renesas: fsi: Add SPU clock control in hw_startup/shutdown
From: phucduc . bui
Date: Mon Jun 08 2026 - 21:35:30 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
Enable and disable the SPU clock in fsi_hw_startup() and
fsi_hw_shutdown() to ensure the clock is active while the
driver accesses hardware registers.
Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
Changes in v5:
- Drop spu_count and rely on the clk core for clock reference
counting.
sound/soc/renesas/fsi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/renesas/fsi.c b/sound/soc/renesas/fsi.c
index 80e87b815c1b..a1c463d73756 100644
--- a/sound/soc/renesas/fsi.c
+++ b/sound/soc/renesas/fsi.c
@@ -1560,6 +1560,11 @@ static int fsi_hw_startup(struct fsi_priv *fsi,
struct device *dev)
{
u32 data = 0;
+ int ret;
+ /* enable spu bus bridge clock */
+ ret = clk_enable(fsi->master->clk_spu);
+ if (ret < 0)
+ return ret;
/* clock setting */
if (fsi_is_clk_master(fsi))
@@ -1617,6 +1622,8 @@ static int fsi_hw_shutdown(struct fsi_priv *fsi,
/* stop master clock */
if (fsi_is_clk_master(fsi))
return fsi_clk_disable(dev, fsi);
+ /* stop spu bus bridge clock */
+ clk_disable(fsi->master->clk_spu);
return 0;
}
--
2.43.0