diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2010-10-22 02:01:48 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-10-22 03:26:46 -0400 |
commit | 782a895693a52fd8b288c33bdd7e98357888fc1f (patch) | |
tree | c1deb3d7b5e6555973cf06ee7ec58a3b839255bc /drivers | |
parent | 2b9603a0d7e395fb844af90fba71448bc8019077 (diff) |
spi/bfin_spi: handle error/status changes after data interrupts
The error interrupt on the BF537 SIC cannot be enabled on a
per-peripheral basis. Once the error interrupt is enabled
for one peripheral, it is automatically enabled for all.
So in the Blackfin on-chip SPI driver, we need to clear out
these known errors in the data interrupt once we've successfully
finished processing all of the pending data.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index ab483a0ec6d0..d3da41d3f92d 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
@@ -504,6 +504,15 @@ static irqreturn_t bfin_spi_dma_irq_handler(int irq, void *dev_id) | |||
504 | "in dma_irq_handler dmastat:0x%x spistat:0x%x\n", | 504 | "in dma_irq_handler dmastat:0x%x spistat:0x%x\n", |
505 | dmastat, spistat); | 505 | dmastat, spistat); |
506 | 506 | ||
507 | if (drv_data->rx != NULL) { | ||
508 | u16 cr = read_CTRL(drv_data); | ||
509 | /* discard old RX data and clear RXS */ | ||
510 | bfin_spi_dummy_read(drv_data); | ||
511 | write_CTRL(drv_data, cr & ~BIT_CTL_ENABLE); /* Disable SPI */ | ||
512 | write_CTRL(drv_data, cr & ~BIT_CTL_TIMOD); /* Restore State */ | ||
513 | write_STAT(drv_data, BIT_STAT_CLR); /* Clear Status */ | ||
514 | } | ||
515 | |||
507 | clear_dma_irqstat(drv_data->dma_channel); | 516 | clear_dma_irqstat(drv_data->dma_channel); |
508 | 517 | ||
509 | /* | 518 | /* |