[PATCH] cs89x0: add ixdp2351 support

This patch adds support for the Intel IXDP2351 to the CS89x0 driver.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Deepak Saxena and committed by Linus Torvalds 9c878967 a07f0dbe

+25 -6
+1 -1
drivers/net/Kconfig
··· 1387 1388 config CS89x0 1389 tristate "CS89x0 support" 1390 - depends on NET_PCI && (ISA || ARCH_IXDP2X01 || ARCH_PNX010X) 1391 ---help--- 1392 Support for CS89x0 chipset based Ethernet cards. If you have a 1393 network (Ethernet) card of this type, say Y and read the
··· 1387 1388 config CS89x0 1389 tristate "CS89x0 support" 1390 + depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X) 1391 ---help--- 1392 Support for CS89x0 chipset based Ethernet cards. If you have a 1393 network (Ethernet) card of this type, say Y and read the
+24 -5
drivers/net/cs89x0.c
··· 90 Dmitry Pervushin : dpervushin@ru.mvista.com 91 : PNX010X platform support 92 93 */ 94 95 /* Always include 'config.h' first in case the user wants to turn on ··· 177 static unsigned int netcard_portlist[] __initdata = 178 { 0x0300, 0}; 179 static unsigned int cs8900_irq_map[] = {1,0,0,0}; 180 #elif defined(CONFIG_ARCH_IXDP2X01) 181 #include <asm/irq.h> 182 static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; ··· 348 } 349 #endif 350 351 - #if defined(CONFIG_ARCH_IXDP2X01) 352 static u16 353 readword(unsigned long base_addr, int portno) 354 { ··· 800 } else { 801 i = lp->isa_config & INT_NO_MASK; 802 if (lp->chip_type == CS8900) { 803 - #if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X) 804 i = cs8900_irq_map[0]; 805 #else 806 /* Translate the IRQ using the IRQ mapping table. */ ··· 1032 1033 void __init reset_chip(struct net_device *dev) 1034 { 1035 - #ifndef CONFIG_ARCH_IXDP2X01 1036 struct net_local *lp = netdev_priv(dev); 1037 int ioaddr = dev->base_addr; 1038 #endif ··· 1043 /* wait 30 ms */ 1044 msleep(30); 1045 1046 - #ifndef CONFIG_ARCH_IXDP2X01 1047 if (lp->chip_type != CS8900) { 1048 /* Hardware problem requires PNP registers to be reconfigured after a reset */ 1049 writeword(ioaddr, ADD_PORT, PP_CS8920_ISAINT); ··· 1307 else 1308 #endif 1309 { 1310 - #if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) 1311 if (((1 << dev->irq) & lp->irq_map) == 0) { 1312 printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", 1313 dev->name, dev->irq, lp->irq_map);
··· 90 Dmitry Pervushin : dpervushin@ru.mvista.com 91 : PNX010X platform support 92 93 + Deepak Saxena : dsaxena@plexity.net 94 + : Intel IXDP2351 platform support 95 + 96 */ 97 98 /* Always include 'config.h' first in case the user wants to turn on ··· 174 static unsigned int netcard_portlist[] __initdata = 175 { 0x0300, 0}; 176 static unsigned int cs8900_irq_map[] = {1,0,0,0}; 177 + #elif defined(CONFIG_MACH_IXDP2351) 178 + static unsigned int netcard_portlist[] __initdata = {IXDP2351_VIRT_CS8900_BASE, 0}; 179 + static unsigned int cs8900_irq_map[] = {IRQ_IXDP2351_CS8900, 0, 0, 0}; 180 + #include <asm/irq.h> 181 #elif defined(CONFIG_ARCH_IXDP2X01) 182 #include <asm/irq.h> 183 static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; ··· 341 } 342 #endif 343 344 + #if defined(CONFIG_MACH_IXDP2351) 345 + static u16 346 + readword(unsigned long base_addr, int portno) 347 + { 348 + return __raw_readw(base_addr + (portno << 1)); 349 + } 350 + 351 + static void 352 + writeword(unsigned long base_addr, int portno, u16 value) 353 + { 354 + __raw_writew(value, base_addr + (portno << 1)); 355 + } 356 + #elif defined(CONFIG_ARCH_IXDP2X01) 357 static u16 358 readword(unsigned long base_addr, int portno) 359 { ··· 781 } else { 782 i = lp->isa_config & INT_NO_MASK; 783 if (lp->chip_type == CS8900) { 784 + #if defined(CONFIG_MACH_IXDP2351) || defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X) 785 i = cs8900_irq_map[0]; 786 #else 787 /* Translate the IRQ using the IRQ mapping table. */ ··· 1013 1014 void __init reset_chip(struct net_device *dev) 1015 { 1016 + #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) 1017 struct net_local *lp = netdev_priv(dev); 1018 int ioaddr = dev->base_addr; 1019 #endif ··· 1024 /* wait 30 ms */ 1025 msleep(30); 1026 1027 + #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) 1028 if (lp->chip_type != CS8900) { 1029 /* Hardware problem requires PNP registers to be reconfigured after a reset */ 1030 writeword(ioaddr, ADD_PORT, PP_CS8920_ISAINT); ··· 1288 else 1289 #endif 1290 { 1291 + #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) 1292 if (((1 << dev->irq) & lp->irq_map) == 0) { 1293 printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", 1294 dev->name, dev->irq, lp->irq_map);