summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorYong Wang <yong.y.wang@linux.intel.com>2010-09-07 15:27:27 +0800
committerGrant Likely <grant.likely@secretlab.ca>2010-09-08 10:49:50 -0600
commitcbcc062abb16d39839b3d8d4e3d20360fc21eb58 (patch)
tree8ce802ede9dd14760e9426a75c2c95c4ce2b9474 /drivers/spi
parent9d8f86b56093d7b06d81d4063d5b9a4cbf887e75 (diff)
downloadlinux-3.10-cbcc062abb16d39839b3d8d4e3d20360fc21eb58.tar.gz
linux-3.10-cbcc062abb16d39839b3d8d4e3d20360fc21eb58.tar.bz2
linux-3.10-cbcc062abb16d39839b3d8d4e3d20360fc21eb58.zip
spi/dw_spi: Allow interrupt sharing
Allow interrupt sharing since exclusive interrupt line for DW SPI controller is not provided on every platform. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/dw_spi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index d256cb00604..11fbbf6fb07 100644
--- a/drivers/spi/dw_spi.c
+++ b/drivers/spi/dw_spi.c
@@ -396,6 +396,11 @@ static irqreturn_t interrupt_transfer(struct dw_spi *dws)
static irqreturn_t dw_spi_irq(int irq, void *dev_id)
{
struct dw_spi *dws = dev_id;
+ u16 irq_status, irq_mask = 0x3f;
+
+ irq_status = dw_readw(dws, isr) & irq_mask;
+ if (!irq_status)
+ return IRQ_NONE;
if (!dws->cur_msg) {
spi_mask_intr(dws, SPI_INT_TXEI);
@@ -883,7 +888,7 @@ int __devinit dw_spi_add_host(struct dw_spi *dws)
dws->dma_inited = 0;
dws->dma_addr = (dma_addr_t)(dws->paddr + 0x60);
- ret = request_irq(dws->irq, dw_spi_irq, 0,
+ ret = request_irq(dws->irq, dw_spi_irq, IRQF_SHARED,
"dw_spi", dws);
if (ret < 0) {
dev_err(&master->dev, "can not get IRQ\n");