From: Pete P. <pp...@us...> - 2002-09-26 05:39:44
|
Update of /cvsroot/linux-mips/linux/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv1799/drivers/net Modified Files: Config.in Makefile au1000_eth.c au1000_eth.h Log Message: Split up the Pb board and Au CPU dependencies properly. Index: Config.in =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/net/Config.in,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Config.in 29 Apr 2002 23:05:11 -0000 1.21 +++ Config.in 26 Sep 2002 05:39:39 -0000 1.22 @@ -59,8 +59,8 @@ if [ "$CONFIG_MIPS_GT96100" = "y" ]; then bool ' MIPS GT96100 Ethernet support' CONFIG_MIPS_GT96100ETH fi - if [ "$CONFIG_MIPS_AU1000" = "y" ]; then - bool ' MIPS AU1000 Ethernet support' CONFIG_MIPS_AU1000_ENET + if [ "$CONFIG_CPU_AU1X00" = "y" ]; then + bool ' MIPS Au1x00 Ethernet support' CONFIG_MIPS_AU1X00_ENET fi if [ "$CONFIG_MIPS_RC32355" = "y" ]; then bool ' IDT RC32355 Ethernet support' CONFIG_MIPS_RC32355_ETH Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/net/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile 29 Apr 2002 23:05:11 -0000 1.12 +++ Makefile 26 Sep 2002 05:39:40 -0000 1.13 @@ -198,7 +198,7 @@ obj-$(CONFIG_EQUALIZER) += eql.o obj-$(CONFIG_MIPS_JAZZ_SONIC) += jazzsonic.o obj-$(CONFIG_MIPS_GT96100ETH) += gt96100eth.o -obj-$(CONFIG_MIPS_AU1000_ENET) += au1000_eth.o +obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o obj-$(CONFIG_MIPS_RC32355_ETH) += banyan.o obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o obj-$(CONFIG_BAGETLANCE) += bagetlance.o Index: au1000_eth.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/net/au1000_eth.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- au1000_eth.c 19 Aug 2002 19:07:27 -0000 1.12 +++ au1000_eth.c 26 Sep 2002 05:39:40 -0000 1.13 @@ -1,6 +1,6 @@ /* * - * Alchemy Semi Au1000 ethernet driver + * Alchemy Au1x00 ethernet driver * * Copyright 2001 MontaVista Software Inc. * Author: MontaVista Software, Inc. @@ -111,21 +111,23 @@ /* * Base address and interupt of the Au1xxx ethernet macs */ -static struct { +static struct au1if { unsigned int port; int irq; -} au1000_iflist[NUM_INTERFACES] = { +} au1x00_iflist[] = { +#if defined(CONFIG_CPU_AU1000) {AU1000_ETH0_BASE, AU1000_ETH0_IRQ}, {AU1000_ETH1_BASE, AU1000_ETH1_IRQ} - }, - au1500_iflist[NUM_INTERFACES] = { +#elif defined(CONFIG_CPU_AU1500) {AU1500_ETH0_BASE, AU1000_ETH0_IRQ}, {AU1500_ETH1_BASE, AU1000_ETH1_IRQ} - }, - au1100_iflist[NUM_INTERFACES] = { +#elif defined(CONFIG_CPU_AU1100) {AU1000_ETH0_BASE, AU1000_ETH0_IRQ}, - {NULL, NULL} +#else +#error "Unsupported Au1x00 CPU" +#endif }; +#define NUM_INTERFACES (sizeof(au1x00_iflist) / sizeof(struct au1if)) static char version[] __devinitdata = "au1000eth.c:1.0 pp...@mv...\n"; @@ -630,30 +632,14 @@ static int __init au1000_init_module(void) { int i; - int prid; int base_addr, irq; - prid = read_32bit_cp0_register(CP0_PRID); for (i=0; i<NUM_INTERFACES; i++) { - if ( (prid & 0xffff0000) == 0x00030000 ) { - base_addr = au1000_iflist[i].port; - irq = au1000_iflist[i].irq; - } else if ( (prid & 0xffff0000) == 0x01030000 ) { - base_addr = au1500_iflist[i].port; - irq = au1500_iflist[i].irq; - } else if ( (prid & 0xffff0000) == 0x02030000 ) { - base_addr = au1100_iflist[i].port; - irq = au1100_iflist[i].irq; - } else { - printk(KERN_ERR "au1000 eth: unknown Processor ID\n"); + base_addr = au1x00_iflist[i].port; + irq = au1x00_iflist[i].irq; + if (au1000_probe1(NULL, base_addr, irq, i) != 0) { return -ENODEV; } - // check for valid entries, au1100 only has one entry - if (base_addr && irq) { - if (au1000_probe1(NULL, base_addr, irq, i) != 0) { - return -ENODEV; - } - } } return 0; } @@ -668,7 +654,7 @@ char *pmac, *argptr; char ethaddr[6]; - if (!request_region(ioaddr, MAC_IOSIZE, "Au1000 ENET")) { + if (!request_region(ioaddr, MAC_IOSIZE, "Au1x00 ENET")) { return -ENODEV; } Index: au1000_eth.h =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/net/au1000_eth.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- au1000_eth.h 25 Sep 2002 07:38:59 -0000 1.6 +++ au1000_eth.h 26 Sep 2002 05:39:40 -0000 1.7 @@ -1,6 +1,6 @@ /* * - * Alchemy Semi Au1000 ethernet driver include file + * Alchemy Au1x00 ethernet driver include file * * Author: Pete Popov <pp...@mv...> * @@ -27,10 +27,9 @@ */ -#define NUM_INTERFACES 2 #define MAC_IOSIZE 0x10000 -#define NUM_RX_DMA 4 /* Au1000 has 4 rx hardware descriptors */ -#define NUM_TX_DMA 4 /* Au1000 has 4 tx hardware descriptors */ +#define NUM_RX_DMA 4 /* Au1x00 has 4 rx hardware descriptors */ +#define NUM_TX_DMA 4 /* Au1x00 has 4 tx hardware descriptors */ #define NUM_RX_BUFFS 4 #define NUM_TX_BUFFS 4 |