Skip to contentSkip to conversation

ARM: OMAP: Fix ethernet IRQF_TRIGGER flag for apollon

PATCH In review Dirk Behme 4 participants 6 messages Dec 21, 2006 – Dec 22, 2006 Network drivers

lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 ARM: OMAP: Fix ethernet IRQF_TRIGGER flag for apollon

ARM: OMAP: Fix ethernet IRQF_TRIGGER flag for apollon

As reported by Kyungmin Park, ethernet IRQF_TRIGGER flag for apollon has to be IRQF_TRIGGER_RISING instead of IRQF_TRIGGER_HIGH.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>
drivers/net/smc91x.h +1 -1
Index: linux-osk/drivers/net/smc91x.h
===================================================================
@@ -198,7 +198,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, 
 				? IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING)
 #else
 #define SMC_IRQ_FLAGS		(machine_is_omap_apollon()		\
-				? IRQF_TRIGGER_HIGH : IRQF_TRIGGER_LOW)
+				? IRQF_TRIGGER_RISING : IRQF_TRIGGER_LOW)
 #endif
 
 #elif	defined(CONFIG_SH_SH4202_MICRODEV)
#1 lore raw
Quoted 16 lines · Dirk Behme

ARM: OMAP: Fix ethernet IRQF_TRIGGER flag for apollon

As reported by Kyungmin Park, ethernet IRQF_TRIGGER flag for apollon has to be IRQF_TRIGGER_RISING instead of IRQF_TRIGGER_HIGH.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>

Index: linux-osk/drivers/net/smc91x.h
===================================================================

drivers/net/smc91x.h SMC_outw(u16 val, void __iomem *ioaddr, · line 204

Quoted 8 lines
drivers/net/smc91x.h +1 -1
@@ -198,7 +198,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, 
 				? IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING)
 #else
 #define SMC_IRQ_FLAGS		(machine_is_omap_apollon()		\
-				? IRQF_TRIGGER_HIGH : IRQF_TRIGGER_LOW)
+				? IRQF_TRIGGER_RISING : IRQF_TRIGGER_LOW)
 #endif
 
 #elif	defined(CONFIG_SH_SH4202_MICRODEV)

AFAIK we _should_ be able to use level GPIO interrupts on all omap2 systems. I wonder why that does not work on apollon? Is there some difference in hardware, or maybe some GPIO lines don't support level interrupts on omap2?

Tony

#2 lore raw
Quoted 7 lines

AFAIK we _should_ be able to use level GPIO interrupts on all omap2 systems. I wonder why that does not work on apollon?

Is there some
difference in hardware, or maybe some GPIO lines don't support level interrupts on omap2?

All GPIO lines on OMAP2 have similar kind of attributes. SMC can operate on both edge and level sensitive interrupts. On few boards they route this interrupt through FPGA or some logic that expects this sort of changes to GPIO interrupt line. Overall it is a board related than OMAP2 or SMC.

In future we can expect more changes to this particular IRQ depending on the board design (definitely not for 3430SDP :).

Regards,
Khasim

Quoted 2 lines

-----Original Message-----
From: [email protected]

[mailto:linux-omap-

Quoted 5 lines

[email protected]] On Behalf Of Tony Lindgren
Sent: Thursday, December 21, 2006 3:58 PM
To: Dirk Behme
Cc: [email protected]
Subject: Re: [PATCH] ARM: OMAP: Fix ethernet IRQF_TRIGGER flag for

apollon

Quoted 12 lines · Dirk Behme
Quoted 9 lines

ARM: OMAP: Fix ethernet IRQF_TRIGGER flag for apollon

As reported by Kyungmin Park, ethernet IRQF_TRIGGER flag for apollon has to be IRQF_TRIGGER_RISING instead of IRQF_TRIGGER_HIGH.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>
Quoted 6 lines

drivers/net/smc91x.h SMC_outw(u16 val, void __iomem *ioaddr, · line 198

Quoted 6 lines

Index: linux-osk/drivers/net/smc91x.h
===================================================================

drivers/net/smc91x.h +0 -0
@@ -198,7 +198,7 @@ SMC_outw(u16 val, void __iomem *ioaddr,
 				? IRQF_TRIGGER_RISING :

IRQF_TRIGGER_FALLING)

Quoted 2 lines

drivers/net/smc91x.h SMC_outw(u16 val, void __iomem *ioaddr, · line 200

Quoted 2 lines
drivers/net/smc91x.h +0 -0
 #else
 #define SMC_IRQ_FLAGS		(machine_is_omap_apollon()

\

Quoted 2 lines

drivers/net/smc91x.h SMC_outw(u16 val, void __iomem *ioaddr, · line 201

Quoted 2 lines
drivers/net/smc91x.h +1 -1
-				? IRQF_TRIGGER_HIGH : IRQF_TRIGGER_LOW)
+				? IRQF_TRIGGER_RISING :

IRQF_TRIGGER_LOW)

Quoted 15 lines

drivers/net/smc91x.h SMC_outw(u16 val, void __iomem *ioaddr, · line 204

Quoted 4 lines
drivers/net/smc91x.h +0 -0
 #endif
 
 #elif	defined(CONFIG_SH_SH4202_MICRODEV)

AFAIK we _should_ be able to use level GPIO interrupts on all omap2 systems. I wonder why that does not work on apollon? Is there some difference in hardware, or maybe some GPIO lines don't support level interrupts on omap2?

Tony
_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

#3 lore raw
In reply to Tony Lindgren
Quoted 5 lines

AFAIK we _should_ be able to use level GPIO interrupts on all omap2 systems. I wonder why that does not work on apollon? Is there some difference in hardware, or maybe some GPIO lines don't support level interrupts on omap2?

The OMAP GPIOs can trigger on edges or levels.

That seems likely a board level issue. The Ethernet interrupt from the raw SMC chip is level assertive. Depending on the SMC bus hook up mode its either active high or low through a smc-push-pull output buffer.

On the TI-SDP platforms this signal goes into an FPGA which depending on the SDP may or may not invert the signal. It seems over time depending on the SDP a pull-up may have been necessary on the FPGA to OMAP-GPIO side when hooked to an open drain fpga output.

At any rate omap-gpios should be ok. The issue is likely with the smc to omap path at the board level.

Regards,
Richard W.

#4 lore raw
Quoted 12 lines · Woodruff, Richard
Quoted 5 lines

AFAIK we _should_ be able to use level GPIO interrupts on all omap2 systems. I wonder why that does not work on apollon? Is there some difference in hardware, or maybe some GPIO lines don't support level interrupts on omap2?

The OMAP GPIOs can trigger on edges or levels.

That seems likely a board level issue. The Ethernet interrupt from the raw SMC chip is level assertive. Depending on the SMC bus hook up mode its either active high or low through a smc-push-pull output buffer.

Quoted 7 lines

On the TI-SDP platforms this signal goes into an FPGA which depending on the SDP may or may not invert the signal. It seems over time depending on the SDP a pull-up may have been necessary on the FPGA to OMAP-GPIO side when hooked to an open drain fpga output.

At any rate omap-gpios should be ok. The issue is likely with the smc to omap path at the board level.

Yeah, I believe the omap level gpios should work fine too. Kyungmin, do you have some special interrupt routing for your smc91x? Or do you see this only with the RT patches applied?

Regards,

Tony

#5 lore raw
In reply to Dirk Behme
Quoted 16 lines · Dirk Behme

ARM: OMAP: Fix ethernet IRQF_TRIGGER flag for apollon

As reported by Kyungmin Park, ethernet IRQF_TRIGGER flag for apollon has to be IRQF_TRIGGER_RISING instead of IRQF_TRIGGER_HIGH.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>

Index: linux-osk/drivers/net/smc91x.h
===================================================================

drivers/net/smc91x.h SMC_outw(u16 val, void __iomem *ioaddr, · line 204

Quoted 8 lines
drivers/net/smc91x.h +1 -1
@@ -198,7 +198,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, 
 				? IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING)
 #else
 #define SMC_IRQ_FLAGS		(machine_is_omap_apollon()		\
-				? IRQF_TRIGGER_HIGH : IRQF_TRIGGER_LOW)
+				? IRQF_TRIGGER_RISING : IRQF_TRIGGER_LOW)
 #endif
 
 #elif	defined(CONFIG_SH_SH4202_MICRODEV)

Pushing today.

Tony