1 /****************************************************************************/ 2 3 /* 4 * mcf8390.h -- NS8390 support for ColdFire eval boards. 5 * 6 * (C) Copyright 1999-2000, Greg Ungerer (gerg@snapgear.com) 7 * (C) Copyright 2000, Lineo (www.lineo.com) 8 * (C) Copyright 2001, SnapGear (www.snapgear.com) 9 * 10 * 19990409 David W. Miller Converted from m5206ne.h for 5307 eval board 11 * 12 * Hacked support for m5206e Cadre III evaluation board 13 * Fred Stevens (fred.stevens@pemstar.com) 13 April 1999 14 */ 15 16 /****************************************************************************/ 17 #ifndef mcf8390_h 18 #define mcf8390_h 19 /****************************************************************************/ 20 21 22 /* 23 * Support for NE2000 clones devices in ColdFire based boards. 24 * Not all boards address these parts the same way, some use a 25 * direct addressing method, others use a side-band address space 26 * to access odd address registers, some require byte swapping 27 * others do not. 28 */ 29 #define BSWAP(w) (((w) << 8) | ((w) >> 8)) 30 #define RSWAP(w) (w) 31 32 33 /* 34 * Define the basic hardware resources of NE2000 boards. 35 */ 36 37 #if defined(CONFIG_ARN5206) 38 #define NE2000_ADDR 0x40000300 39 #define NE2000_ODDOFFSET 0x00010000 40 #define NE2000_ADDRSIZE 0x00020000 41 #define NE2000_IRQ_VECTOR 0xf0 42 #define NE2000_IRQ_PRIORITY 2 43 #define NE2000_IRQ_LEVEL 4 44 #define NE2000_BYTE volatile unsigned short 45 #endif 46 47 #if defined(CONFIG_M5206eC3) 48 #define NE2000_ADDR 0x40000300 49 #define NE2000_ODDOFFSET 0x00010000 50 #define NE2000_ADDRSIZE 0x00020000 51 #define NE2000_IRQ_VECTOR 0x1c 52 #define NE2000_IRQ_PRIORITY 2 53 #define NE2000_IRQ_LEVEL 4 54 #define NE2000_BYTE volatile unsigned short 55 #endif 56 57 #if defined(CONFIG_M5206e) && defined(CONFIG_NETtel) 58 #define NE2000_ADDR 0x30000300 59 #define NE2000_ADDRSIZE 0x00001000 60 #define NE2000_IRQ_VECTOR 25 61 #define NE2000_IRQ_PRIORITY 1 62 #define NE2000_IRQ_LEVEL 3 63 #define NE2000_BYTE volatile unsigned char 64 #endif 65 66 #if defined(CONFIG_M5307C3) 67 #define NE2000_ADDR 0x40000300 68 #define NE2000_ODDOFFSET 0x00010000 69 #define NE2000_ADDRSIZE 0x00020000 70 #define NE2000_IRQ_VECTOR 0x1b 71 #define NE2000_BYTE volatile unsigned short 72 #endif 73 74 #if defined(CONFIG_M5272) && defined(CONFIG_NETtel) 75 #define NE2000_ADDR 0x30600300 76 #define NE2000_ODDOFFSET 0x00008000 77 #define NE2000_ADDRSIZE 0x00010000 78 #define NE2000_IRQ_VECTOR 67 79 #undef BSWAP 80 #define BSWAP(w) (w) 81 #define NE2000_BYTE volatile unsigned short 82 #undef RSWAP 83 #define RSWAP(w) (((w) << 8) | ((w) >> 8)) 84 #endif 85 86 #if defined(CONFIG_M5307) && defined(CONFIG_NETtel) 87 #define NE2000_ADDR0 0x30600300 88 #define NE2000_ADDR1 0x30800300 89 #define NE2000_ODDOFFSET 0x00008000 90 #define NE2000_ADDRSIZE 0x00010000 91 #define NE2000_IRQ_VECTOR0 27 92 #define NE2000_IRQ_VECTOR1 29 93 #undef BSWAP 94 #define BSWAP(w) (w) 95 #define NE2000_BYTE volatile unsigned short 96 #undef RSWAP 97 #define RSWAP(w) (((w) << 8) | ((w) >> 8)) 98 #endif 99 100 #if defined(CONFIG_M5307) && defined(CONFIG_SECUREEDGEMP3) 101 #define NE2000_ADDR 0x30600300 102 #define NE2000_ODDOFFSET 0x00008000 103 #define NE2000_ADDRSIZE 0x00010000 104 #define NE2000_IRQ_VECTOR 27 105 #undef BSWAP 106 #define BSWAP(w) (w) 107 #define NE2000_BYTE volatile unsigned short 108 #undef RSWAP 109 #define RSWAP(w) (((w) << 8) | ((w) >> 8)) 110 #endif 111 112 #if defined(CONFIG_ARN5307) 113 #define NE2000_ADDR 0xfe600300 114 #define NE2000_ODDOFFSET 0x00010000 115 #define NE2000_ADDRSIZE 0x00020000 116 #define NE2000_IRQ_VECTOR 0x1b 117 #define NE2000_IRQ_PRIORITY 2 118 #define NE2000_IRQ_LEVEL 3 119 #define NE2000_BYTE volatile unsigned short 120 #endif 121 122 #if defined(CONFIG_M5407C3) 123 #define NE2000_ADDR 0x40000300 124 #define NE2000_ODDOFFSET 0x00010000 125 #define NE2000_ADDRSIZE 0x00020000 126 #define NE2000_IRQ_VECTOR 0x1b 127 #define NE2000_BYTE volatile unsigned short 128 #endif 129 130 /****************************************************************************/ 131 #endif /* mcf8390_h */ 132