?? patch-cs89x0.patch
字號:
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.cindex a6078ad..4ecb1b4 100644--- a/drivers/net/cs89x0.c+++ b/drivers/net/cs89x0.c@@ -87,6 +87,9 @@ Deepak Saxena : dsaxena@plexity.net : Intel IXDP2x01 (XScale ixp2x00 NPU) platform support + Christian Pell : chripell@gmail.com+ : SMDK2410 platform support, fixed bug with signed ioaddr+ */ /* Always include 'config.h' first in case the user wants to turn on@@ -182,6 +185,14 @@ static unsigned int cs8900_irq_map[] = { #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0}; static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0};+#elif defined(CONFIG_ARCH_SMDK2410)+#include <asm/irq.h>+#include <asm/irq.h>++#include <asm/arch/smdk2410-map.h>++static unsigned int netcard_portlist[] __initdata = {SMDK2410_VA_CS8900A_BASE+0x300, 0};+static unsigned int cs8900_irq_map[] = {IRQ_EINT9, 0, 0, 0}; #else static unsigned int netcard_portlist[] __initdata = { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};@@ -234,7 +245,7 @@ struct net_local { /* Index to functions, as function prototypes. */ -static int cs89x0_probe1(struct net_device *dev, int ioaddr, int modular);+static int cs89x0_probe1(struct net_device *dev, unsigned int ioaddr, int modular); static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs);@@ -429,7 +440,7 @@ static void net_poll_controller(struct n */ static int __init-cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)+cs89x0_probe1(struct net_device *dev, unsigned int ioaddr, int modular) { struct net_local *lp = netdev_priv(dev); static unsigned version_printed;@@ -958,7 +976,7 @@ void __init reset_chip(struct net_devic { #ifndef CONFIG_ARCH_IXDP2X01 struct net_local *lp = netdev_priv(dev);- int ioaddr = dev->base_addr;+ unsigned int ioaddr = dev->base_addr; #endif int reset_start_time; @@ -1200,7 +1218,7 @@ net_open(struct net_device *dev) int i; int ret; -#if !defined(CONFIG_SH_HICOSH4) && !defined(CONFIG_ARCH_PNX0105) /* uses irq#1, so this won't work */+#if !defined(CONFIG_SH_HICOSH4) && !defined(CONFIG_ARCH_PNX0105) && !defined(CONFIG_ARCH_SMDK2410) /* uses irq#1, so this won't work */ if (dev->irq < 2) { /* Allow interrupts to be generated by the chip */ /* Cirrus' release had this: */@@ -1231,7 +1249,7 @@ net_open(struct net_device *dev) else #endif {-#if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105)+#if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105) && !defined(CONFIG_ARCH_SMDK2410) 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);@@ -1246,6 +1264,9 @@ net_open(struct net_device *dev) writereg(dev, PP_BusCTL, ENABLE_IRQ | MEMORY_ON); #endif write_irq(dev, lp->chip_type, dev->irq);+#if defined(CONFIG_ARCH_SMDK2410)+ set_irq_type(dev->irq, IRQT_RISING);+#endif ret = request_irq(dev->irq, &net_interrupt, 0, dev->name, dev); if (ret) { if (net_debug)@@ -1316,7 +1337,7 @@ net_open(struct net_device *dev) case A_CNF_MEDIA_10B_2: result = lp->adapter_cnf & A_CNF_10B_2; break; default: result = lp->adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | A_CNF_10B_2); }-#ifdef CONFIG_ARCH_PNX0105+#if defined(CONFIG_ARCH_PNX0105) || defined(CONFIG_ARCH_SMDK2410) result = A_CNF_10B_T; #endif if (!result) {@@ -1499,7 +1520,8 @@ static irqreturn_t net_interrupt(int irq { struct net_device *dev = dev_id; struct net_local *lp;- int ioaddr, status;+ unsigned int ioaddr;+ int status; int handled = 0; ioaddr = dev->base_addr;@@ -1605,7 +1627,7 @@ net_rx(struct net_device *dev) struct sk_buff *skb; int status, length; - int ioaddr = dev->base_addr;+ unsigned int ioaddr = dev->base_addr; status = inw(ioaddr + RX_FRAME_PORT); length = inw(ioaddr + RX_FRAME_PORT); diff --git a/drivers/net/Kconfig b/drivers/net/Kconfigindex c748b0e..70d1752 100644--- a/drivers/net/Kconfig+++ b/drivers/net/Kconfig@@ -1330,7 +1330,7 @@ config FORCEDETH config CS89x0 tristate "CS89x0 support"- depends on (NET_PCI && (ISA || ARCH_IXDP2X01)) || ARCH_PNX0105+ depends on (NET_PCI && (ISA || ARCH_IXDP2X01)) || ARCH_PNX0105 || ARCH_SMDK2410 ---help--- Support for CS89x0 chipset based Ethernet cards. If you have a network (Ethernet) card of this type, say Y and read thediff --git a/include/asm-arm/arch-s3c2410/smdk2410-map.h b/include/asm-arm/arch-s3c2410/smdk2410-map.hnew file mode 100644index 0000000..50b15d1--- /dev/null+++ b/include/asm-arm/arch-s3c2410/smdk2410-map.h@@ -0,0 +1,20 @@+/* linux/include/asm-arm/arch-s3c2410/smdk2410-map.h+ *+ * (c) 2005 Guillaume GOURAT / NexVision+ * guillaume.gourat@nexvision.fr+ *+ * SMDK2410 board memory map definitions+ *+ * This program is free software; you can redistribute it and/or modify+ * it under the terms of the GNU General Public License version 2 as+ * published by the Free Software Foundation.+*/+++#ifndef __ASM_ARCH_SMDK2410_H+#define __ASM_ARCH_SMDK2410_H++#define SMDK2410_PA_CS8900A_BASE (S3C2410_CS3 + 0x01000000) /* nGCS3 +0x01000000 */+#define SMDK2410_VA_CS8900A_BASE S3C2410_ADDR(0x04000000) /* 0xF4000000 */++#endif /* __ASM_ARCH_SMDK2410_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -