add support for PC-9800 architecture (network device)
PATCH 12/23 add support for PC-9800 architecture (network device)
This is a part 12/23 of patchset for add support NEC PC-9800 architecture, against 2.5.44.
Summary:
network card modules
- add support for PC-9800 legacy bus network cards.
diffstat:
drivers/net/3c509.c | 33 +++ drivers/net/8390.h | 3 drivers/net/Config.in | 24 ++ drivers/net/Makefile | 4 drivers/net/Makefile.lib | 1 drivers/net/Space.c | 2 drivers/net/at1700.c | 115 +++++++++- drivers/net/ne.c | 517 +++++++++++++++++++++++++++++++++++++++++++++-- drivers/net/ne2k_cbus.h | 467 ++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 1137 insertions(+), 29 deletions(-)
patch:
drivers/net/3c509.c +33 -0
@@ -52,6 +52,10 @@v1.19 16Oct2002 Zwane Mwaikambo <[email protected]> - Additional ethtool features */ +/* +FIXES for PC-9800: +Shu Iwanaga: 3c569B(PC-9801 C-bus) support +*/ #define DRV_NAME "3c509"#define DRV_VERSION "1.19"
@@ -168,7 +172,11 @@struct pm_dev *pmdev;#endif }; +#ifdef CONFIG_PC9800 +static int id_port__initdata =0x71d0 ; +#else static int id_port__initdata =0x110 ;/* Start with 0x110 to avoid new sound cards.*/ +#endif static struct net_device *el3_root_dev;static ushort id_read_eeprom (int index);
@@ -389,6 +397,7 @@ no_pnp:#endif /* __ISAPNP__ */ +#ifndef CONFIG_PC9800 /* Error for NEC C-bus */ /* Select an open I/O location at 0x1*0 to do contention select. */ for ( ; id_port <0x200 ; id_port +=0x10 ) {if (check_region (id_port,1 ))
@@ -403,6 +412,7 @@printk (" WARNING: No I/O port available for 3c509 activation.\n" ); return -ENODEV; } +#endif /* CONFIG_PC9800 */ /* Next check for all ISA bus boards by sending the ID sequence to the ID_PORT. We find cards past the first by setting the 'current_tag' on cards as they are found. Cards with their tag set will not
@@ -458,7 +468,11 @@ {unsigned int iobase =id_read_eeprom (8 ); if_port = iobase >>14 ; +#ifndef CONFIG_PC9800 ioaddr =0x200 + ((iobase &0x1f ) <<4 ); +#else + ioaddr =0x40d0 + ((iobase &0x1f ) <<8 ); +#endif } irq =id_read_eeprom (9 ) >>12 ;
@@ -482,7 +496,15 @@outb (0xd0 + ++current_tag, id_port);/* Activate the adaptor at the EEPROM location. */ +#ifndef CONFIG_PC9800 outb ((ioaddr >>4 ) |0xe0 , id_port); +#else +outb ((ioaddr >>8 ) |0xe0 , id_port); +if (irq ==7 ) + irq =6 ; +else if (irq ==15 ) + irq =13 ; +#endif EL3WINDOW (0 );if (inw (ioaddr) !=0x6d50 ) {
@@ -1253,7 +1275,18 @@outw (0x0001 , ioaddr +4 );/* Set the IRQ line. */ +#ifndef CONFIG_PC9800 outw ((dev->irq <<12 ) |0x0f00 , ioaddr +WN0_IRQ ); +#else + { +int irq = dev->irq; +if (irq ==6 ) + irq =7 ; +else if (irq ==13 ) + irq =15 ; +outw ((irq <<12 ) |0x0f00 , ioaddr +WN0_IRQ ); + } +#endif /* Set the station address in window 2 each time opened. */ EL3WINDOW (2 );
drivers/net/8390.h +2 -1
@@ -123,7 +123,8 @@#define inb_p (port) in_8(port)#define outb_p (val,port) out_8(port,val) -#elif defined(CONFIG_ARM_ETHERH ) || defined(CONFIG_ARM_ETHERH_MODULE ) +#elif defined(CONFIG_ARM_ETHERH ) || defined(CONFIG_ARM_ETHERH_MODULE ) || \ + defined(CONFIG_NET_CBUS )#define EI_SHIFT (x) (ei_local->reg_offset[x])#else #define EI_SHIFT (x) (x)
drivers/net/Config.in +24 -0
@@ -112,7 +112,11 @@ source drivers/net/tulip/Config.in fi if [ "$CONFIG_ISA" = "y" -o "$CONFIG_MCA" = "y" ]; then + if [ "$CONFIG_PC9800" != "y" ]; then dep_tristate ' AT1700/1720 support (EXPERIMENTAL)' CONFIG_AT1700 $CONFIG_EXPERIMENTAL + else + dep_tristate ' Allied Telesis RE1000Plus support (EXPERIMENTAL)' CONFIG_AT1700 $CONFIG_EXPERIMENTAL + fi fi if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_MCA" = "y" ]; then tristate ' DEPCA, DE10x, DE200, DE201, DE202, DE422 support' CONFIG_DEPCA
@@ -120,6 +124,7 @@ if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_PCI" = "y" ]; then tristate ' HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100 fi + if [ "$CONFIG_PC9800" != "y" ]; then dep_bool ' Other ISA cards' CONFIG_NET_ISA $CONFIG_ISA if [ "$CONFIG_NET_ISA" = "y" ]; then tristate ' Cabletron E21xx support' CONFIG_E2100
@@ -146,6 +151,25 @@ tristate ' NE/2 (ne2000 MCA version) support' CONFIG_NE2_MCA tristate ' IBM LAN Adapter/A support' CONFIG_IBMLANA fi + else # CONFIG_PC9800 = y + bool ' NEC PC-9800 C-bus cards' CONFIG_NET_CBUS + if [ "$CONFIG_NET_CBUS" = "y" ]; then + tristate ' Most NE2000-based Ethernet support' CONFIG_NE2K_CBUS + if [ "$CONFIG_NE2K_CBUS" != "n" ]; then + bool ' Melco EGY-98 support' CONFIG_NE2K_CBUS_EGY98 + bool ' Melco LGY-98 support' CONFIG_NE2K_CBUS_LGY98 + bool ' ICM IF-27xxET support' CONFIG_NE2K_CBUS_ICM + bool ' I-O DATA LA-98 support (NOT TESTED!)' CONFIG_NE2K_CBUS_IOLA98 + bool ' Contec C-NET(98)E/L support (NOT TESTED!)' CONFIG_NE2K_CBUS_CNET98EL + if [ "$CONFIG_NE2K_CBUS_CNET98EL" != "n" ]; then + hex ' C-NET(98)E/L I/O base address (aaed or 55ed)' CONFIG_NE2K_CBUS_CNET98EL_IO_BASE aaed + fi + bool ' Allied Telesis LA-98 Support (NOT TESTED!)' CONFIG_NE2K_CBUS_ATLA98 + bool ' ELECOM Laneed LD-BDN[123]A Support (NOT TESTED!)' CONFIG_NE2K_CBUS_BDN + bool ' NEC PC-9801-108 Support (NOT TESTED!)' CONFIG_NE2K_CBUS_NEC108 + fi + fi + fi # CONFIG_PC9800 if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_PCI" = "y" ]; then bool ' EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI else
drivers/net/Makefile +4 -0
@@ -87,7 +87,11 @@ obj-$(CONFIG_ARM_ETHERH) += 8390.o obj-$(CONFIG_WD80x3) += wd.o 8390.o obj-$(CONFIG_EL2) += 3c503.o 8390.o +ifneq ($(CONFIG_PC9800),y) obj-$(CONFIG_NE2000) += ne.o 8390.o +else +obj-$(CONFIG_NE2K_CBUS) += ne.o 8390.o +endif obj-$(CONFIG_NE2_MCA) += ne2.o 8390.o obj-$(CONFIG_HPLAN) += hp.o 8390.o obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o
drivers/net/Makefile.lib +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_MACMACE) += crc32.o obj-$(CONFIG_MIPS_AU1000_ENET) += crc32.o obj-$(CONFIG_NATSEMI) += crc32.o +obj-$(CONFIG_NE2K_CBUS) += crc32.o obj-$(CONFIG_PCMCIA_FMVJ18X) += crc32.o obj-$(CONFIG_PCMCIA_SMC91C92) += crc32.o obj-$(CONFIG_PCMCIA_XIRTULIP) += crc32.o
drivers/net/Space.c +1 -1
@@ -243,7 +243,7 @@ #ifdef CONFIG_E2100 /* Cabletron E21xx series. */ {e2100_probe, 0}, #endif -#ifdef CONFIG_NE2000 /* ISA (use ne2k-pci for PCI cards) */ +#if defined(CONFIG_NE2000) || defined(CONFIG_NE2K_CBUS) /* ISA & PC-9800 CBUS (use ne2k-pci for PCI cards) */ {ne_probe, 0}, #endif #ifdef CONFIG_LANCE /* ISA/VLB (use pcnet32 for PCI cards) */
drivers/net/at1700.c +102 -13
249 lines not on this page · raw message
drivers/net/ne.c +503 -14
779 lines not on this page · raw message
drivers/net/ne2k_cbus.h +467 -0
467 lines not on this page · raw message