RE: [PATCH 1/2] ARM: McBSP: Fix request for irq in OMAP4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: linux-omap-owner@xxxxxxxxxxxxxxx 
> [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of Jorge 
> Eduardo Candelaria
> Sent: Wednesday, May 05, 2010 5:08 AM
> To: linux-omap@xxxxxxxxxxxxxxx
> Cc: Candelaria Villarreal, Jorge
> Subject: [PATCH 1/2] 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@xxxxxx>
> ---
>  arch/arm/mach-omap2/mcbsp.c |   12 ++++--------
>  arch/arm/plat-omap/mcbsp.c  |   20 ++++++++++++--------
>  2 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
> index 2f3cad6..6b550ec 100644
> --- a/arch/arm/mach-omap2/mcbsp.c
> +++ b/arch/arm/mach-omap2/mcbsp.c
> @@ -187,32 +187,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         = INT_44XX_MCBSP1_IRQ,
>  		.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         = INT_44XX_MCBSP2_IRQ,
>  		.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         = INT_44XX_MCBSP3_IRQ,
>  		.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         = INT_44XX_MCBSP4_IRQ,
>  		.ops            = &omap2_mcbsp_ops,
>  	},
>  };
> diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
> index e1d0440..6e9660d 100644
> --- a/arch/arm/plat-omap/mcbsp.c
> +++ b/arch/arm/plat-omap/mcbsp.c
> @@ -724,14 +724,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 (!cpu_is_omap44xx) {
> +			init_completion(&mcbsp->rx_irq_completion);
> +			err = request_irq(mcbsp->rx_irq,
> +					omap_mcbsp_rx_irq_handler,
>  					0, "McBSP", (void *)mcbsp);

How about using request_threaded_irq?
Refer to: http://lwn.net/Articles/302043/

-Manjunath--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux