Skip to content

Commit 825a2ff

Browse files
Ben DooksJeff Garzik
authored andcommitted
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 <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
1 parent f49343a commit 825a2ff

File tree

5 files changed

+999
-0
lines changed

5 files changed

+999
-0
lines changed

drivers/net/8390.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ struct ei_device {
7373
u32 *reg_offset; /* Register mapping table */
7474
spinlock_t page_lock; /* Page register locks */
7575
unsigned long priv; /* Private field to store bus IDs etc. */
76+
#ifdef AX88796_PLATFORM
77+
unsigned char rxcr_base; /* default value for RXCR */
78+
#endif
7679
};
7780

7881
/* The maximum number of 8390 interrupt service routines called per IRQ. */
@@ -86,11 +89,19 @@ struct ei_device {
8689
/* Some generic ethernet register configurations. */
8790
#define E8390_TX_IRQ_MASK 0xa /* For register EN0_ISR */
8891
#define E8390_RX_IRQ_MASK 0x5
92+
93+
#ifdef AX88796_PLATFORM
94+
#define E8390_RXCONFIG (ei_status.rxcr_base | 0x04)
95+
#define E8390_RXOFF (ei_status.rxcr_base | 0x20)
96+
#else
8997
#define E8390_RXCONFIG 0x4 /* EN0_RXCR: broadcasts, no multicast,errors */
9098
#define E8390_RXOFF 0x20 /* EN0_RXCR: Accept no packets */
99+
#endif
100+
91101
#define E8390_TXCONFIG 0x00 /* EN0_TXCR: Normal transmit mode */
92102
#define E8390_TXOFF 0x02 /* EN0_TXCR: Transmitter off */
93103

104+
94105
/* Register accessed at EN_CMD, the 8390 base addr. */
95106
#define E8390_STOP 0x01 /* Stop and reset the chip */
96107
#define E8390_START 0x02 /* Start the chip, clear reset */

drivers/net/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ config MACB
197197

198198
source "drivers/net/arm/Kconfig"
199199

200+
config AX88796
201+
tristate "ASIX AX88796 NE2000 clone support"
202+
select CRC32
203+
select MII
204+
help
205+
AX88796 driver, using platform bus to provide
206+
chip detection and resources
207+
200208
config MACE
201209
tristate "MACE (Power Mac ethernet) support"
202210
depends on PPC_PMAC && PPC32

drivers/net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ obj-$(CONFIG_NET_SB1250_MAC) += sb1250-mac.o
107107
obj-$(CONFIG_B44) += b44.o
108108
obj-$(CONFIG_FORCEDETH) += forcedeth.o
109109
obj-$(CONFIG_NE_H8300) += ne-h8300.o
110+
obj-$(CONFIG_AX88796) += ax88796.o
110111

111112
obj-$(CONFIG_TSI108_ETH) += tsi108_eth.o
112113
obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o

0 commit comments

Comments
 (0)