diff options
author | David Brownell <david-b@pacbell.net> | 2005-05-16 11:53:52 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 23:08:09 -0400 |
commit | 5f13e7ec5c1d98f4a63a3a79e66b2b121051f5ac (patch) | |
tree | abe58e74398f5a8f1181f047e3d936226a836288 /drivers | |
parent | a5fe736eaf9bae1b45317313de04b564441b94f2 (diff) |
[PATCH] smc91x needs settable IRQ trigger type
For boards that invert the SMC91x IRQ line (maybe an FPGA inverts it),
the set_irq_type() call can't assume IRQT_RISING. These particular
boards currently use OMAP-specific calls to change the trigger type,
but the boards break when set_irq_type() stops being a NOP.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/smc91x.c | 2 | ||||
-rw-r--r-- | drivers/net/smc91x.h | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index cfb9d3cdb04a..1438fdd20826 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1998,7 +1998,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr) | |||
1998 | if (retval) | 1998 | if (retval) |
1999 | goto err_out; | 1999 | goto err_out; |
2000 | 2000 | ||
2001 | set_irq_type(dev->irq, IRQT_RISING); | 2001 | set_irq_type(dev->irq, SMC_IRQ_TRIGGER_TYPE); |
2002 | 2002 | ||
2003 | #ifdef SMC_USE_PXA_DMA | 2003 | #ifdef SMC_USE_PXA_DMA |
2004 | { | 2004 | { |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 946528e6b742..7089d86e857a 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -182,6 +182,16 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
182 | #define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) | 182 | #define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) |
183 | #define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) | 183 | #define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) |
184 | 184 | ||
185 | #include <asm/mach-types.h> | ||
186 | #include <asm/arch/cpu.h> | ||
187 | |||
188 | #define SMC_IRQ_TRIGGER_TYPE (( \ | ||
189 | machine_is_omap_h2() \ | ||
190 | || machine_is_omap_h3() \ | ||
191 | || (machine_is_omap_innovator() && !cpu_is_omap150()) \ | ||
192 | ) ? IRQT_FALLING : IRQT_RISING) | ||
193 | |||
194 | |||
185 | #elif defined(CONFIG_SH_SH4202_MICRODEV) | 195 | #elif defined(CONFIG_SH_SH4202_MICRODEV) |
186 | 196 | ||
187 | #define SMC_CAN_USE_8BIT 0 | 197 | #define SMC_CAN_USE_8BIT 0 |
@@ -300,6 +310,9 @@ static inline void SMC_outsw (unsigned long a, int r, unsigned char* p, int l) | |||
300 | 310 | ||
301 | #endif | 311 | #endif |
302 | 312 | ||
313 | #ifndef SMC_IRQ_TRIGGER_TYPE | ||
314 | #define SMC_IRQ_TRIGGER_TYPE IRQT_RISING | ||
315 | #endif | ||
303 | 316 | ||
304 | #ifdef SMC_USE_PXA_DMA | 317 | #ifdef SMC_USE_PXA_DMA |
305 | /* | 318 | /* |