From: Deepak Saxena <[EMAIL PROTECTED]> This patch adds support for the Intel IXDP2351 to the CS89x0 driver.
Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> diff -urN linux-2.6.15-git8.orig/drivers/net/cs89x0.c linux-2.6.15-git8/drivers/net/cs89x0.c --- linux-2.6.15-git8.orig/drivers/net/cs89x0.c 2006-01-13 02:55:36.000000000 +0100 +++ linux-2.6.15-git8/drivers/net/cs89x0.c 2006-01-13 02:56:39.000000000 +0100 @@ -90,6 +90,9 @@ Dmitry Pervushin : [EMAIL PROTECTED] : PNX010X platform support + Deepak Saxena : [EMAIL PROTECTED] + : Intel IXDP2351 platform support + */ /* Always include 'config.h' first in case the user wants to turn on @@ -174,6 +177,10 @@ static unsigned int netcard_portlist[] __initdata = { 0x0300, 0}; static unsigned int cs8900_irq_map[] = {1,0,0,0}; +#elif defined(CONFIG_MACH_IXDP2351) +static unsigned int netcard_portlist[] __initdata = {IXDP2351_VIRT_CS8900_BASE, 0}; +static unsigned int cs8900_irq_map[] = {IRQ_IXDP2351_CS8900, 0, 0, 0}; +#include <asm/irq.h> #elif defined(CONFIG_ARCH_IXDP2X01) #include <asm/irq.h> static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; @@ -341,7 +348,19 @@ } #endif -#if defined(CONFIG_ARCH_IXDP2X01) +#if defined(CONFIG_MACH_IXDP2351) +static u16 +readword(unsigned long base_addr, int portno) +{ + return __raw_readw(base_addr + (portno << 1)); +} + +static void +writeword(unsigned long base_addr, int portno, u16 value) +{ + __raw_writew(value, base_addr + (portno << 1)); +} +#elif defined(CONFIG_ARCH_IXDP2X01) static u16 readword(unsigned long base_addr, int portno) { @@ -781,7 +800,7 @@ } else { i = lp->isa_config & INT_NO_MASK; if (lp->chip_type == CS8900) { -#if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X) +#if defined(CONFIG_MACH_IXDP2351) || defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X) i = cs8900_irq_map[0]; #else /* Translate the IRQ using the IRQ mapping table. */ @@ -1013,7 +1032,7 @@ void __init reset_chip(struct net_device *dev) { -#ifndef CONFIG_ARCH_IXDP2X01 +#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; #endif @@ -1024,7 +1043,7 @@ /* wait 30 ms */ msleep(30); -#ifndef CONFIG_ARCH_IXDP2X01 +#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) if (lp->chip_type != CS8900) { /* Hardware problem requires PNP registers to be reconfigured after a reset */ writeword(ioaddr, ADD_PORT, PP_CS8920_ISAINT); @@ -1288,7 +1307,7 @@ else #endif { -#if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) +#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) if (((1 << dev->irq) & lp->irq_map) == 0) { printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", dev->name, dev->irq, lp->irq_map); diff -urN linux-2.6.15-git8.orig/drivers/net/Kconfig linux-2.6.15-git8/drivers/net/Kconfig --- linux-2.6.15-git8.orig/drivers/net/Kconfig 2006-01-13 02:55:36.000000000 +0100 +++ linux-2.6.15-git8/drivers/net/Kconfig 2006-01-13 02:54:18.000000000 +0100 @@ -1387,7 +1387,7 @@ config CS89x0 tristate "CS89x0 support" - depends on NET_PCI && (ISA || ARCH_IXDP2X01 || ARCH_PNX010X) + depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X) ---help--- Support for CS89x0 chipset based Ethernet cards. If you have a network (Ethernet) card of this type, say Y and read the - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html