AX88796 network driver
Subsystems (2)
PATCH 1/1 AX88796 network driver
Support for the Asix AX88796 network controller, an NE2000 compatible 10/100 ethernet device with internal PHY.
The driver supports PHY settings via either ioctl() or the ethtool driver ops.
Signed-off-by Ben Dooks <[email protected]>
drivers/net/8390.h +11 -0
@@ -73,6 +73,9 @@ struct ei_device {u32 *reg_offset;/* Register mapping table */ spinlock_t page_lock;/* Page register locks */ unsigned long priv;/* Private field to store bus IDs etc. */ +#ifdef AX88796_PLATFORM +unsigned char rxcr_base;/* default value for RXCR */ +#endif };/* The maximum number of 8390 interrupt service routines called per IRQ. */
@@ -86,11 +89,19 @@ struct ei_device {/* Some generic ethernet register configurations. */ #define E8390_TX_IRQ_MASK 0xa/* For register EN0_ISR */ #define E8390_RX_IRQ_MASK 0x5 + +#ifdef AX88796_PLATFORM +#define E8390_RXCONFIG (ei_status.rxcr_base | 0x04) +#define E8390_RXOFF (ei_status.rxcr_base | 0x20) +#else #define E8390_RXCONFIG 0x4/* EN0_RXCR: broadcasts, no multicast,errors */ #define E8390_RXOFF 0x20/* EN0_RXCR: Accept no packets */ +#endif +#define E8390_TXCONFIG 0x00/* EN0_TXCR: Normal transmit mode */ #define E8390_TXOFF 0x02/* EN0_TXCR: Transmitter off */ +/* Register accessed at EN_CMD, the 8390 base addr. */ #define E8390_STOP 0x01/* Stop and reset the chip */ #define E8390_START 0x02/* Start the chip, clear reset */
drivers/net/Makefile +1 -0
@@ -107,6 +107,7 @@ obj-$(CONFIG_NET_SB1250_MAC) += sb1250-m obj-$(CONFIG_B44) += b44.o obj-$(CONFIG_FORCEDETH) += forcedeth.o obj-$(CONFIG_NE_H8300) += ne-h8300.o +obj-$(CONFIG_AX88796) += ax88796.o obj-$(CONFIG_TSI108_ETH) += tsi108_eth.o obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o
drivers/net/ax88796.c new file +952 -0
952 lines not on this page · raw message
drivers/net/Kconfig +8 -0
@@ -201,6 +201,14 @@ config MACB source "drivers/net/arm/Kconfig" +config AX88796 + tristate "ASIX AX88796 NE2000 clone support" + select CRC32 + select MII + help + AX88796 driver, using platform bus to provide + chip detection and resources + config MACE tristate "MACE (Power Mac ethernet) support" depends on NET_ETHERNET && PPC_PMAC && PPC32
include/net/ax88796.h new file +27 -0
@@ -0,0 +1,27 @@ +/* include/net/ax88796.h +* +* Copyright 2005 Simtec Electronics +* Ben Dooks <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +*/ + +#ifndef __NET_AX88796_PLAT_H +#define __NET_AX88796_PLAT_H + +#define AXFLG_HAS_EEPROM (1<<0) +#define AXFLG_MAC_FROMDEV (1<<1)/* device already has MAC */ + +struct ax_plat_data { +unsigned int flags; +unsigned char wordlength;/* 1 or 2 */ +unsigned char dcr_val;/* default value for DCR */ +unsigned char rcr_val;/* default value for RCR */ +unsigned char gpoc_val;/* default value for GPOC */ +u32 *reg_offsets;/* register offsets */ +}; + +#endif /* __NET_AX88796_PLAT_H */
Jeff Garzik
AppliedQuoted 8 lines · Ben Dooks
Support for the Asix AX88796 network controller, an NE2000 compatible 10/100 ethernet device with internal PHY.
The driver supports PHY settings via either
ioctl()or the ethtool driver ops.Signed-off-by Ben Dooks <[email protected]>
applied