18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/****************************************************************************/
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci/*
58c2ecf20Sopenharmony_ci *	mcf8390.h -- NS8390 support for ColdFire eval boards.
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *	(C) Copyright 1999-2000, Greg Ungerer (gerg@snapgear.com)
88c2ecf20Sopenharmony_ci *	(C) Copyright 2000,      Lineo (www.lineo.com)
98c2ecf20Sopenharmony_ci *	(C) Copyright 2001,      SnapGear (www.snapgear.com)
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci *      19990409 David W. Miller  Converted from m5206ne.h for 5307 eval board
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci *      Hacked support for m5206e Cadre III evaluation board
148c2ecf20Sopenharmony_ci *      Fred Stevens (fred.stevens@pemstar.com) 13 April 1999
158c2ecf20Sopenharmony_ci */
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci/****************************************************************************/
188c2ecf20Sopenharmony_ci#ifndef	mcf8390_h
198c2ecf20Sopenharmony_ci#define	mcf8390_h
208c2ecf20Sopenharmony_ci/****************************************************************************/
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci/*
248c2ecf20Sopenharmony_ci *	Support for NE2000 clones devices in ColdFire based boards.
258c2ecf20Sopenharmony_ci *	Not all boards address these parts the same way, some use a
268c2ecf20Sopenharmony_ci *	direct addressing method, others use a side-band address space
278c2ecf20Sopenharmony_ci *	to access odd address registers, some require byte swapping
288c2ecf20Sopenharmony_ci *	others do not.
298c2ecf20Sopenharmony_ci */
308c2ecf20Sopenharmony_ci#define	BSWAP(w)	(((w) << 8) | ((w) >> 8))
318c2ecf20Sopenharmony_ci#define	RSWAP(w)	(w)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci/*
358c2ecf20Sopenharmony_ci *	Define the basic hardware resources of NE2000 boards.
368c2ecf20Sopenharmony_ci */
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#if defined(CONFIG_ARN5206)
398c2ecf20Sopenharmony_ci#define NE2000_ADDR		0x40000300
408c2ecf20Sopenharmony_ci#define NE2000_ODDOFFSET	0x00010000
418c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00020000
428c2ecf20Sopenharmony_ci#define	NE2000_IRQ_VECTOR	0xf0
438c2ecf20Sopenharmony_ci#define	NE2000_IRQ_PRIORITY	2
448c2ecf20Sopenharmony_ci#define	NE2000_IRQ_LEVEL	4
458c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
468c2ecf20Sopenharmony_ci#endif
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci#if defined(CONFIG_M5206eC3)
498c2ecf20Sopenharmony_ci#define	NE2000_ADDR		0x40000300
508c2ecf20Sopenharmony_ci#define	NE2000_ODDOFFSET	0x00010000
518c2ecf20Sopenharmony_ci#define	NE2000_ADDRSIZE		0x00020000
528c2ecf20Sopenharmony_ci#define	NE2000_IRQ_VECTOR	0x1c
538c2ecf20Sopenharmony_ci#define	NE2000_IRQ_PRIORITY	2
548c2ecf20Sopenharmony_ci#define	NE2000_IRQ_LEVEL	4
558c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
568c2ecf20Sopenharmony_ci#endif
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci#if defined(CONFIG_M5206e) && defined(CONFIG_NETtel)
598c2ecf20Sopenharmony_ci#define NE2000_ADDR		0x30000300
608c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00001000
618c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR	25
628c2ecf20Sopenharmony_ci#define NE2000_IRQ_PRIORITY	1
638c2ecf20Sopenharmony_ci#define NE2000_IRQ_LEVEL	3
648c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned char
658c2ecf20Sopenharmony_ci#endif
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#if defined(CONFIG_M5307C3)
688c2ecf20Sopenharmony_ci#define NE2000_ADDR		0x40000300
698c2ecf20Sopenharmony_ci#define NE2000_ODDOFFSET	0x00010000
708c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00020000
718c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR	0x1b
728c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
738c2ecf20Sopenharmony_ci#endif
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci#if defined(CONFIG_M5272) && defined(CONFIG_NETtel)
768c2ecf20Sopenharmony_ci#define NE2000_ADDR		0x30600300
778c2ecf20Sopenharmony_ci#define NE2000_ODDOFFSET	0x00008000
788c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00010000
798c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR	67
808c2ecf20Sopenharmony_ci#undef	BSWAP
818c2ecf20Sopenharmony_ci#define	BSWAP(w)		(w)
828c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
838c2ecf20Sopenharmony_ci#undef	RSWAP
848c2ecf20Sopenharmony_ci#define	RSWAP(w)		(((w) << 8) | ((w) >> 8))
858c2ecf20Sopenharmony_ci#endif
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci#if defined(CONFIG_M5307) && defined(CONFIG_NETtel)
888c2ecf20Sopenharmony_ci#define NE2000_ADDR0		0x30600300
898c2ecf20Sopenharmony_ci#define NE2000_ADDR1		0x30800300
908c2ecf20Sopenharmony_ci#define NE2000_ODDOFFSET	0x00008000
918c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00010000
928c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR0	27
938c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR1	29
948c2ecf20Sopenharmony_ci#undef	BSWAP
958c2ecf20Sopenharmony_ci#define	BSWAP(w)		(w)
968c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
978c2ecf20Sopenharmony_ci#undef	RSWAP
988c2ecf20Sopenharmony_ci#define	RSWAP(w)		(((w) << 8) | ((w) >> 8))
998c2ecf20Sopenharmony_ci#endif
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci#if defined(CONFIG_M5307) && defined(CONFIG_SECUREEDGEMP3)
1028c2ecf20Sopenharmony_ci#define NE2000_ADDR		0x30600300
1038c2ecf20Sopenharmony_ci#define NE2000_ODDOFFSET	0x00008000
1048c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00010000
1058c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR	27
1068c2ecf20Sopenharmony_ci#undef	BSWAP
1078c2ecf20Sopenharmony_ci#define	BSWAP(w)		(w)
1088c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
1098c2ecf20Sopenharmony_ci#undef	RSWAP
1108c2ecf20Sopenharmony_ci#define	RSWAP(w)		(((w) << 8) | ((w) >> 8))
1118c2ecf20Sopenharmony_ci#endif
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci#if defined(CONFIG_ARN5307)
1148c2ecf20Sopenharmony_ci#define NE2000_ADDR		0xfe600300
1158c2ecf20Sopenharmony_ci#define NE2000_ODDOFFSET	0x00010000
1168c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00020000
1178c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR	0x1b
1188c2ecf20Sopenharmony_ci#define NE2000_IRQ_PRIORITY	2
1198c2ecf20Sopenharmony_ci#define NE2000_IRQ_LEVEL	3
1208c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
1218c2ecf20Sopenharmony_ci#endif
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci#if defined(CONFIG_M5407C3)
1248c2ecf20Sopenharmony_ci#define NE2000_ADDR		0x40000300
1258c2ecf20Sopenharmony_ci#define NE2000_ODDOFFSET	0x00010000
1268c2ecf20Sopenharmony_ci#define NE2000_ADDRSIZE		0x00020000
1278c2ecf20Sopenharmony_ci#define NE2000_IRQ_VECTOR	0x1b
1288c2ecf20Sopenharmony_ci#define	NE2000_BYTE		volatile unsigned short
1298c2ecf20Sopenharmony_ci#endif
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ci/****************************************************************************/
1328c2ecf20Sopenharmony_ci#endif	/* mcf8390_h */
133