Skip to contentSkip to conversation

ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4

PATCH In review Peter Ujfalusi 4 participants 4 messages Mar 7, 2012 – Mar 8, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4

On OMAP4 we have one interrupt line per McBSP port. At proble time tx, and rx irq value will be -ENXIO, and only the tx irq will get corrected.
In omap_mcbsp_request if the rx_irq is not 0 we proceed, and try to request the interrupt, which will fail on OMAP4 (rx_irq == -6).
To avoid this error, clear the rx_irq at probe time on OMAP4.

---
 sound/soc/omap/mcbsp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/omap/mcbsp.c +3 -1
index 21dbb05..c3e31de 100644
@@ -958,8 +958,10 @@ int __devinit omap_mcbsp_init(struct platform_device *pdev)
 	mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
 
 	/* From OMAP4 there will be a single irq line */
-	if (mcbsp->tx_irq == -ENXIO)
+	if (mcbsp->tx_irq == -ENXIO) {
 		mcbsp->tx_irq = platform_get_irq(pdev, 0);
+		mcbsp->rx_irq = 0;
+	}
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
 	if (!res) {
Signature · 1 line
1.7.8.5
Reviewed-by on v1 1/1
#1 lore raw

Dear Peter,

Am Mittwoch, den 07.03.2012, 11:17 +0200 schrieb Peter Ujfalusi:

Quoted 2 lines

On OMAP4 we have one interrupt line per McBSP port. At proble time tx, and rx irq value will be -ENXIO,

s/proble/probe/

Quoted 18 lines

and only the tx irq will get corrected.
In omap_mcbsp_request if the rx_irq is not 0 we proceed, and try to request the interrupt, which will fail on OMAP4 (rx_irq == -6).
To avoid this error, clear the rx_irq at probe time on OMAP4.

---
 sound/soc/omap/mcbsp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/omap/mcbsp.c +0 -0
index 21dbb05..c3e31de 100644
@@ -958,8 +958,10 @@ int __devinit omap_mcbsp_init(struct platform_device *pdev)
 	mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");

sound/soc/omap/mcbsp.c int __devinit omap_mcbsp_init(struct platform_device *pdev) · line 967

Quoted 10 lines
sound/soc/omap/mcbsp.c +3 -1
 
 	/* From OMAP4 there will be a single irq line */
-	if (mcbsp->tx_irq == -ENXIO)
+	if (mcbsp->tx_irq == -ENXIO) {
 		mcbsp->tx_irq = platform_get_irq(pdev, 0);
+		mcbsp->rx_irq = 0;
+	}
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
 	if (!res) {

Thanks,

Paul

Acked-by
#2 lore raw
Quoted 9 lines · Paul Menzel

Dear Peter,

Am Mittwoch, den 07.03.2012, 11:17 +0200 schrieb Peter Ujfalusi:

Quoted 2 lines

On OMAP4 we have one interrupt line per McBSP port. At proble time tx, and rx irq value will be -ENXIO,

s/proble/probe/

I think I have acked this earlier to plat-omap/mcbsp.c. You could add my ack here