diff options
author | David Brownell <david-b@pacbell.net> | 2005-05-16 08:53:52 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 23:08:09 -0400 |
commit | 5f13e7ec5c1d98f4a63a3a79e66b2b121051f5ac (patch) | |
tree | abe58e74398f5a8f1181f047e3d936226a836288 /drivers/net/smc91x.h | |
parent | a5fe736eaf9bae1b45317313de04b564441b94f2 (diff) | |
download | blackbird-obmc-linux-5f13e7ec5c1d98f4a63a3a79e66b2b121051f5ac.tar.gz blackbird-obmc-linux-5f13e7ec5c1d98f4a63a3a79e66b2b121051f5ac.zip |
[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/net/smc91x.h')
-rw-r--r-- | drivers/net/smc91x.h | 13 |
1 files changed, 13 insertions, 0 deletions
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) #define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) #define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) +#include <asm/mach-types.h> +#include <asm/arch/cpu.h> + +#define SMC_IRQ_TRIGGER_TYPE (( \ + machine_is_omap_h2() \ + || machine_is_omap_h3() \ + || (machine_is_omap_innovator() && !cpu_is_omap150()) \ + ) ? IRQT_FALLING : IRQT_RISING) + + #elif defined(CONFIG_SH_SH4202_MICRODEV) #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) #endif +#ifndef SMC_IRQ_TRIGGER_TYPE +#define SMC_IRQ_TRIGGER_TYPE IRQT_RISING +#endif #ifdef SMC_USE_PXA_DMA /* |