Re: [PATCH v2 1/3] spi: spi-fsl-dspi: Fix external abort on interrupt in exit paths
From: Mark Brown
Date: Mon Jun 15 2020 - 09:10:12 EST
On Mon, Jun 15, 2020 at 03:56:01PM +0300, Vladimir Oltean wrote:
> And the down-shot is that whatever is done in dspi_remove (free_irq)
> also needs to be done in dspi_suspend, but with extra care in
> dspi_resume not only to request the irq again, but also to flush the
> module's FIFOs and clear interrupts, because there might have been
> nasty stuff uncaught during sleep:
> regmap_update_bits(dspi->regmap, SPI_MCR,
> SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF,
> SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF);
> regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
> So it's pretty messy.
It's a bit unusual to need to actually free the IRQ over suspend -
what's driving that requirement here? I can see we might need to
reinit the hardware but usually the interrupt handler can be left there
safely.
Attachment:
signature.asc
Description: PGP signature