mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
ASoC: renesas: fsi: Fix register access from in-flight IRQ after shutdown
In-flight IRQs may still be running when the SPU clock is disabled, leading to register access after shutdown and causing system hangs. Fix this to use fsi_stream_is_working() when handling in-flight IRQ handlers. If no streams are active, the handler now returns immediately to prevent hardware access. Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260609113836.45079-6-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c9e05e2fa0
commit
e813df3ef5
|
|
@ -470,6 +470,10 @@ static int fsi_get_current_fifo_samples(struct fsi_priv *fsi,
|
|||
|
||||
static void fsi_count_fifo_err(struct fsi_priv *fsi)
|
||||
{
|
||||
if (!fsi_stream_is_working(fsi, &fsi->playback) &&
|
||||
!fsi_stream_is_working(fsi, &fsi->capture))
|
||||
return;
|
||||
|
||||
u32 ostatus = fsi_reg_read(fsi, DOFF_ST);
|
||||
u32 istatus = fsi_reg_read(fsi, DIFF_ST);
|
||||
|
||||
|
|
@ -681,6 +685,10 @@ static void fsi_irq_clear_status(struct fsi_priv *fsi)
|
|||
u32 data = 0;
|
||||
struct fsi_master *master = fsi_get_master(fsi);
|
||||
|
||||
if (!fsi_stream_is_working(fsi, &fsi->playback) &&
|
||||
!fsi_stream_is_working(fsi, &fsi->capture))
|
||||
return;
|
||||
|
||||
data |= AB_IO(1, fsi_get_port_shift(fsi, &fsi->playback));
|
||||
data |= AB_IO(1, fsi_get_port_shift(fsi, &fsi->capture));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user