aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-03-09 17:04:04 -0500
committerArnd Bergmann <arnd@arndb.de>2018-03-26 09:56:22 -0400
commit8eb97ff5a4ec941da1976a99a74760dd9aea41e2 (patch)
treec6466f753a8bc1f2f6e8d9b5161a61200ebd3a6b
parent768a032d0e73f962ec13cd05b722d9744d2cf903 (diff)
net: 8390: remove m32r specific bits
The m32r architecture is getting removed, so we can kill off the architecture specific hacks in this driver. Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/net/ethernet/8390/Kconfig3
-rw-r--r--drivers/net/ethernet/8390/ne.c23
2 files changed, 3 insertions, 23 deletions
diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig
index 29c3075bfb05..475826f8d6a8 100644
--- a/drivers/net/ethernet/8390/Kconfig
+++ b/drivers/net/ethernet/8390/Kconfig
@@ -87,8 +87,7 @@ config MCF8390
87 87
88config NE2000 88config NE2000
89 tristate "NE2000/NE1000 support" 89 tristate "NE2000/NE1000 support"
90 depends on (ISA || (Q40 && m) || M32R || MACH_TX49XX || \ 90 depends on (ISA || (Q40 && m) || MACH_TX49XX || ATARI_ETHERNEC)
91 ATARI_ETHERNEC)
92 select CRC32 91 select CRC32
93 ---help--- 92 ---help---
94 If you have a network (Ethernet) card of this type, say Y here. 93 If you have a network (Ethernet) card of this type, say Y here.
diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c
index 66f47987e2a2..4e05953c4fbc 100644
--- a/drivers/net/ethernet/8390/ne.c
+++ b/drivers/net/ethernet/8390/ne.c
@@ -99,7 +99,7 @@ MODULE_LICENSE("GPL");
99that the ne2k probe is the last 8390 based probe to take place (as it 99that the ne2k probe is the last 8390 based probe to take place (as it
100is at boot) and so the probe will get confused by any other 8390 cards. 100is at boot) and so the probe will get confused by any other 8390 cards.
101ISA device autoprobes on a running machine are not recommended anyway. */ 101ISA device autoprobes on a running machine are not recommended anyway. */
102#if !defined(MODULE) && (defined(CONFIG_ISA) || defined(CONFIG_M32R)) 102#if !defined(MODULE) && defined(CONFIG_ISA)
103/* Do we need a portlist for the ISA auto-probe ? */ 103/* Do we need a portlist for the ISA auto-probe ? */
104#define NEEDS_PORTLIST 104#define NEEDS_PORTLIST
105#endif 105#endif
@@ -164,12 +164,7 @@ bad_clone_list[] __initdata = {
164#define NESM_START_PG 0x40 /* First page of TX buffer */ 164#define NESM_START_PG 0x40 /* First page of TX buffer */
165#define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */ 165#define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */
166 166
167#if defined(CONFIG_PLAT_MAPPI) 167#if defined(CONFIG_ATARI) /* 8-bit mode on Atari, normal on Q40 */
168# define DCR_VAL 0x4b
169#elif defined(CONFIG_PLAT_OAKS32R) || \
170 defined(CONFIG_MACH_TX49XX)
171# define DCR_VAL 0x48 /* 8-bit mode */
172#elif defined(CONFIG_ATARI) /* 8-bit mode on Atari, normal on Q40 */
173# define DCR_VAL (MACH_IS_ATARI ? 0x48 : 0x49) 168# define DCR_VAL (MACH_IS_ATARI ? 0x48 : 0x49)
174#else 169#else
175# define DCR_VAL 0x49 170# define DCR_VAL 0x49
@@ -422,12 +417,7 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
422 stop_page = NE1SM_STOP_PG; 417 stop_page = NE1SM_STOP_PG;
423 } 418 }
424 419
425#if defined(CONFIG_PLAT_MAPPI) || defined(CONFIG_PLAT_OAKS32R)
426 neX000 = ((SA_prom[14] == 0x57 && SA_prom[15] == 0x57)
427 || (SA_prom[14] == 0x42 && SA_prom[15] == 0x42));
428#else
429 neX000 = (SA_prom[14] == 0x57 && SA_prom[15] == 0x57); 420 neX000 = (SA_prom[14] == 0x57 && SA_prom[15] == 0x57);
430#endif
431 ctron = (SA_prom[0] == 0x00 && SA_prom[1] == 0x00 && SA_prom[2] == 0x1d); 421 ctron = (SA_prom[0] == 0x00 && SA_prom[1] == 0x00 && SA_prom[2] == 0x1d);
432 copam = (SA_prom[14] == 0x49 && SA_prom[15] == 0x00); 422 copam = (SA_prom[14] == 0x49 && SA_prom[15] == 0x00);
433 423
@@ -508,18 +498,9 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
508 498
509 dev->base_addr = ioaddr; 499 dev->base_addr = ioaddr;
510 500
511#ifdef CONFIG_PLAT_MAPPI
512 outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP,
513 ioaddr + E8390_CMD); /* 0x61 */
514 for (i = 0; i < ETH_ALEN; i++) {
515 dev->dev_addr[i] = SA_prom[i]
516 = inb_p(ioaddr + EN1_PHYS_SHIFT(i));
517 }
518#else
519 for (i = 0; i < ETH_ALEN; i++) { 501 for (i = 0; i < ETH_ALEN; i++) {
520 dev->dev_addr[i] = SA_prom[i]; 502 dev->dev_addr[i] = SA_prom[i];
521 } 503 }
522#endif
523 504
524 pr_cont("%pM\n", dev->dev_addr); 505 pr_cont("%pM\n", dev->dev_addr);
525 506