Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************/ |
| 2 | |
| 3 | /* |
Greg Ungerer | 2c62488 | 2012-07-04 13:49:59 +0000 | [diff] [blame] | 4 | * mcf8390.h -- NS8390 support for ColdFire eval boards. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | /****************************************************************************/ |
Greg Ungerer | 2c62488 | 2012-07-04 13:49:59 +0000 | [diff] [blame] | 17 | #ifndef mcf8390_h |
| 18 | #define mcf8390_h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | /****************************************************************************/ |
| 20 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Greg Ungerer | 95dad9b | 2005-11-02 15:04:37 +1000 | [diff] [blame] | 37 | #if defined(CONFIG_ARN5206) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | #define NE2000_ADDR 0x40000300 |
| 39 | #define NE2000_ODDOFFSET 0x00010000 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 40 | #define NE2000_ADDRSIZE 0x00020000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Greg Ungerer | 95dad9b | 2005-11-02 15:04:37 +1000 | [diff] [blame] | 47 | #if defined(CONFIG_M5206eC3) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | #define NE2000_ADDR 0x40000300 |
| 49 | #define NE2000_ODDOFFSET 0x00010000 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 50 | #define NE2000_ADDRSIZE 0x00020000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 59 | #define NE2000_ADDRSIZE 0x00001000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Greg Ungerer | 95dad9b | 2005-11-02 15:04:37 +1000 | [diff] [blame] | 66 | #if defined(CONFIG_M5307C3) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | #define NE2000_ADDR 0x40000300 |
| 68 | #define NE2000_ODDOFFSET 0x00010000 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 69 | #define NE2000_ADDRSIZE 0x00020000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 77 | #define NE2000_ADDRSIZE 0x00010000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 90 | #define NE2000_ADDRSIZE 0x00010000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 103 | #define NE2000_ADDRSIZE 0x00010000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Greg Ungerer | 95dad9b | 2005-11-02 15:04:37 +1000 | [diff] [blame] | 112 | #if defined(CONFIG_ARN5307) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | #define NE2000_ADDR 0xfe600300 |
| 114 | #define NE2000_ODDOFFSET 0x00010000 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 115 | #define NE2000_ADDRSIZE 0x00020000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Greg Ungerer | 95dad9b | 2005-11-02 15:04:37 +1000 | [diff] [blame] | 122 | #if defined(CONFIG_M5407C3) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | #define NE2000_ADDR 0x40000300 |
| 124 | #define NE2000_ODDOFFSET 0x00010000 |
Greg Ungerer | 064bff1 | 2012-07-04 13:50:00 +0000 | [diff] [blame] | 125 | #define NE2000_ADDRSIZE 0x00020000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | #define NE2000_IRQ_VECTOR 0x1b |
| 127 | #define NE2000_BYTE volatile unsigned short |
| 128 | #endif |
| 129 | |
| 130 | /****************************************************************************/ |
Greg Ungerer | 2c62488 | 2012-07-04 13:49:59 +0000 | [diff] [blame] | 131 | #endif /* mcf8390_h */ |