mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-03 09:34:42 +00:00
dma: dw: allow shared interrupts
In the PC world is quite possible that devices are sharing the same interrupt line. The patch prepares dw_dmac driver to such cases. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
78f3c9d2e0
commit
3783cef876
@ -650,10 +650,13 @@ static void dw_dma_tasklet(unsigned long data)
|
|||||||
static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
|
static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct dw_dma *dw = dev_id;
|
struct dw_dma *dw = dev_id;
|
||||||
u32 status;
|
u32 status = dma_readl(dw, STATUS_INT);
|
||||||
|
|
||||||
dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__,
|
dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, status);
|
||||||
dma_readl(dw, STATUS_INT));
|
|
||||||
|
/* Check if we have any interrupt from the DMAC */
|
||||||
|
if (!status)
|
||||||
|
return IRQ_NONE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Just disable the interrupts. We'll turn them back on in the
|
* Just disable the interrupts. We'll turn them back on in the
|
||||||
@ -1566,8 +1569,8 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
|
|||||||
/* Disable BLOCK interrupts as well */
|
/* Disable BLOCK interrupts as well */
|
||||||
channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask);
|
channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask);
|
||||||
|
|
||||||
err = devm_request_irq(chip->dev, chip->irq, dw_dma_interrupt, 0,
|
err = devm_request_irq(chip->dev, chip->irq, dw_dma_interrupt,
|
||||||
"dw_dmac", dw);
|
IRQF_SHARED, "dw_dmac", dw);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user