setup enviroment for compilation
[linux-2.4.21-pre4.git] / drivers / net / 8390_redwood.h
1 /*
2  *
3  *    Module name: 8390_redwood.h
4  *
5  *    Description:
6  *      special hacks for 8390 STNIC on IBM Redwood board
7  *
8  */
9
10 #ifndef __8390_REDWOOD_H__
11 #define __8390_REDWOOD_H__
12
13 /*
14   FTR made these routines, ostensibly to 'slow down' access the 8390
15   chip.  I found it worked fine without them.  I'm not sure they are
16   required...
17 */
18
19 #undef  outb_p
20 #undef  inb_p
21 #undef  inb
22 #undef  outb
23
24 #define FTR_DELAY_HACK
25 #ifdef  FTR_DELAY_HACK
26
27 static inline unsigned char inb_p(long address)
28 {
29         readb((void *)(address & 0xffffff00) + 0x40);
30         return readb(address);
31 }
32
33 static inline void outb_p(unsigned char value, long address)
34 {
35         readb((void *)(address & 0xffffff00) + 0x40);
36         writeb(value, address);
37 }
38
39 static inline unsigned char inb(long address)
40 {
41         readb((void *)(address & 0xffffff00) + 0x40);
42         return readb(address);
43 }
44
45 static inline void outb(unsigned char value, long address)
46 {
47         readb((void *)(address & 0xffffff00) + 0x40);
48         writeb(value, address);
49 }
50
51 #else /* !FTR_DELAY_HACK */
52
53 #define inb_p   readb
54 #define outb_p  writeb
55 #define inb     readb
56 #define outb    writeb
57
58 #endif /* FTR_DELAY_HACK */
59
60
61 #endif /* __8390_REDWOOD_H__ */
62