Commit 9319b9da authored by Jorge Eduardo Candelaria's avatar Jorge Eduardo Candelaria Committed by Liam Girdwood

ARM: McBSP: Fix request for irq in OMAP4

In OMAP4, there is only one irq line for TX and RX paths. Use
the correct irq line to avoid errors at runtime.

Also, request irq line only once (instead of requesting for TX
and RX).
Signed-off-by: default avatarJorge Eduardo Candelaria <jorge.candelaria@ti.com>
Acked-by: default avatarJarkko Nikula <jhnikula@gmail.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent d98508a1
...@@ -186,32 +186,28 @@ static struct omap_mcbsp_platform_data omap44xx_mcbsp_pdata[] = { ...@@ -186,32 +186,28 @@ static struct omap_mcbsp_platform_data omap44xx_mcbsp_pdata[] = {
.phys_base = OMAP44XX_MCBSP1_BASE, .phys_base = OMAP44XX_MCBSP1_BASE,
.dma_rx_sync = OMAP44XX_DMA_MCBSP1_RX, .dma_rx_sync = OMAP44XX_DMA_MCBSP1_RX,
.dma_tx_sync = OMAP44XX_DMA_MCBSP1_TX, .dma_tx_sync = OMAP44XX_DMA_MCBSP1_TX,
.rx_irq = INT_24XX_MCBSP1_IRQ_RX, .tx_irq = OMAP44XX_IRQ_MCBSP1,
.tx_irq = INT_24XX_MCBSP1_IRQ_TX,
.ops = &omap2_mcbsp_ops, .ops = &omap2_mcbsp_ops,
}, },
{ {
.phys_base = OMAP44XX_MCBSP2_BASE, .phys_base = OMAP44XX_MCBSP2_BASE,
.dma_rx_sync = OMAP44XX_DMA_MCBSP2_RX, .dma_rx_sync = OMAP44XX_DMA_MCBSP2_RX,
.dma_tx_sync = OMAP44XX_DMA_MCBSP2_TX, .dma_tx_sync = OMAP44XX_DMA_MCBSP2_TX,
.rx_irq = INT_24XX_MCBSP2_IRQ_RX, .tx_irq = OMAP44XX_IRQ_MCBSP2,
.tx_irq = INT_24XX_MCBSP2_IRQ_TX,
.ops = &omap2_mcbsp_ops, .ops = &omap2_mcbsp_ops,
}, },
{ {
.phys_base = OMAP44XX_MCBSP3_BASE, .phys_base = OMAP44XX_MCBSP3_BASE,
.dma_rx_sync = OMAP44XX_DMA_MCBSP3_RX, .dma_rx_sync = OMAP44XX_DMA_MCBSP3_RX,
.dma_tx_sync = OMAP44XX_DMA_MCBSP3_TX, .dma_tx_sync = OMAP44XX_DMA_MCBSP3_TX,
.rx_irq = INT_24XX_MCBSP3_IRQ_RX, .tx_irq = OMAP44XX_IRQ_MCBSP3,
.tx_irq = INT_24XX_MCBSP3_IRQ_TX,
.ops = &omap2_mcbsp_ops, .ops = &omap2_mcbsp_ops,
}, },
{ {
.phys_base = OMAP44XX_MCBSP4_BASE, .phys_base = OMAP44XX_MCBSP4_BASE,
.dma_rx_sync = OMAP44XX_DMA_MCBSP4_RX, .dma_rx_sync = OMAP44XX_DMA_MCBSP4_RX,
.dma_tx_sync = OMAP44XX_DMA_MCBSP4_TX, .dma_tx_sync = OMAP44XX_DMA_MCBSP4_TX,
.rx_irq = INT_24XX_MCBSP4_IRQ_RX, .tx_irq = OMAP44XX_IRQ_MCBSP4,
.tx_irq = INT_24XX_MCBSP4_IRQ_TX,
.ops = &omap2_mcbsp_ops, .ops = &omap2_mcbsp_ops,
}, },
}; };
......
...@@ -778,14 +778,17 @@ int omap_mcbsp_request(unsigned int id) ...@@ -778,14 +778,17 @@ int omap_mcbsp_request(unsigned int id)
goto err_clk_disable; goto err_clk_disable;
} }
init_completion(&mcbsp->rx_irq_completion); if (mcbsp->rx_irq) {
err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler, init_completion(&mcbsp->rx_irq_completion);
err = request_irq(mcbsp->rx_irq,
omap_mcbsp_rx_irq_handler,
0, "McBSP", (void *)mcbsp); 0, "McBSP", (void *)mcbsp);
if (err != 0) { if (err != 0) {
dev_err(mcbsp->dev, "Unable to request RX IRQ %d " dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
"for McBSP%d\n", mcbsp->rx_irq, "for McBSP%d\n", mcbsp->rx_irq,
mcbsp->id); mcbsp->id);
goto err_free_irq; goto err_free_irq;
}
} }
} }
...@@ -835,7 +838,8 @@ void omap_mcbsp_free(unsigned int id) ...@@ -835,7 +838,8 @@ void omap_mcbsp_free(unsigned int id)
if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) { if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
/* Free IRQs */ /* Free IRQs */
free_irq(mcbsp->rx_irq, (void *)mcbsp); if (mcbsp->rx_irq)
free_irq(mcbsp->rx_irq, (void *)mcbsp);
free_irq(mcbsp->tx_irq, (void *)mcbsp); free_irq(mcbsp->tx_irq, (void *)mcbsp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment