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: Jorge Eduardo Candelaria <jorge.candelaria@ti.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
d98508a121
commit
9319b9da35
|
@ -186,32 +186,28 @@ static struct omap_mcbsp_platform_data omap44xx_mcbsp_pdata[] = {
|
|||
.phys_base = OMAP44XX_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_24XX_MCBSP1_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP1_IRQ_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP1,
|
||||
.ops = &omap2_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP44XX_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP2_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP2_TX,
|
||||
.rx_irq = INT_24XX_MCBSP2_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP2_IRQ_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP2,
|
||||
.ops = &omap2_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP44XX_MCBSP3_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP3_TX,
|
||||
.rx_irq = INT_24XX_MCBSP3_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP3_IRQ_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP3,
|
||||
.ops = &omap2_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP44XX_MCBSP4_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP4_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP4_TX,
|
||||
.rx_irq = INT_24XX_MCBSP4_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP4_IRQ_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP4,
|
||||
.ops = &omap2_mcbsp_ops,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -778,14 +778,17 @@ int omap_mcbsp_request(unsigned int id)
|
|||
goto err_clk_disable;
|
||||
}
|
||||
|
||||
init_completion(&mcbsp->rx_irq_completion);
|
||||
err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler,
|
||||
if (mcbsp->rx_irq) {
|
||||
init_completion(&mcbsp->rx_irq_completion);
|
||||
err = request_irq(mcbsp->rx_irq,
|
||||
omap_mcbsp_rx_irq_handler,
|
||||
0, "McBSP", (void *)mcbsp);
|
||||
if (err != 0) {
|
||||
dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
|
||||
"for McBSP%d\n", mcbsp->rx_irq,
|
||||
mcbsp->id);
|
||||
goto err_free_irq;
|
||||
if (err != 0) {
|
||||
dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
|
||||
"for McBSP%d\n", mcbsp->rx_irq,
|
||||
mcbsp->id);
|
||||
goto err_free_irq;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -835,7 +838,8 @@ void omap_mcbsp_free(unsigned int id)
|
|||
|
||||
if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue