mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-09 22:13:09 +02:00
a95f9f92e2
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13619 3c298f89-4303-0410-b956-a3cf2f4a3e73
75 lines
2.9 KiB
Diff
Executable File
75 lines
2.9 KiB
Diff
Executable File
From 0ed3724f733b7049d5efea9c44f5e6f0c6beae06 Mon Sep 17 00:00:00 2001
|
|
From: mokopatches <mokopatches@openmoko.org>
|
|
Date: Fri, 25 Jul 2008 22:21:22 +0100
|
|
Subject: [PATCH] qt2410-cs8900.patch
|
|
|
|
---
|
|
drivers/net/Kconfig | 4 ++--
|
|
drivers/net/cs89x0.c | 14 +++++++++++++-
|
|
2 files changed, 15 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
|
|
index f4182cf..8caa04a 100644
|
|
--- a/drivers/net/Kconfig
|
|
+++ b/drivers/net/Kconfig
|
|
@@ -1248,7 +1248,7 @@ source "drivers/net/ibm_newemac/Kconfig"
|
|
|
|
config NET_PCI
|
|
bool "EISA, VLB, PCI and on board controllers"
|
|
- depends on ISA || EISA || PCI
|
|
+ depends on ISA || EISA || PCI || MACH_QT2410
|
|
help
|
|
This is another class of network cards which attach directly to the
|
|
bus. If you have one of those, say Y and read the Ethernet-HOWTO,
|
|
@@ -1410,7 +1410,7 @@ config FORCEDETH_NAPI
|
|
|
|
config CS89x0
|
|
tristate "CS89x0 support"
|
|
- depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X)
|
|
+ depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_QT2410)
|
|
---help---
|
|
Support for CS89x0 chipset based Ethernet cards. If you have a
|
|
network (Ethernet) card of this type, say Y and read the
|
|
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
|
|
index fba87ab..d94a790 100644
|
|
--- a/drivers/net/cs89x0.c
|
|
+++ b/drivers/net/cs89x0.c
|
|
@@ -194,6 +194,10 @@ static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
|
|
#define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */
|
|
static unsigned int netcard_portlist[] __used __initdata = {CIRRUS_DEFAULT_BASE, 0};
|
|
static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0};
|
|
+#elif defined(CONFIG_MACH_QT2410)
|
|
+#include <asm/arch/irqs.h>
|
|
+static unsigned int netcard_portlist [] __initdata = { 0xe0000300, 0 };
|
|
+static unsigned int cs8900_irq_map[] = { IRQ_EINT9, 0, 0, 0 };
|
|
#else
|
|
static unsigned int netcard_portlist[] __used __initdata =
|
|
{ 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};
|
|
@@ -829,6 +833,14 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
|
|
|
|
printk(" IRQ %d", dev->irq);
|
|
|
|
+ dev->dev_addr[0] = 0x00;
|
|
+ dev->dev_addr[1] = 0x00;
|
|
+ dev->dev_addr[2] = 0xc0;
|
|
+ dev->dev_addr[3] = 0xff;
|
|
+ dev->dev_addr[4] = 0xee;
|
|
+ dev->dev_addr[5] = 0x08;
|
|
+ set_mac_address(dev, dev->dev_addr);
|
|
+
|
|
#if ALLOW_DMA
|
|
if (lp->use_dma) {
|
|
get_dma_channel(dev);
|
|
@@ -1304,7 +1316,7 @@ net_open(struct net_device *dev)
|
|
else
|
|
#endif
|
|
{
|
|
-#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X)
|
|
+#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) && !defined(CONFIG_MACH_QT2410)
|
|
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);
|
|
--
|
|
1.5.6.3
|
|
|