/**************************************************************************
*
* tlan.c -- Etherboot device driver for the Texas Instruments ThunderLAN
* Written 2003-2003 by Timothy Legge <tlegge@rogers.com>
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Portions of this code (almost all) based on:
* tlan.c: Linux ThunderLan Driver:
*
* by James Banks
*
* (C) 1997-1998 Caldera, Inc.
* (C) 1998 James Banks
* (C) 1999-2001 Torben Mathiasen
* (C) 2002 Samuel Chessman
*
* REVISION HISTORY:
* ================
* v1.0 07-08-2003 timlegge Initial not quite working version
*
* Indent Style: indent -kr -i8
***************************************************************************/
/*
#include <linux/netdevice.h>
*/
typedef unsigned char u8;
typedef signed char s8;
typedef unsigned short u16;
typedef signed short s16;
typedef unsigned int u32;
typedef signed int s32;
/*****************************************************************
* TLan Definitions
*
****************************************************************/
#define FALSE 0
#define TLAN_IGNORE 0
/*
#define TLAN_DBG(lvl, format, args...) if (debug&lvl) printf("TLAN: " format, ##args );
*/
/*****************************************************************
* Device Identification Definitions
*
****************************************************************/
#ifndef PCI_DEVICE_ID_OLICOM_OC2183
#endif
#ifndef PCI_DEVICE_ID_OLICOM_OC2325
#endif
#ifndef PCI_DEVICE_ID_OLICOM_OC2326
#endif
typedef struct tlan_adapter_entry {
char *deviceLabel;
#define TLAN_SPEED_DEFAULT 0
#define TLAN_DUPLEX_DEFAULT 0
/*****************************************************************
* EISA Definitions
*
****************************************************************/
/*****************************************************************
*
****************************************************************/
/*****************************************************************
* PHY definitions
*
****************************************************************/
/*****************************************************************
* TLan Driver Timer Definitions
*
****************************************************************/
/*****************************************************************
* TLan Driver Eeprom Definitions
*
****************************************************************/
#define TLAN_EEPROM_ACK 0
/*****************************************************************
* Host Register Offsets and Contents
*
****************************************************************/
/* ThunderLAN Internal Register DIO Offsets */
/* ThunderLAN Interrupt Codes */
/* ThunderLAN MII Registers */
/* National Sem. & Level1 PHY id's */
#define CIRC_INC( a, b ) if ( ++a >= b ) a = 0
/* Routines to access internal registers. */
{
} /* TLan_DioRead8 */
{
} /* TLan_DioRead16 */
{
} /* TLan_DioRead32 */
{
}
{
}
{
}
#if 0
{
}
{
}
{
}
#endif
#ifdef I_LIKE_A_FAST_HASH_FUNCTION
/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */
/* the code below is about seven times as fast as the original code */
{
return (hash & 077);
}
#else /* original code */
{
return ((a && !b) || (!a && b));
}
#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) )
{
hash =
hash |=
hash |=
hash |=
hash |=
hash |=
return hash;
}
#endif /* I_LIKE_A_FAST_HASH_FUNCTION */