]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/smc91x.h
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
[linux-2.6-omap-h63xx.git] / drivers / net / smc91x.h
index 946528e6b742000523f6991cf7925f2c123a3b24..817f200742c37132b4982bb0a333ebe76096fcb8 100644 (file)
@@ -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_omap1510()) \
+       ) ? IRQT_FALLING : IRQT_RISING)
+
+
 #elif  defined(CONFIG_SH_SH4202_MICRODEV)
 
 #define SMC_CAN_USE_8BIT       0
@@ -220,12 +230,12 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
 #define SMC_CAN_USE_16BIT      1
 #define SMC_CAN_USE_32BIT      0
 
-#define SMC_inb(a, r)          inb((a) + (r) - 0xa0000000)
-#define SMC_inw(a, r)          inw((a) + (r) - 0xa0000000)
-#define SMC_outb(v, a, r)      outb(v, (a) + (r) - 0xa0000000)
-#define SMC_outw(v, a, r)      outw(v, (a) + (r) - 0xa0000000)
-#define SMC_insw(a, r, p, l)   insw((a) + (r) - 0xa0000000, p, l)
-#define SMC_outsw(a, r, p, l)  outsw((a) + (r) - 0xa0000000, p, l)
+#define SMC_inb(a, r)          inb((u32)a) + (r))
+#define SMC_inw(a, r)          inw(((u32)a) + (r))
+#define SMC_outb(v, a, r)      outb(v, ((u32)a) + (r))
+#define SMC_outw(v, a, r)      outw(v, ((u32)a) + (r))
+#define SMC_insw(a, r, p, l)   insw(((u32)a) + (r), p, l)
+#define SMC_outsw(a, r, p, l)  outsw(((u32)a) + (r), p, l)
 
 #define set_irq_type(irq, type)        do {} while(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
 /*
@@ -973,7 +986,7 @@ static const char * chip_ids[ 16 ] =  {
        })
 #endif
 
-#if SMC_CAN_USE_DATACS
+#ifdef SMC_CAN_USE_DATACS
 #define SMC_PUSH_DATA(p, l)                                            \
        if ( lp->datacs ) {                                             \
                unsigned char *__ptr = (p);                             \