aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/i825xx
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-01-08 22:00:39 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-01-22 10:32:35 -0500
commit6e07ba3e6ad939c89befc2588e72bf37038f7f53 (patch)
tree52958ed7a5b687b6d3855cf024cb27cece41cabd /drivers/net/ethernet/i825xx
parent63b203b43baeb1ba5fab0b7f3611e0f0a2a4a7ab (diff)
drivers/net: delete 486 Apricot support
The Apricot was a 486 PC with 4MB RAM, and an on-board ethernet via an intel i82596 hard-wired to i/o 0x300. Those who were using linux in the 1990's will recall that the i82596 driver was not one of the more stable or widely used drivers of its day. Combine that with the extremely limited resources of the platform, and it is truly time to expire the support for this thing. There are some old m68k targets who were also using this chip, so rather than poll the m68k user base, we simply cut out the x86/Apricot support here in this commit. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'drivers/net/ethernet/i825xx')
-rw-r--r--drivers/net/ethernet/i825xx/82596.c94
-rw-r--r--drivers/net/ethernet/i825xx/Kconfig11
-rw-r--r--drivers/net/ethernet/i825xx/Makefile1
3 files changed, 8 insertions, 98 deletions
diff --git a/drivers/net/ethernet/i825xx/82596.c b/drivers/net/ethernet/i825xx/82596.c
index 6aa927af382c..1c54e229e3cc 100644
--- a/drivers/net/ethernet/i825xx/82596.c
+++ b/drivers/net/ethernet/i825xx/82596.c
@@ -95,9 +95,6 @@ static char version[] __initdata =
95#if defined(CONFIG_BVME6000_NET) || defined(CONFIG_BVME6000_NET_MODULE) 95#if defined(CONFIG_BVME6000_NET) || defined(CONFIG_BVME6000_NET_MODULE)
96#define ENABLE_BVME6000_NET 96#define ENABLE_BVME6000_NET
97#endif 97#endif
98#if defined(CONFIG_APRICOT) || defined(CONFIG_APRICOT_MODULE)
99#define ENABLE_APRICOT
100#endif
101 98
102#ifdef ENABLE_MVME16x_NET 99#ifdef ENABLE_MVME16x_NET
103#include <asm/mvme16xhw.h> 100#include <asm/mvme16xhw.h>
@@ -120,8 +117,15 @@ static char version[] __initdata =
120#define WSWAPtbd(x) ((struct i596_tbd *) (((u32)(x)<<16) | ((((u32)(x)))>>16))) 117#define WSWAPtbd(x) ((struct i596_tbd *) (((u32)(x)<<16) | ((((u32)(x)))>>16)))
121#define WSWAPchar(x) ((char *) (((u32)(x)<<16) | ((((u32)(x)))>>16))) 118#define WSWAPchar(x) ((char *) (((u32)(x)<<16) | ((((u32)(x)))>>16)))
122#define ISCP_BUSY 0x00010000 119#define ISCP_BUSY 0x00010000
123#define MACH_IS_APRICOT 0
124#else 120#else
121#error 82596.c: unknown architecture
122#endif
123
124/*
125 * These were the intel versions, left here for reference. There
126 * are currently no x86 users of this legacy i82596 chip.
127 */
128#if 0
125#define WSWAPrfd(x) ((struct i596_rfd *)((long)x)) 129#define WSWAPrfd(x) ((struct i596_rfd *)((long)x))
126#define WSWAPrbd(x) ((struct i596_rbd *)((long)x)) 130#define WSWAPrbd(x) ((struct i596_rbd *)((long)x))
127#define WSWAPiscp(x) ((struct i596_iscp *)((long)x)) 131#define WSWAPiscp(x) ((struct i596_iscp *)((long)x))
@@ -130,7 +134,6 @@ static char version[] __initdata =
130#define WSWAPtbd(x) ((struct i596_tbd *)((long)x)) 134#define WSWAPtbd(x) ((struct i596_tbd *)((long)x))
131#define WSWAPchar(x) ((char *)((long)x)) 135#define WSWAPchar(x) ((char *)((long)x))
132#define ISCP_BUSY 0x0001 136#define ISCP_BUSY 0x0001
133#define MACH_IS_APRICOT 1
134#endif 137#endif
135 138
136/* 139/*
@@ -383,11 +386,6 @@ static inline void CA(struct net_device *dev)
383 i = *(volatile u32 *) (dev->base_addr); 386 i = *(volatile u32 *) (dev->base_addr);
384 } 387 }
385#endif 388#endif
386#ifdef ENABLE_APRICOT
387 if (MACH_IS_APRICOT) {
388 outw(0, (short) (dev->base_addr) + 4);
389 }
390#endif
391} 389}
392 390
393 391
@@ -617,9 +615,6 @@ static void rebuild_rx_bufs(struct net_device *dev)
617static int init_i596_mem(struct net_device *dev) 615static int init_i596_mem(struct net_device *dev)
618{ 616{
619 struct i596_private *lp = dev->ml_priv; 617 struct i596_private *lp = dev->ml_priv;
620#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET) || defined(ENABLE_APRICOT)
621 short ioaddr = dev->base_addr;
622#endif
623 unsigned long flags; 618 unsigned long flags;
624 619
625 MPU_PORT(dev, PORT_RESET, NULL); 620 MPU_PORT(dev, PORT_RESET, NULL);
@@ -653,18 +648,6 @@ static int init_i596_mem(struct net_device *dev)
653 648
654 MPU_PORT(dev, PORT_ALTSCP, (void *)virt_to_bus((void *)&lp->scp)); 649 MPU_PORT(dev, PORT_ALTSCP, (void *)virt_to_bus((void *)&lp->scp));
655 650
656#elif defined(ENABLE_APRICOT)
657
658 {
659 u32 scp = virt_to_bus(&lp->scp);
660
661 /* change the scp address */
662 outw(0, ioaddr);
663 outw(0, ioaddr);
664 outb(4, ioaddr + 0xf);
665 outw(scp | 2, ioaddr);
666 outw(scp >> 16, ioaddr);
667 }
668#endif 651#endif
669 652
670 lp->last_cmd = jiffies; 653 lp->last_cmd = jiffies;
@@ -677,10 +660,6 @@ static int init_i596_mem(struct net_device *dev)
677 if (MACH_IS_BVME6000) 660 if (MACH_IS_BVME6000)
678 lp->scp.sysbus = 0x0000004c; 661 lp->scp.sysbus = 0x0000004c;
679#endif 662#endif
680#ifdef ENABLE_APRICOT
681 if (MACH_IS_APRICOT)
682 lp->scp.sysbus = 0x00440000;
683#endif
684 663
685 lp->scp.iscp = WSWAPiscp(virt_to_bus((void *)&lp->iscp)); 664 lp->scp.iscp = WSWAPiscp(virt_to_bus((void *)&lp->iscp));
686 lp->iscp.scb = WSWAPscb(virt_to_bus((void *)&lp->scb)); 665 lp->iscp.scb = WSWAPscb(virt_to_bus((void *)&lp->scb));
@@ -698,10 +677,6 @@ static int init_i596_mem(struct net_device *dev)
698 677
699 DEB(DEB_INIT,printk(KERN_DEBUG "%s: starting i82596.\n", dev->name)); 678 DEB(DEB_INIT,printk(KERN_DEBUG "%s: starting i82596.\n", dev->name));
700 679
701#if defined(ENABLE_APRICOT)
702 (void) inb(ioaddr + 0x10);
703 outb(4, ioaddr + 0xf);
704#endif
705 CA(dev); 680 CA(dev);
706 681
707 if (wait_istat(dev,lp,1000,"initialization timed out")) 682 if (wait_istat(dev,lp,1000,"initialization timed out"))
@@ -1203,43 +1178,6 @@ struct net_device * __init i82596_probe(int unit)
1203 goto found; 1178 goto found;
1204 } 1179 }
1205#endif 1180#endif
1206#ifdef ENABLE_APRICOT
1207 {
1208 int checksum = 0;
1209 int ioaddr = 0x300;
1210
1211 /* this is easy the ethernet interface can only be at 0x300 */
1212 /* first check nothing is already registered here */
1213
1214 if (!request_region(ioaddr, I596_TOTAL_SIZE, DRV_NAME)) {
1215 printk(KERN_ERR "82596: IO address 0x%04x in use\n", ioaddr);
1216 err = -EBUSY;
1217 goto out;
1218 }
1219
1220 dev->base_addr = ioaddr;
1221
1222 for (i = 0; i < 8; i++) {
1223 eth_addr[i] = inb(ioaddr + 8 + i);
1224 checksum += eth_addr[i];
1225 }
1226
1227 /* checksum is a multiple of 0x100, got this wrong first time
1228 some machines have 0x100, some 0x200. The DOS driver doesn't
1229 even bother with the checksum.
1230 Some other boards trip the checksum.. but then appear as
1231 ether address 0. Trap these - AC */
1232
1233 if ((checksum % 0x100) ||
1234 (memcmp(eth_addr, "\x00\x00\x49", 3) != 0)) {
1235 err = -ENODEV;
1236 goto out1;
1237 }
1238
1239 dev->irq = 10;
1240 goto found;
1241 }
1242#endif
1243 err = -ENODEV; 1181 err = -ENODEV;
1244 goto out; 1182 goto out;
1245 1183
@@ -1296,9 +1234,6 @@ out2:
1296#endif 1234#endif
1297 free_page ((u32)(dev->mem_start)); 1235 free_page ((u32)(dev->mem_start));
1298out1: 1236out1:
1299#ifdef ENABLE_APRICOT
1300 release_region(dev->base_addr, I596_TOTAL_SIZE);
1301#endif
1302out: 1237out:
1303 free_netdev(dev); 1238 free_netdev(dev);
1304 return ERR_PTR(err); 1239 return ERR_PTR(err);
@@ -1455,10 +1390,6 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id)
1455 *ethirq = 3; 1390 *ethirq = 3;
1456 } 1391 }
1457#endif 1392#endif
1458#ifdef ENABLE_APRICOT
1459 (void) inb(ioaddr + 0x10);
1460 outb(4, ioaddr + 0xf);
1461#endif
1462 CA(dev); 1393 CA(dev);
1463 1394
1464 DEB(DEB_INTS,printk(KERN_DEBUG "%s: exiting interrupt.\n", dev->name)); 1395 DEB(DEB_INTS,printk(KERN_DEBUG "%s: exiting interrupt.\n", dev->name));
@@ -1589,11 +1520,6 @@ static void set_multicast_list(struct net_device *dev)
1589#ifdef MODULE 1520#ifdef MODULE
1590static struct net_device *dev_82596; 1521static struct net_device *dev_82596;
1591 1522
1592#ifdef ENABLE_APRICOT
1593module_param(irq, int, 0);
1594MODULE_PARM_DESC(irq, "Apricot IRQ number");
1595#endif
1596
1597static int debug = -1; 1523static int debug = -1;
1598module_param(debug, int, 0); 1524module_param(debug, int, 0);
1599MODULE_PARM_DESC(debug, "i82596 debug mask"); 1525MODULE_PARM_DESC(debug, "i82596 debug mask");
@@ -1620,10 +1546,6 @@ void __exit cleanup_module(void)
1620 IOMAP_FULL_CACHING); 1546 IOMAP_FULL_CACHING);
1621#endif 1547#endif
1622 free_page ((u32)(dev_82596->mem_start)); 1548 free_page ((u32)(dev_82596->mem_start));
1623#ifdef ENABLE_APRICOT
1624 /* If we don't do this, we can't re-insmod it later. */
1625 release_region(dev_82596->base_addr, I596_TOTAL_SIZE);
1626#endif
1627 free_netdev(dev_82596); 1549 free_netdev(dev_82596);
1628} 1550}
1629 1551
diff --git a/drivers/net/ethernet/i825xx/Kconfig b/drivers/net/ethernet/i825xx/Kconfig
index 70f8c2d221b6..c39698ae9801 100644
--- a/drivers/net/ethernet/i825xx/Kconfig
+++ b/drivers/net/ethernet/i825xx/Kconfig
@@ -50,17 +50,6 @@ config ARM_ETHER1
50 If you have an Acorn system with one of these (AKA25) network cards, 50 If you have an Acorn system with one of these (AKA25) network cards,
51 you should say Y to this option if you wish to use it with Linux. 51 you should say Y to this option if you wish to use it with Linux.
52 52
53config APRICOT
54 tristate "Apricot Xen-II on board Ethernet"
55 depends on ISA
56 ---help---
57 If you have a network (Ethernet) controller of this type, say Y and
58 read the Ethernet-HOWTO, available from
59 <http://www.tldp.org/docs.html#howto>.
60
61 To compile this driver as a module, choose M here. The module
62 will be called apricot.
63
64config BVME6000_NET 53config BVME6000_NET
65 tristate "BVME6000 Ethernet support" 54 tristate "BVME6000 Ethernet support"
66 depends on BVME6000 55 depends on BVME6000
diff --git a/drivers/net/ethernet/i825xx/Makefile b/drivers/net/ethernet/i825xx/Makefile
index 6adff85e8ecc..e5ab9d04a180 100644
--- a/drivers/net/ethernet/i825xx/Makefile
+++ b/drivers/net/ethernet/i825xx/Makefile
@@ -11,7 +11,6 @@ obj-$(CONFIG_LP486E) += lp486e.o
11obj-$(CONFIG_NI52) += ni52.o 11obj-$(CONFIG_NI52) += ni52.o
12obj-$(CONFIG_SUN3_82586) += sun3_82586.o 12obj-$(CONFIG_SUN3_82586) += sun3_82586.o
13obj-$(CONFIG_ZNET) += znet.o 13obj-$(CONFIG_ZNET) += znet.o
14obj-$(CONFIG_APRICOT) += 82596.o
15obj-$(CONFIG_LASI_82596) += lasi_82596.o 14obj-$(CONFIG_LASI_82596) += lasi_82596.o
16obj-$(CONFIG_SNI_82596) += sni_82596.o 15obj-$(CONFIG_SNI_82596) += sni_82596.o
17obj-$(CONFIG_MVME16x_NET) += 82596.o 16obj-$(CONFIG_MVME16x_NET) += 82596.o