aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd/depca.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2012-05-16 19:48:42 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-05-17 16:37:41 -0400
commita5e371f61ad33c07b28e7c9b60c78d71fdd34e2a (patch)
tree8306d4f347a91d39f01a87d5c44d8c3b1c10bc69 /drivers/net/ethernet/amd/depca.c
parentbc6a4744b827c5a78ca591acca81809bddb8b2db (diff)
drivers/net: delete all code/drivers depending on CONFIG_MCA
The support for CONFIG_MCA is being removed, since the 20 year old hardware simply isn't capable of meeting today's software demands on CPU and memory resources. This commit removes any MCA specific net drivers, and removes any MCA specific probe/support code from drivers that were doing a dual ISA/MCA role. Cc: "David S. Miller" <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: netdev@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'drivers/net/ethernet/amd/depca.c')
-rw-r--r--drivers/net/ethernet/amd/depca.c210
1 files changed, 4 insertions, 206 deletions
diff --git a/drivers/net/ethernet/amd/depca.c b/drivers/net/ethernet/amd/depca.c
index 7f7b99a5f024..c771de71612a 100644
--- a/drivers/net/ethernet/amd/depca.c
+++ b/drivers/net/ethernet/amd/depca.c
@@ -155,23 +155,10 @@
155 2 depca's in a PC). 155 2 depca's in a PC).
156 156
157 ************************************************************************ 157 ************************************************************************
158 Support for MCA EtherWORKS cards added 11-3-98. 158 Support for MCA EtherWORKS cards added 11-3-98. (MCA since deleted)
159 Verified to work with up to 2 DE212 cards in a system (although not 159 Verified to work with up to 2 DE212 cards in a system (although not
160 fully stress-tested). 160 fully stress-tested).
161 161
162 Currently known bugs/limitations:
163
164 Note: with the MCA stuff as a module, it trusts the MCA configuration,
165 not the command line for IRQ and memory address. You can
166 specify them if you want, but it will throw your values out.
167 You still have to pass the IO address it was configured as
168 though.
169
170 ************************************************************************
171 TO DO:
172 ------
173
174
175 Revision History 162 Revision History
176 ---------------- 163 ----------------
177 164
@@ -261,10 +248,6 @@
261#include <asm/io.h> 248#include <asm/io.h>
262#include <asm/dma.h> 249#include <asm/dma.h>
263 250
264#ifdef CONFIG_MCA
265#include <linux/mca.h>
266#endif
267
268#ifdef CONFIG_EISA 251#ifdef CONFIG_EISA
269#include <linux/eisa.h> 252#include <linux/eisa.h>
270#endif 253#endif
@@ -360,44 +343,6 @@ static struct eisa_driver depca_eisa_driver = {
360}; 343};
361#endif 344#endif
362 345
363#ifdef CONFIG_MCA
364/*
365** Adapter ID for the MCA EtherWORKS DE210/212 adapter
366*/
367#define DE210_ID 0x628d
368#define DE212_ID 0x6def
369
370static short depca_mca_adapter_ids[] = {
371 DE210_ID,
372 DE212_ID,
373 0x0000
374};
375
376static char *depca_mca_adapter_name[] = {
377 "DEC EtherWORKS MC Adapter (DE210)",
378 "DEC EtherWORKS MC Adapter (DE212)",
379 NULL
380};
381
382static enum depca_type depca_mca_adapter_type[] = {
383 de210,
384 de212,
385 0
386};
387
388static int depca_mca_probe (struct device *);
389
390static struct mca_driver depca_mca_driver = {
391 .id_table = depca_mca_adapter_ids,
392 .driver = {
393 .name = depca_string,
394 .bus = &mca_bus_type,
395 .probe = depca_mca_probe,
396 .remove = __devexit_p(depca_device_remove),
397 },
398};
399#endif
400
401static int depca_isa_probe (struct platform_device *); 346static int depca_isa_probe (struct platform_device *);
402 347
403static int __devexit depca_isa_remove(struct platform_device *pdev) 348static int __devexit depca_isa_remove(struct platform_device *pdev)
@@ -464,8 +409,7 @@ struct depca_private {
464 char adapter_name[DEPCA_STRLEN]; /* /proc/ioports string */ 409 char adapter_name[DEPCA_STRLEN]; /* /proc/ioports string */
465 enum depca_type adapter; /* Adapter type */ 410 enum depca_type adapter; /* Adapter type */
466 enum { 411 enum {
467 DEPCA_BUS_MCA = 1, 412 DEPCA_BUS_ISA = 1,
468 DEPCA_BUS_ISA,
469 DEPCA_BUS_EISA, 413 DEPCA_BUS_EISA,
470 } depca_bus; /* type of bus */ 414 } depca_bus; /* type of bus */
471 struct depca_init init_block; /* Shadow Initialization block */ 415 struct depca_init init_block; /* Shadow Initialization block */
@@ -624,12 +568,6 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
624 dev_name(device), depca_signature[lp->adapter], ioaddr); 568 dev_name(device), depca_signature[lp->adapter], ioaddr);
625 569
626 switch (lp->depca_bus) { 570 switch (lp->depca_bus) {
627#ifdef CONFIG_MCA
628 case DEPCA_BUS_MCA:
629 printk(" (MCA slot %d)", to_mca_device(device)->slot + 1);
630 break;
631#endif
632
633#ifdef CONFIG_EISA 571#ifdef CONFIG_EISA
634 case DEPCA_BUS_EISA: 572 case DEPCA_BUS_EISA:
635 printk(" (EISA slot %d)", to_eisa_device(device)->slot); 573 printk(" (EISA slot %d)", to_eisa_device(device)->slot);
@@ -661,10 +599,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
661 if (nicsr & BUF) { 599 if (nicsr & BUF) {
662 nicsr &= ~BS; /* DEPCA RAM in top 32k */ 600 nicsr &= ~BS; /* DEPCA RAM in top 32k */
663 netRAM -= 32; 601 netRAM -= 32;
664 602 mem_start += 0x8000;
665 /* Only EISA/ISA needs start address to be re-computed */
666 if (lp->depca_bus != DEPCA_BUS_MCA)
667 mem_start += 0x8000;
668 } 603 }
669 604
670 if ((mem_len = (NUM_RX_DESC * (sizeof(struct depca_rx_desc) + RX_BUFF_SZ) + NUM_TX_DESC * (sizeof(struct depca_tx_desc) + TX_BUFF_SZ) + sizeof(struct depca_init))) 605 if ((mem_len = (NUM_RX_DESC * (sizeof(struct depca_rx_desc) + RX_BUFF_SZ) + NUM_TX_DESC * (sizeof(struct depca_tx_desc) + TX_BUFF_SZ) + sizeof(struct depca_init)))
@@ -1325,130 +1260,6 @@ static int __init depca_common_init (u_long ioaddr, struct net_device **devp)
1325 return status; 1260 return status;
1326} 1261}
1327 1262
1328#ifdef CONFIG_MCA
1329/*
1330** Microchannel bus I/O device probe
1331*/
1332static int __init depca_mca_probe(struct device *device)
1333{
1334 unsigned char pos[2];
1335 unsigned char where;
1336 unsigned long iobase, mem_start;
1337 int irq, err;
1338 struct mca_device *mdev = to_mca_device (device);
1339 struct net_device *dev;
1340 struct depca_private *lp;
1341
1342 /*
1343 ** Search for the adapter. If an address has been given, search
1344 ** specifically for the card at that address. Otherwise find the
1345 ** first card in the system.
1346 */
1347
1348 pos[0] = mca_device_read_stored_pos(mdev, 2);
1349 pos[1] = mca_device_read_stored_pos(mdev, 3);
1350
1351 /*
1352 ** IO of card is handled by bits 1 and 2 of pos0.
1353 **
1354 ** bit2 bit1 IO
1355 ** 0 0 0x2c00
1356 ** 0 1 0x2c10
1357 ** 1 0 0x2c20
1358 ** 1 1 0x2c30
1359 */
1360 where = (pos[0] & 6) >> 1;
1361 iobase = 0x2c00 + (0x10 * where);
1362
1363 /*
1364 ** Found the adapter we were looking for. Now start setting it up.
1365 **
1366 ** First work on decoding the IRQ. It's stored in the lower 4 bits
1367 ** of pos1. Bits are as follows (from the ADF file):
1368 **
1369 ** Bits
1370 ** 3 2 1 0 IRQ
1371 ** --------------------
1372 ** 0 0 1 0 5
1373 ** 0 0 0 1 9
1374 ** 0 1 0 0 10
1375 ** 1 0 0 0 11
1376 */
1377 where = pos[1] & 0x0f;
1378 switch (where) {
1379 case 1:
1380 irq = 9;
1381 break;
1382 case 2:
1383 irq = 5;
1384 break;
1385 case 4:
1386 irq = 10;
1387 break;
1388 case 8:
1389 irq = 11;
1390 break;
1391 default:
1392 printk("%s: mca_probe IRQ error. You should never get here (%d).\n", mdev->name, where);
1393 return -EINVAL;
1394 }
1395
1396 /*
1397 ** Shared memory address of adapter is stored in bits 3-5 of pos0.
1398 ** They are mapped as follows:
1399 **
1400 ** Bit
1401 ** 5 4 3 Memory Addresses
1402 ** 0 0 0 C0000-CFFFF (64K)
1403 ** 1 0 0 C8000-CFFFF (32K)
1404 ** 0 0 1 D0000-DFFFF (64K)
1405 ** 1 0 1 D8000-DFFFF (32K)
1406 ** 0 1 0 E0000-EFFFF (64K)
1407 ** 1 1 0 E8000-EFFFF (32K)
1408 */
1409 where = (pos[0] & 0x18) >> 3;
1410 mem_start = 0xc0000 + (where * 0x10000);
1411 if (pos[0] & 0x20) {
1412 mem_start += 0x8000;
1413 }
1414
1415 /* claim the slot */
1416 strncpy(mdev->name, depca_mca_adapter_name[mdev->index],
1417 sizeof(mdev->name));
1418 mca_device_set_claim(mdev, 1);
1419
1420 /*
1421 ** Get everything allocated and initialized... (almost just
1422 ** like the ISA and EISA probes)
1423 */
1424 irq = mca_device_transform_irq(mdev, irq);
1425 iobase = mca_device_transform_ioport(mdev, iobase);
1426
1427 if ((err = depca_common_init (iobase, &dev)))
1428 goto out_unclaim;
1429
1430 dev->irq = irq;
1431 dev->base_addr = iobase;
1432 lp = netdev_priv(dev);
1433 lp->depca_bus = DEPCA_BUS_MCA;
1434 lp->adapter = depca_mca_adapter_type[mdev->index];
1435 lp->mem_start = mem_start;
1436
1437 if ((err = depca_hw_init(dev, device)))
1438 goto out_free;
1439
1440 return 0;
1441
1442 out_free:
1443 free_netdev (dev);
1444 release_region (iobase, DEPCA_TOTAL_SIZE);
1445 out_unclaim:
1446 mca_device_set_claim(mdev, 0);
1447
1448 return err;
1449}
1450#endif
1451
1452/* 1263/*
1453** ISA bus I/O device probe 1264** ISA bus I/O device probe
1454*/ 1265*/
@@ -2059,15 +1870,10 @@ static int __init depca_module_init (void)
2059{ 1870{
2060 int err = 0; 1871 int err = 0;
2061 1872
2062#ifdef CONFIG_MCA
2063 err = mca_register_driver(&depca_mca_driver);
2064 if (err)
2065 goto err;
2066#endif
2067#ifdef CONFIG_EISA 1873#ifdef CONFIG_EISA
2068 err = eisa_driver_register(&depca_eisa_driver); 1874 err = eisa_driver_register(&depca_eisa_driver);
2069 if (err) 1875 if (err)
2070 goto err_mca; 1876 goto err_eisa;
2071#endif 1877#endif
2072 err = platform_driver_register(&depca_isa_driver); 1878 err = platform_driver_register(&depca_isa_driver);
2073 if (err) 1879 if (err)
@@ -2079,11 +1885,6 @@ static int __init depca_module_init (void)
2079err_eisa: 1885err_eisa:
2080#ifdef CONFIG_EISA 1886#ifdef CONFIG_EISA
2081 eisa_driver_unregister(&depca_eisa_driver); 1887 eisa_driver_unregister(&depca_eisa_driver);
2082err_mca:
2083#endif
2084#ifdef CONFIG_MCA
2085 mca_unregister_driver(&depca_mca_driver);
2086err:
2087#endif 1888#endif
2088 return err; 1889 return err;
2089} 1890}
@@ -2091,9 +1892,6 @@ err:
2091static void __exit depca_module_exit (void) 1892static void __exit depca_module_exit (void)
2092{ 1893{
2093 int i; 1894 int i;
2094#ifdef CONFIG_MCA
2095 mca_unregister_driver (&depca_mca_driver);
2096#endif
2097#ifdef CONFIG_EISA 1895#ifdef CONFIG_EISA
2098 eisa_driver_unregister (&depca_eisa_driver); 1896 eisa_driver_unregister (&depca_eisa_driver);
2099#endif 1897#endif