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