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