lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] spi: spi-fsl-dspi: Fix external abort on interrupt in exit paths
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-06-15 15:10    [W:0.089 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site