162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/****************************************************************************/ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci/* 562306a36Sopenharmony_ci * mcf8390.h -- NS8390 support for ColdFire eval boards. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * (C) Copyright 1999-2000, Greg Ungerer (gerg@snapgear.com) 862306a36Sopenharmony_ci * (C) Copyright 2000, Lineo (www.lineo.com) 962306a36Sopenharmony_ci * (C) Copyright 2001, SnapGear (www.snapgear.com) 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * 19990409 David W. Miller Converted from m5206ne.h for 5307 eval board 1262306a36Sopenharmony_ci * 1362306a36Sopenharmony_ci * Hacked support for m5206e Cadre III evaluation board 1462306a36Sopenharmony_ci * Fred Stevens (fred.stevens@pemstar.com) 13 April 1999 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci/****************************************************************************/ 1862306a36Sopenharmony_ci#ifndef mcf8390_h 1962306a36Sopenharmony_ci#define mcf8390_h 2062306a36Sopenharmony_ci/****************************************************************************/ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci/* 2462306a36Sopenharmony_ci * Support for NE2000 clones devices in ColdFire based boards. 2562306a36Sopenharmony_ci * Not all boards address these parts the same way, some use a 2662306a36Sopenharmony_ci * direct addressing method, others use a side-band address space 2762306a36Sopenharmony_ci * to access odd address registers, some require byte swapping 2862306a36Sopenharmony_ci * others do not. 2962306a36Sopenharmony_ci */ 3062306a36Sopenharmony_ci#define BSWAP(w) (((w) << 8) | ((w) >> 8)) 3162306a36Sopenharmony_ci#define RSWAP(w) (w) 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* 3562306a36Sopenharmony_ci * Define the basic hardware resources of NE2000 boards. 3662306a36Sopenharmony_ci */ 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#if defined(CONFIG_ARN5206) 3962306a36Sopenharmony_ci#define NE2000_ADDR 0x40000300 4062306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00010000 4162306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00020000 4262306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 0xf0 4362306a36Sopenharmony_ci#define NE2000_IRQ_PRIORITY 2 4462306a36Sopenharmony_ci#define NE2000_IRQ_LEVEL 4 4562306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 4662306a36Sopenharmony_ci#endif 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci#if defined(CONFIG_M5206eC3) 4962306a36Sopenharmony_ci#define NE2000_ADDR 0x40000300 5062306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00010000 5162306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00020000 5262306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 0x1c 5362306a36Sopenharmony_ci#define NE2000_IRQ_PRIORITY 2 5462306a36Sopenharmony_ci#define NE2000_IRQ_LEVEL 4 5562306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 5662306a36Sopenharmony_ci#endif 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#if defined(CONFIG_M5206e) && defined(CONFIG_NETtel) 5962306a36Sopenharmony_ci#define NE2000_ADDR 0x30000300 6062306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00001000 6162306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 25 6262306a36Sopenharmony_ci#define NE2000_IRQ_PRIORITY 1 6362306a36Sopenharmony_ci#define NE2000_IRQ_LEVEL 3 6462306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned char 6562306a36Sopenharmony_ci#endif 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#if defined(CONFIG_M5307C3) 6862306a36Sopenharmony_ci#define NE2000_ADDR 0x40000300 6962306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00010000 7062306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00020000 7162306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 0x1b 7262306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 7362306a36Sopenharmony_ci#endif 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci#if defined(CONFIG_M5272) && defined(CONFIG_NETtel) 7662306a36Sopenharmony_ci#define NE2000_ADDR 0x30600300 7762306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00008000 7862306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00010000 7962306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 67 8062306a36Sopenharmony_ci#undef BSWAP 8162306a36Sopenharmony_ci#define BSWAP(w) (w) 8262306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 8362306a36Sopenharmony_ci#undef RSWAP 8462306a36Sopenharmony_ci#define RSWAP(w) (((w) << 8) | ((w) >> 8)) 8562306a36Sopenharmony_ci#endif 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci#if defined(CONFIG_M5307) && defined(CONFIG_NETtel) 8862306a36Sopenharmony_ci#define NE2000_ADDR0 0x30600300 8962306a36Sopenharmony_ci#define NE2000_ADDR1 0x30800300 9062306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00008000 9162306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00010000 9262306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR0 27 9362306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR1 29 9462306a36Sopenharmony_ci#undef BSWAP 9562306a36Sopenharmony_ci#define BSWAP(w) (w) 9662306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 9762306a36Sopenharmony_ci#undef RSWAP 9862306a36Sopenharmony_ci#define RSWAP(w) (((w) << 8) | ((w) >> 8)) 9962306a36Sopenharmony_ci#endif 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci#if defined(CONFIG_M5307) && defined(CONFIG_SECUREEDGEMP3) 10262306a36Sopenharmony_ci#define NE2000_ADDR 0x30600300 10362306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00008000 10462306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00010000 10562306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 27 10662306a36Sopenharmony_ci#undef BSWAP 10762306a36Sopenharmony_ci#define BSWAP(w) (w) 10862306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 10962306a36Sopenharmony_ci#undef RSWAP 11062306a36Sopenharmony_ci#define RSWAP(w) (((w) << 8) | ((w) >> 8)) 11162306a36Sopenharmony_ci#endif 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci#if defined(CONFIG_ARN5307) 11462306a36Sopenharmony_ci#define NE2000_ADDR 0xfe600300 11562306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00010000 11662306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00020000 11762306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 0x1b 11862306a36Sopenharmony_ci#define NE2000_IRQ_PRIORITY 2 11962306a36Sopenharmony_ci#define NE2000_IRQ_LEVEL 3 12062306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 12162306a36Sopenharmony_ci#endif 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#if defined(CONFIG_M5407C3) 12462306a36Sopenharmony_ci#define NE2000_ADDR 0x40000300 12562306a36Sopenharmony_ci#define NE2000_ODDOFFSET 0x00010000 12662306a36Sopenharmony_ci#define NE2000_ADDRSIZE 0x00020000 12762306a36Sopenharmony_ci#define NE2000_IRQ_VECTOR 0x1b 12862306a36Sopenharmony_ci#define NE2000_BYTE volatile unsigned short 12962306a36Sopenharmony_ci#endif 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci/****************************************************************************/ 13262306a36Sopenharmony_ci#endif /* mcf8390_h */ 133