aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx-2.6
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2007-05-23 19:48:34 +0000
committerImre Kaloz <kaloz@openwrt.org>2007-05-23 19:48:34 +0000
commit615e8af8411e64db4db57d453af00ea9a7ca1fa2 (patch)
treeb4fa16ada763cf659876a3ef907e0e49e4cb73f1 /target/linux/ixp4xx-2.6
parente1bb43f263ea0a0c72bac8750fb420697ca7866f (diff)
downloadupstream-615e8af8411e64db4db57d453af00ea9a7ca1fa2.tar.gz
upstream-615e8af8411e64db4db57d453af00ea9a7ca1fa2.tar.bz2
upstream-615e8af8411e64db4db57d453af00ea9a7ca1fa2.zip
break trunk temporary - upgrade to 2.6.21.1 and iptables 1.3.7
SVN-Revision: 7315
Diffstat (limited to 'target/linux/ixp4xx-2.6')
-rw-r--r--target/linux/ixp4xx-2.6/config/default9
-rw-r--r--target/linux/ixp4xx-2.6/patches/080-trivial_nslu2_nas100d_cleanup.patch196
-rw-r--r--target/linux/ixp4xx-2.6/patches/100-npe_driver.patch1313
-rw-r--r--target/linux/ixp4xx-2.6/patches/102-nslu2_led_swap.patch36
-rw-r--r--target/linux/ixp4xx-2.6/patches/110-ixp4xx_net_driver_fix_mac_handling.patch17
-rw-r--r--target/linux/ixp4xx-2.6/patches/133-ixp4xx_net_driver_improve_mac_handling.patch41
-rw-r--r--target/linux/ixp4xx-2.6/patches/139-ixp4xx_net_driver_mtd_load_fw.patch79
-rw-r--r--target/linux/ixp4xx-2.6/patches/500-compex.patch16
-rw-r--r--target/linux/ixp4xx-2.6/patches/700-remove_avila_ixdp425_setup.patch39
-rw-r--r--target/linux/ixp4xx-2.6/patches/710-avila_loft_setup.patch381
-rw-r--r--target/linux/ixp4xx-2.6/patches/800-eeprom_new_notifier.patch30
11 files changed, 964 insertions, 1193 deletions
diff --git a/target/linux/ixp4xx-2.6/config/default b/target/linux/ixp4xx-2.6/config/default
index 39521838c5..066f6219a9 100644
--- a/target/linux/ixp4xx-2.6/config/default
+++ b/target/linux/ixp4xx-2.6/config/default
@@ -15,8 +15,10 @@ CONFIG_ALIGNMENT_TRAP=y
# CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_IMX is not set
# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_IOP13XX is not set
# CONFIG_ARCH_IOP32X is not set
# CONFIG_ARCH_IOP33X is not set
+CONFIG_ARCH_IXCDP1100=y
CONFIG_ARCH_IXDP425=y
CONFIG_ARCH_IXDP4XX=y
# CONFIG_ARCH_IXP2000 is not set
@@ -25,6 +27,7 @@ CONFIG_ARCH_IXP4XX=y
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_NS9XXX is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_PNX4008 is not set
# CONFIG_ARCH_PRPMC1100 is not set
@@ -202,9 +205,11 @@ CONFIG_IXP4XX_NPE_FW_MTD=y
CONFIG_IXP4XX_QMGR=y
CONFIG_IXP4XX_CRYPTO=y
CONFIG_IXP4XX_WATCHDOG=y
+# CONFIG_IWMMXT is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFS_FS is not set
+# CONFIG_KEXEC is not set
# CONFIG_LANMEDIA is not set
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
@@ -318,6 +323,7 @@ CONFIG_PATA_ARTOP=m
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
+CONFIG_PATA_IXP4XX_CF=m
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MPIIX is not set
@@ -389,6 +395,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ASB100 is not set
@@ -416,6 +423,7 @@ CONFIG_SENSORS_EEPROM=y
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_SENSORS_PCF8591 is not set
@@ -431,6 +439,7 @@ CONFIG_SENSORS_EEPROM=y
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SHMEM is not set
diff --git a/target/linux/ixp4xx-2.6/patches/080-trivial_nslu2_nas100d_cleanup.patch b/target/linux/ixp4xx-2.6/patches/080-trivial_nslu2_nas100d_cleanup.patch
new file mode 100644
index 0000000000..f0bfcdec5f
--- /dev/null
+++ b/target/linux/ixp4xx-2.6/patches/080-trivial_nslu2_nas100d_cleanup.patch
@@ -0,0 +1,196 @@
+This trivial patch updates the nslu2 and nas-100d headers to
+remove pointless GPIO defines, and updates nslu2-setup.c
+accordingly. In addition minor style cleanups to some comments
+are included.
+
+Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
+
+Index: linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c
+===================================================================
+--- linux-2.6.21-armeb.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-09 07:32:43.000000000 -0700
++++ linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-09 07:32:46.000000000 -0700
+@@ -50,26 +50,26 @@
+ static struct resource nslu2_led_resources[] = {
+ {
+ .name = "ready", /* green led */
+- .start = NSLU2_LED_GRN,
+- .end = NSLU2_LED_GRN,
++ .start = NSLU2_LED_GRN_GPIO,
++ .end = NSLU2_LED_GRN_GPIO,
+ .flags = IXP4XX_GPIO_HIGH,
+ },
+ {
+ .name = "status", /* red led */
+- .start = NSLU2_LED_RED,
+- .end = NSLU2_LED_RED,
++ .start = NSLU2_LED_RED_GPIO,
++ .end = NSLU2_LED_RED_GPIO,
+ .flags = IXP4XX_GPIO_HIGH,
+ },
+ {
+ .name = "disk-1",
+- .start = NSLU2_LED_DISK1,
+- .end = NSLU2_LED_DISK1,
++ .start = NSLU2_LED_DISK1_GPIO,
++ .end = NSLU2_LED_DISK1_GPIO,
+ .flags = IXP4XX_GPIO_LOW,
+ },
+ {
+ .name = "disk-2",
+- .start = NSLU2_LED_DISK2,
+- .end = NSLU2_LED_DISK2,
++ .start = NSLU2_LED_DISK2_GPIO,
++ .end = NSLU2_LED_DISK2_GPIO,
+ .flags = IXP4XX_GPIO_LOW,
+ },
+ };
+@@ -181,7 +181,8 @@
+
+ pm_power_off = nslu2_power_off;
+
+- /* This is only useful on a modified machine, but it is valuable
++ /*
++ * This is only useful on a modified machine, but it is valuable
+ * to have it first in order to see debug messages, and so that
+ * it does *not* get removed if platform_add_devices fails!
+ */
+Index: linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nslu2.h
+===================================================================
+--- linux-2.6.21-armeb.orig/include/asm-arm/arch-ixp4xx/nslu2.h 2007-05-09 07:32:43.000000000 -0700
++++ linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nslu2.h 2007-05-09 07:32:46.000000000 -0700
+@@ -9,7 +9,7 @@
+ * based on ixdp425.h:
+ * Copyright 2004 (c) MontaVista, Software, Inc.
+ *
+- * This file is licensed under the terms of the GNU General Public
++ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+@@ -34,36 +34,14 @@
+ #define NSLU2_PCI_INTC_PIN 9
+ #define NSLU2_PCI_INTD_PIN 8
+
+-
+ /* NSLU2 Timer */
+ #define NSLU2_FREQ 66000000
+-#define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
+-#define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)
+-
+-/* GPIO */
+-
+-#define NSLU2_GPIO0 0
+-#define NSLU2_GPIO1 1
+-#define NSLU2_GPIO2 2
+-#define NSLU2_GPIO3 3
+-#define NSLU2_GPIO4 4
+-#define NSLU2_GPIO5 5
+-#define NSLU2_GPIO6 6
+-#define NSLU2_GPIO7 7
+-#define NSLU2_GPIO8 8
+-#define NSLU2_GPIO9 9
+-#define NSLU2_GPIO10 10
+-#define NSLU2_GPIO11 11
+-#define NSLU2_GPIO12 12
+-#define NSLU2_GPIO13 13
+-#define NSLU2_GPIO14 14
+-#define NSLU2_GPIO15 15
+
+ /* Buttons */
+
+-#define NSLU2_PB_GPIO NSLU2_GPIO5
+-#define NSLU2_PO_GPIO NSLU2_GPIO8 /* power off */
+-#define NSLU2_RB_GPIO NSLU2_GPIO12
++#define NSLU2_PB_GPIO 5
++#define NSLU2_PO_GPIO 8 /* power off */
++#define NSLU2_RB_GPIO 12
+
+ #define NSLU2_PB_IRQ IRQ_IXP4XX_GPIO5
+ #define NSLU2_RB_IRQ IRQ_IXP4XX_GPIO12
+@@ -79,16 +57,16 @@
+
+ /* LEDs */
+
+-#define NSLU2_LED_RED NSLU2_GPIO0
+-#define NSLU2_LED_GRN NSLU2_GPIO1
++#define NSLU2_LED_RED_GPIO 0
++#define NSLU2_LED_GRN_GPIO 1
+
+-#define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED)
+-#define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN)
++#define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED_GPIO)
++#define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN_GPIO)
+
+-#define NSLU2_LED_DISK1 NSLU2_GPIO3
+-#define NSLU2_LED_DISK2 NSLU2_GPIO2
++#define NSLU2_LED_DISK1_GPIO 3
++#define NSLU2_LED_DISK2_GPIO 2
+
+-#define NSLU2_LED_DISK1_BM (1L << NSLU2_GPIO2)
+-#define NSLU2_LED_DISK2_BM (1L << NSLU2_GPIO3)
++#define NSLU2_LED_DISK1_BM (1L << NSLU2_LED_DISK1_GPIO)
++#define NSLU2_LED_DISK2_BM (1L << NSLU2_LED_DISK2_GPIO)
+
+
+Index: linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nas100d.h
+===================================================================
+--- linux-2.6.21-armeb.orig/include/asm-arm/arch-ixp4xx/nas100d.h 2007-04-25 20:08:32.000000000 -0700
++++ linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nas100d.h 2007-05-09 07:34:14.000000000 -0700
+@@ -10,7 +10,7 @@
+ * based on ixdp425.h:
+ * Copyright 2004 (c) MontaVista, Software, Inc.
+ *
+- * This file is licensed under the terms of the GNU General Public
++ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+@@ -36,31 +36,11 @@
+ #define NAS100D_PCI_INTD_PIN 8
+ #define NAS100D_PCI_INTE_PIN 7
+
+-/* GPIO */
+-
+-#define NAS100D_GPIO0 0
+-#define NAS100D_GPIO1 1
+-#define NAS100D_GPIO2 2
+-#define NAS100D_GPIO3 3
+-#define NAS100D_GPIO4 4
+-#define NAS100D_GPIO5 5
+-#define NAS100D_GPIO6 6
+-#define NAS100D_GPIO7 7
+-#define NAS100D_GPIO8 8
+-#define NAS100D_GPIO9 9
+-#define NAS100D_GPIO10 10
+-#define NAS100D_GPIO11 11
+-#define NAS100D_GPIO12 12
+-#define NAS100D_GPIO13 13
+-#define NAS100D_GPIO14 14
+-#define NAS100D_GPIO15 15
+-
+-
+ /* Buttons */
+
+-#define NAS100D_PB_GPIO NAS100D_GPIO14
+-#define NAS100D_RB_GPIO NAS100D_GPIO4
+-#define NAS100D_PO_GPIO NAS100D_GPIO12 /* power off */
++#define NAS100D_PB_GPIO 14
++#define NAS100D_RB_GPIO 4
++#define NAS100D_PO_GPIO 12 /* power off */
+
+ #define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14
+ #define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4
+Index: linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c
+===================================================================
+--- linux-2.6.21-armeb.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-05-09 07:32:43.000000000 -0700
++++ linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-05-09 07:34:55.000000000 -0700
+@@ -155,7 +155,8 @@
+
+ pm_power_off = nas100d_power_off;
+
+- /* This is only useful on a modified machine, but it is valuable
++ /*
++ * This is only useful on a modified machine, but it is valuable
+ * to have it first in order to see debug messages, and so that
+ * it does *not* get removed if platform_add_devices fails!
+ */
diff --git a/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch b/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch
index 8db6276587..78fb119bcd 100644
--- a/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch
+++ b/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch
@@ -1,184 +1,10 @@
-diff -Naur linux-2.6.19.orig/arch/arm/mach-ixp4xx/common.c linux-2.6.19/arch/arm/mach-ixp4xx/common.c
---- linux-2.6.19.orig/arch/arm/mach-ixp4xx/common.c 2006-11-29 14:57:37.000000000 -0700
-+++ linux-2.6.19/arch/arm/mach-ixp4xx/common.c 2007-01-12 21:54:40.000000000 -0700
-@@ -314,6 +314,90 @@
- &ixp46x_i2c_controller
- };
-
-+static struct npe_plat_data npea = {
-+ .name = "NPE-A",
-+ .data_size = 0x800,
-+ .inst_size = 0x1000,
-+ .id = 0,
-+};
-+
-+static struct npe_plat_data npeb = {
-+ .name = "NPE-B",
-+ .data_size = 0x800,
-+ .inst_size = 0x800,
-+ .id = 1,
-+};
-+
-+static struct npe_plat_data npec = {
-+ .name = "NPE-C",
-+ .data_size = 0x800,
-+ .inst_size = 0x800,
-+ .id = 2,
-+};
-+
-+static struct resource res_npea = {
-+ .start = IXP4XX_NPEA_BASE_PHYS,
-+ .end = IXP4XX_NPEA_BASE_PHYS + 0xfff,
-+ .flags = IORESOURCE_MEM,
-+};
-+
-+static struct resource res_npeb = {
-+ .start = IXP4XX_NPEB_BASE_PHYS,
-+ .end = IXP4XX_NPEB_BASE_PHYS + 0xfff,
-+ .flags = IORESOURCE_MEM,
-+};
-+
-+static struct resource res_npec = {
-+ .start = IXP4XX_NPEC_BASE_PHYS,
-+ .end = IXP4XX_NPEC_BASE_PHYS + 0xfff,
-+ .flags = IORESOURCE_MEM,
-+};
-+
-+static struct platform_device dev_npea = {
-+ .name = "ixp4xx_npe",
-+ .id = 0,
-+ .dev.platform_data = &npea,
-+ .num_resources = 1,
-+ .resource = &res_npea,
-+};
-+
-+static struct platform_device dev_npeb = {
-+ .name = "ixp4xx_npe",
-+ .id = 1,
-+ .dev.platform_data = &npeb,
-+ .num_resources = 1,
-+ .resource = &res_npeb,
-+};
-+
-+static struct platform_device dev_npec = {
-+ .name = "ixp4xx_npe",
-+ .id = 2,
-+ .dev.platform_data = &npec,
-+ .num_resources = 1,
-+ .resource = &res_npec,
-+};
-+
-+/* QMGR */
-+static struct resource res_qmgr[] = {
-+{
-+ .start = IXP4XX_QMGR_BASE_PHYS,
-+ .end = IXP4XX_QMGR_BASE_PHYS + IXP4XX_QMGR_REGION_SIZE -1,
-+ .flags = IORESOURCE_MEM,
-+}, {
-+ .start = IRQ_IXP4XX_QM1,
-+ .flags = IORESOURCE_IRQ,
-+} };
-+
-+static struct platform_device qmgr = {
-+ .name = "ixp4xx_qmgr",
-+ .id = 0,
-+ .dev = {
-+ .coherent_dma_mask = DMA_32BIT_MASK,
-+ },
-+ .num_resources = ARRAY_SIZE(res_qmgr),
-+ .resource = res_qmgr,
-+};
-+
- unsigned long ixp4xx_exp_bus_size;
- EXPORT_SYMBOL(ixp4xx_exp_bus_size);
-
-@@ -333,8 +417,19 @@
- break;
- }
- }
-+ npeb.inst_size = 0x1000;
-+ npec.inst_size = 0x1000;
- }
-
-+ platform_device_register(&qmgr);
-+
-+ if (ix_fuse() & IX_FUSE_NPEA)
-+ platform_device_register(&dev_npea);
-+ if (ix_fuse() & IX_FUSE_NPEB)
-+ platform_device_register(&dev_npeb);
-+ if (ix_fuse() & IX_FUSE_NPEC)
-+ platform_device_register(&dev_npec);
-+
- printk("IXP4xx: Using %luMiB expansion bus window size\n",
- ixp4xx_exp_bus_size >> 20);
- }
-diff -Naur linux-2.6.19.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c linux-2.6.19/arch/arm/mach-ixp4xx/ixdp425-setup.c
---- linux-2.6.19.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c 2006-11-29 14:57:37.000000000 -0700
-+++ linux-2.6.19/arch/arm/mach-ixp4xx/ixdp425-setup.c 2007-01-12 21:54:40.000000000 -0700
-@@ -101,10 +101,59 @@
- .resource = ixdp425_uart_resources
- };
-
-+/* MACs */
-+static struct resource res_mac0 = {
-+ .start = IXP4XX_EthB_BASE_PHYS,
-+ .end = IXP4XX_EthB_BASE_PHYS + 0x1ff,
-+ .flags = IORESOURCE_MEM,
-+};
-+
-+static struct resource res_mac1 = {
-+ .start = IXP4XX_EthC_BASE_PHYS,
-+ .end = IXP4XX_EthC_BASE_PHYS + 0x1ff,
-+ .flags = IORESOURCE_MEM,
-+};
-+
-+static struct mac_plat_info plat_mac0 = {
-+ .npe_id = 1,
-+ .phy_id = 0,
-+ .eth_id = 0,
-+ .rxq_id = 27,
-+ .txq_id = 24,
-+ .rxdoneq_id = 4,
-+};
-+
-+static struct mac_plat_info plat_mac1 = {
-+ .npe_id = 2,
-+ .phy_id = 1,
-+ .eth_id = 1,
-+ .rxq_id = 28,
-+ .txq_id = 25,
-+ .rxdoneq_id = 5,
-+};
-+
-+static struct platform_device mac0 = {
-+ .name = "ixp4xx_mac",
-+ .id = 0,
-+ .dev.platform_data = &plat_mac0,
-+ .num_resources = 1,
-+ .resource = &res_mac0,
-+};
-+
-+static struct platform_device mac1 = {
-+ .name = "ixp4xx_mac",
-+ .id = 1,
-+ .dev.platform_data = &plat_mac1,
-+ .num_resources = 1,
-+ .resource = &res_mac1,
-+};
-+
- static struct platform_device *ixdp425_devices[] __initdata = {
- &ixdp425_i2c_controller,
- &ixdp425_flash,
-- &ixdp425_uart
-+ &ixdp425_uart,
-+ &mac0,
-+ &mac1,
- };
-
- static void __init ixdp425_init(void)
-diff -Naur linux-2.6.19.orig/Documentation/networking/ixp4xx/IxNpeMicrocode.h linux-2.6.19/Documentation/networking/ixp4xx/IxNpeMicrocode.h
---- linux-2.6.19.orig/Documentation/networking/ixp4xx/IxNpeMicrocode.h 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/Documentation/networking/ixp4xx/IxNpeMicrocode.h 2007-01-12 21:54:40.000000000 -0700
+diff --git a/Documentation/networking/ixp4xx/IxNpeMicrocode.h b/Documentation/networking/ixp4xx/IxNpeMicrocode.h
+new file mode 100644
+index 0000000..e5a4bd3
+Index: linux-2.6.21-rc1-arm/Documentation/networking/ixp4xx/IxNpeMicrocode.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/Documentation/networking/ixp4xx/IxNpeMicrocode.h 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,143 @@
+/*
+ * IxNpeMicrocode.h - Headerfile for compiling the Intel microcode C file
@@ -323,9 +149,77 @@ diff -Naur linux-2.6.19.orig/Documentation/networking/ixp4xx/IxNpeMicrocode.h li
+ close(fd);
+ return 0;
+}
-diff -Naur linux-2.6.19.orig/Documentation/networking/ixp4xx/mc_grab.c linux-2.6.19/Documentation/networking/ixp4xx/mc_grab.c
---- linux-2.6.19.orig/Documentation/networking/ixp4xx/mc_grab.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/Documentation/networking/ixp4xx/mc_grab.c 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/Documentation/networking/ixp4xx/README
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/Documentation/networking/ixp4xx/README 2007-02-21 02:24:35.000000000 -0800
+@@ -0,0 +1,62 @@
++Informations about the Networking Driver using the IXP4XX CPU internal NPEs
++and Queue manager.
++
++If this driver is used, the IAL (Intel Access Library) must not be loaded.
++However, the IAL may be loaded, if this Modules are unloaded:
++ ixp4xx_npe.ko, ixp4xx_qmgr.ko ixp4xx_mac.ko
++
++This also means that HW crypto accelleration does NOT work when using this
++driver, unless I have finished my crypto driver for NPE-C
++
++
++Adoption to your custom board:
++------------------------------
++use "arch/arm/mach-ixp4xx/ixdp425-setup.c" as template:
++
++in "static struct mac_plat_info" adopt the entry "phy_id" to your needs
++(Ask your hardware designer about the PHY id)
++
++The order of "&mac0" and "&mac1" in the "struct platform_device"
++determines which of them becomes eth0 and eth1
++
++
++The Microcode:
++---------------
++Solution 1)
++ Configure "CONFIG_HOTPLUG" and "CONFIG_FW_LOADER" and configure
++ IXP4XX_NPE as module.
++ The default hotplug script will load the Firmware from
++ /usr/lib/hotplug/firmware/NPE-[ABC]
++ see Documentation/firmware_class/hotplug-script
++
++ You should take care, that $ACTION is "add" and $SUBSYSTEM is "firmware"
++ to avoid unnessecary calls:
++ test $ACTION = "remove" -o $SUBSYSTEM != "firmware" && exit
++
++Solution 2)
++ create a char-dev: "mknod /dev/misc/npe c 10 184"
++ cat the Microcode into it:
++ cat /usr/lib/hotplug/firmware/NPE-* > /dev/misc/npe
++ This also works if the driver is linked to the kernel
++
++ Having a mix of both (e.g. solution 1 for NPE-B and solution 2 for NPE-C)
++ is perfectly ok and works.
++
++ The state of the NPEs can be seen and changed at:
++ /sys/bus/platform/devices/ixp4xx_npe.X/state
++
++
++Obtaining the Microcode:
++------------------------
++1) IxNpeMicrocode.h in this directory:
++ Download IPL_IXP400NPELIBRARYWITHCRYPTO-2_1.ZIP from Intel
++ It unpacks the Microcode IxNpeMicrocode.c
++ Read the Licence !
++ Compile it with "gcc -Wall IxNpeMicrocode.c -o IxNpeMicrocode" on your host.
++ The resulting images can be moved to "/usr/lib/hotplug/firmware"
++
++2) mc_grab.c in this directory:
++ Compile and execute it either on the host or on the target
++ to grab the microcode from a binary image like the RedBoot bootloader.
++
++
+Index: linux-2.6.21-rc1-arm/Documentation/networking/ixp4xx/mc_grab.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/Documentation/networking/ixp4xx/mc_grab.c 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,97 @@
+/*
+ * mc_grab.c - grabs IXP4XX microcode from a binary datastream
@@ -424,75 +318,280 @@ diff -Naur linux-2.6.19.orig/Documentation/networking/ixp4xx/mc_grab.c linux-2.6
+ fprintf(stderr, "Error reading Microcode\n");
+ return ret;
+}
-diff -Naur linux-2.6.19.orig/Documentation/networking/ixp4xx/README linux-2.6.19/Documentation/networking/ixp4xx/README
---- linux-2.6.19.orig/Documentation/networking/ixp4xx/README 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/Documentation/networking/ixp4xx/README 2007-01-12 21:54:40.000000000 -0700
-@@ -0,0 +1,62 @@
-+Informations about the Networking Driver using the IXP4XX CPU internal NPEs
-+and Queue manager.
+Index: linux-2.6.21-rc1-arm/arch/arm/mach-ixp4xx/common.c
+===================================================================
+--- linux-2.6.21-rc1-arm.orig/arch/arm/mach-ixp4xx/common.c 2007-02-21 02:24:18.000000000 -0800
++++ linux-2.6.21-rc1-arm/arch/arm/mach-ixp4xx/common.c 2007-02-21 02:24:35.000000000 -0800
+@@ -357,6 +357,90 @@
+ &ixp46x_i2c_controller
+ };
+
++static struct npe_plat_data npea = {
++ .name = "NPE-A",
++ .data_size = 0x800,
++ .inst_size = 0x1000,
++ .id = 0,
++};
+
-+If this driver is used, the IAL (Intel Access Library) must not be loaded.
-+However, the IAL may be loaded, if this Modules are unloaded:
-+ ixp4xx_npe.ko, ixp4xx_qmgr.ko ixp4xx_mac.ko
++static struct npe_plat_data npeb = {
++ .name = "NPE-B",
++ .data_size = 0x800,
++ .inst_size = 0x800,
++ .id = 1,
++};
+
-+This also means that HW crypto accelleration does NOT work when using this
-+driver, unless I have finished my crypto driver for NPE-C
++static struct npe_plat_data npec = {
++ .name = "NPE-C",
++ .data_size = 0x800,
++ .inst_size = 0x800,
++ .id = 2,
++};
+
++static struct resource res_npea = {
++ .start = IXP4XX_NPEA_BASE_PHYS,
++ .end = IXP4XX_NPEA_BASE_PHYS + 0xfff,
++ .flags = IORESOURCE_MEM,
++};
+
-+Adoption to your custom board:
-+------------------------------
-+use "arch/arm/mach-ixp4xx/ixdp425-setup.c" as template:
++static struct resource res_npeb = {
++ .start = IXP4XX_NPEB_BASE_PHYS,
++ .end = IXP4XX_NPEB_BASE_PHYS + 0xfff,
++ .flags = IORESOURCE_MEM,
++};
+
-+in "static struct mac_plat_info" adopt the entry "phy_id" to your needs
-+(Ask your hardware designer about the PHY id)
++static struct resource res_npec = {
++ .start = IXP4XX_NPEC_BASE_PHYS,
++ .end = IXP4XX_NPEC_BASE_PHYS + 0xfff,
++ .flags = IORESOURCE_MEM,
++};
+
-+The order of "&mac0" and "&mac1" in the "struct platform_device"
-+determines which of them becomes eth0 and eth1
++static struct platform_device dev_npea = {
++ .name = "ixp4xx_npe",
++ .id = 0,
++ .dev.platform_data = &npea,
++ .num_resources = 1,
++ .resource = &res_npea,
++};
+
++static struct platform_device dev_npeb = {
++ .name = "ixp4xx_npe",
++ .id = 1,
++ .dev.platform_data = &npeb,
++ .num_resources = 1,
++ .resource = &res_npeb,
++};
+
-+The Microcode:
-+---------------
-+Solution 1)
-+ Configure "CONFIG_HOTPLUG" and "CONFIG_FW_LOADER" and configure
-+ IXP4XX_NPE as module.
-+ The default hotplug script will load the Firmware from
-+ /usr/lib/hotplug/firmware/NPE-[ABC]
-+ see Documentation/firmware_class/hotplug-script
++static struct platform_device dev_npec = {
++ .name = "ixp4xx_npe",
++ .id = 2,
++ .dev.platform_data = &npec,
++ .num_resources = 1,
++ .resource = &res_npec,
++};
+
-+ You should take care, that $ACTION is "add" and $SUBSYSTEM is "firmware"
-+ to avoid unnessecary calls:
-+ test $ACTION = "remove" -o $SUBSYSTEM != "firmware" && exit
++/* QMGR */
++static struct resource res_qmgr[] = {
++{
++ .start = IXP4XX_QMGR_BASE_PHYS,
++ .end = IXP4XX_QMGR_BASE_PHYS + IXP4XX_QMGR_REGION_SIZE -1,
++ .flags = IORESOURCE_MEM,
++}, {
++ .start = IRQ_IXP4XX_QM1,
++ .flags = IORESOURCE_IRQ,
++} };
+
-+Solution 2)
-+ create a char-dev: "mknod /dev/misc/npe c 10 184"
-+ cat the Microcode into it:
-+ cat /usr/lib/hotplug/firmware/NPE-* > /dev/misc/npe
-+ This also works if the driver is linked to the kernel
++static struct platform_device qmgr = {
++ .name = "ixp4xx_qmgr",
++ .id = 0,
++ .dev = {
++ .coherent_dma_mask = DMA_32BIT_MASK,
++ },
++ .num_resources = ARRAY_SIZE(res_qmgr),
++ .resource = res_qmgr,
++};
+
-+ Having a mix of both (e.g. solution 1 for NPE-B and solution 2 for NPE-C)
-+ is perfectly ok and works.
+ unsigned long ixp4xx_exp_bus_size;
+ EXPORT_SYMBOL(ixp4xx_exp_bus_size);
+
+@@ -378,8 +462,19 @@
+ break;
+ }
+ }
++ npeb.inst_size = 0x1000;
++ npec.inst_size = 0x1000;
+ }
+
++ platform_device_register(&qmgr);
+
-+ The state of the NPEs can be seen and changed at:
-+ /sys/bus/platform/devices/ixp4xx_npe.X/state
++ if (ix_fuse() & IX_FUSE_NPEA)
++ platform_device_register(&dev_npea);
++ if (ix_fuse() & IX_FUSE_NPEB)
++ platform_device_register(&dev_npeb);
++ if (ix_fuse() & IX_FUSE_NPEC)
++ platform_device_register(&dev_npec);
+
+ printk("IXP4xx: Using %luMiB expansion bus window size\n",
+ ixp4xx_exp_bus_size >> 20);
+ }
+Index: linux-2.6.21-rc1-arm/arch/arm/mach-ixp4xx/ixdp425-setup.c
+===================================================================
+--- linux-2.6.21-rc1-arm.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c 2007-02-21 02:24:18.000000000 -0800
++++ linux-2.6.21-rc1-arm/arch/arm/mach-ixp4xx/ixdp425-setup.c 2007-02-21 02:24:35.000000000 -0800
+@@ -101,10 +101,59 @@
+ .resource = ixdp425_uart_resources
+ };
+
++/* MACs */
++static struct resource res_mac0 = {
++ .start = IXP4XX_EthB_BASE_PHYS,
++ .end = IXP4XX_EthB_BASE_PHYS + 0x1ff,
++ .flags = IORESOURCE_MEM,
++};
+
-+Obtaining the Microcode:
-+------------------------
-+1) IxNpeMicrocode.h in this directory:
-+ Download IPL_IXP400NPELIBRARYWITHCRYPTO-2_1.ZIP from Intel
-+ It unpacks the Microcode IxNpeMicrocode.c
-+ Read the Licence !
-+ Compile it with "gcc -Wall IxNpeMicrocode.c -o IxNpeMicrocode" on your host.
-+ The resulting images can be moved to "/usr/lib/hotplug/firmware"
++static struct resource res_mac1 = {
++ .start = IXP4XX_EthC_BASE_PHYS,
++ .end = IXP4XX_EthC_BASE_PHYS + 0x1ff,
++ .flags = IORESOURCE_MEM,
++};
+
-+2) mc_grab.c in this directory:
-+ Compile and execute it either on the host or on the target
-+ to grab the microcode from a binary image like the RedBoot bootloader.
++static struct mac_plat_info plat_mac0 = {
++ .npe_id = 1,
++ .phy_id = 0,
++ .eth_id = 0,
++ .rxq_id = 27,
++ .txq_id = 24,
++ .rxdoneq_id = 4,
++};
++
++static struct mac_plat_info plat_mac1 = {
++ .npe_id = 2,
++ .phy_id = 1,
++ .eth_id = 1,
++ .rxq_id = 28,
++ .txq_id = 25,
++ .rxdoneq_id = 5,
++};
++
++static struct platform_device mac0 = {
++ .name = "ixp4xx_mac",
++ .id = 0,
++ .dev.platform_data = &plat_mac0,
++ .num_resources = 1,
++ .resource = &res_mac0,
++};
++
++static struct platform_device mac1 = {
++ .name = "ixp4xx_mac",
++ .id = 1,
++ .dev.platform_data = &plat_mac1,
++ .num_resources = 1,
++ .resource = &res_mac1,
++};
++
+ static struct platform_device *ixdp425_devices[] __initdata = {
+ &ixdp425_i2c_controller,
+ &ixdp425_flash,
+- &ixdp425_uart
++ &ixdp425_uart,
++ &mac0,
++ &mac1,
+ };
+
+ static void __init ixdp425_init(void)
+Index: linux-2.6.21-rc1-arm/drivers/net/Kconfig
+===================================================================
+--- linux-2.6.21-rc1-arm.orig/drivers/net/Kconfig 2007-02-21 02:24:18.000000000 -0800
++++ linux-2.6.21-rc1-arm/drivers/net/Kconfig 2007-02-21 02:24:35.000000000 -0800
+@@ -201,6 +201,8 @@
+
+ source "drivers/net/arm/Kconfig"
+
++source "drivers/net/ixp4xx/Kconfig"
++
+ config MACE
+ tristate "MACE (Power Mac ethernet) support"
+ depends on NET_ETHERNET && PPC_PMAC && PPC32
+Index: linux-2.6.21-rc1-arm/drivers/net/Makefile
+===================================================================
+--- linux-2.6.21-rc1-arm.orig/drivers/net/Makefile 2007-02-21 02:24:18.000000000 -0800
++++ linux-2.6.21-rc1-arm/drivers/net/Makefile 2007-02-21 02:24:35.000000000 -0800
+@@ -212,6 +212,7 @@
+ obj-$(CONFIG_IRDA) += irda/
+ obj-$(CONFIG_ETRAX_ETHERNET) += cris/
+ obj-$(CONFIG_ENP2611_MSF_NET) += ixp2000/
++obj-$(CONFIG_IXP4XX_NPE) += ixp4xx/
+
+ obj-$(CONFIG_NETCONSOLE) += netconsole.o
+
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/Kconfig 2007-02-21 02:24:35.000000000 -0800
+@@ -0,0 +1,48 @@
++config IXP4XX_QMGR
++ tristate "IXP4xx Queue Manager support"
++ depends on ARCH_IXP4XX
++ depends on NET_ETHERNET
++ help
++ The IXP4XX Queue manager is a configurable hardware ringbuffer.
++ It is used by the NPEs to exchange data from and to the CPU.
++ You can either use this OR the Intel Access Library (IAL)
++
++config IXP4XX_NPE
++ tristate "IXP4xx NPE support"
++ depends on ARCH_IXP4XX
++ depends on NET_ETHERNET
++ help
++ The IXP4XX NPE driver supports the 3 CPU co-processors called
++ "Network Processing Engines" (NPE). It adds support fo downloading
++ the Microcode (firmware) via Hotplug or character-special-device.
++ More about this at: Documentation/networking/ixp4xx/README.
++ You can either use this OR the Intel Access Library (IAL)
+
++config IXP4XX_FW_LOAD
++ bool "Use Firmware hotplug for Microcode download"
++ depends on IXP4XX_NPE
++ select HOTPLUG
++ select FW_LOADER
++ help
++ The default hotplug script will load the Firmware from
++ /usr/lib/hotplug/firmware/NPE-[ABC]
++ see Documentation/firmware_class/hotplug-script
++
++config IXP4XX_MAC
++ tristate "IXP4xx MAC support"
++ depends on IXP4XX_NPE
++ depends on IXP4XX_QMGR
++ depends on NET_ETHERNET
++ select MII
++ help
++ The IXP4XX MAC driver supports the MACs on the IXP4XX CPUs.
++ There are 2 on ixp425 and up to 5 on ixdp465.
++ You can either use this OR the Intel Access Library (IAL)
++
++config IXP4XX_CRYPTO
++ tristate "IXP4xx crypto support"
++ depends on IXP4XX_NPE
++ depends on IXP4XX_QMGR
++ help
++ This driver is a generic NPE-crypto access layer.
++ You need additional code in OCF for example.
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/Makefile 2007-02-21 02:24:35.000000000 -0800
+@@ -0,0 +1,7 @@
++obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
++obj-$(CONFIG_IXP4XX_NPE) += ixp4xx_npe.o
++obj-$(CONFIG_IXP4XX_MAC) += ixp4xx_mac.o
++obj-$(CONFIG_IXP4XX_CRYPTO) += ixp4xx_crypto.o
+
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/ixp4xx_crypto.c linux-2.6.19/drivers/net/ixp4xx/ixp4xx_crypto.c
---- linux-2.6.19.orig/drivers/net/ixp4xx/ixp4xx_crypto.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/ixp4xx_crypto.c 2007-01-12 21:54:40.000000000 -0700
++ixp4xx_npe-objs := ucode_dl.o npe_mh.o npe.o
++ixp4xx_mac-objs := mac_driver.o phy.o
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/ixp4xx_crypto.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/ixp4xx_crypto.c 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,851 @@
+/*
+ * ixp4xx_crypto.c - interface to the HW crypto
@@ -1345,9 +1444,10 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/ixp4xx_crypto.c linux-2.6.19/dri
+module_init(init_crypto);
+module_exit(finish_crypto);
+
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/ixp4xx_qmgr.c linux-2.6.19/drivers/net/ixp4xx/ixp4xx_qmgr.c
---- linux-2.6.19.orig/drivers/net/ixp4xx/ixp4xx_qmgr.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/ixp4xx_qmgr.c 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/ixp4xx_qmgr.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/ixp4xx_qmgr.c 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,474 @@
+/*
+ * qmgr.c - reimplementation of the queue configuration interface.
@@ -1823,62 +1923,291 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/ixp4xx_qmgr.c linux-2.6.19/drive
+EXPORT_SYMBOL(queue_set_irq_src);
+EXPORT_SYMBOL(queue_set_watermarks);
+EXPORT_SYMBOL(queue_len);
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/Kconfig linux-2.6.19/drivers/net/ixp4xx/Kconfig
---- linux-2.6.19.orig/drivers/net/ixp4xx/Kconfig 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/Kconfig 2007-01-12 21:54:40.000000000 -0700
-@@ -0,0 +1,48 @@
-+config IXP4XX_QMGR
-+ tristate "IXP4xx Queue Manager support"
-+ depends on ARCH_IXP4XX
-+ depends on NET_ETHERNET
-+ help
-+ The IXP4XX Queue manager is a configurable hardware ringbuffer.
-+ It is used by the NPEs to exchange data from and to the CPU.
-+ You can either use this OR the Intel Access Library (IAL)
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/mac.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/mac.h 2007-02-21 02:24:35.000000000 -0800
+@@ -0,0 +1,275 @@
++/*
++ * Copyright (C) 2002-2006 Christian Hohnstaedt <chohnstaedt@innominate.com>
++ *
++ * This file is released under the GPLv2
++ */
+
-+config IXP4XX_NPE
-+ tristate "IXP4xx NPE support"
-+ depends on ARCH_IXP4XX
-+ depends on NET_ETHERNET
-+ help
-+ The IXP4XX NPE driver supports the 3 CPU co-processors called
-+ "Network Processing Engines" (NPE). It adds support fo downloading
-+ the Microcode (firmware) via Hotplug or character-special-device.
-+ More about this at: Documentation/networking/ixp4xx/README.
-+ You can either use this OR the Intel Access Library (IAL)
++#include <linux/resource.h>
++#include <linux/netdevice.h>
++#include <linux/io.h>
++#include <linux/mii.h>
++#include <linux/workqueue.h>
++#include <asm/hardware.h>
++#include <linux/ixp_qmgr.h>
+
-+config IXP4XX_FW_LOAD
-+ bool "Use Firmware hotplug for Microcode download"
-+ depends on IXP4XX_NPE
-+ select HOTPLUG
-+ select FW_LOADER
-+ help
-+ The default hotplug script will load the Firmware from
-+ /usr/lib/hotplug/firmware/NPE-[ABC]
-+ see Documentation/firmware_class/hotplug-script
++/* 32 bit offsets to be added to u32 *pointers */
++#define MAC_TX_CNTRL1 0x00 // 0x000
++#define MAC_TX_CNTRL2 0x01 // 0x004
++#define MAC_RX_CNTRL1 0x04 // 0x010
++#define MAC_RX_CNTRL2 0x05 // 0x014
++#define MAC_RANDOM_SEED 0x08 // 0x020
++#define MAC_THRESH_P_EMPTY 0x0c // 0x030
++#define MAC_THRESH_P_FULL 0x0e // 0x038
++#define MAC_BUF_SIZE_TX 0x10 // 0x040
++#define MAC_TX_DEFER 0x14 // 0x050
++#define MAC_RX_DEFER 0x15 // 0x054
++#define MAC_TX_TWO_DEFER_1 0x18 // 0x060
++#define MAC_TX_TWO_DEFER_2 0x19 // 0x064
++#define MAC_SLOT_TIME 0x1c // 0x070
++#define MAC_MDIO_CMD 0x20 // 0x080 4 registers 0x20 - 0x23
++#define MAC_MDIO_STS 0x24 // 0x090 4 registers 0x24 - 0x27
++#define MAC_ADDR_MASK 0x28 // 0x0A0 6 registers 0x28 - 0x2d
++#define MAC_ADDR 0x30 // 0x0C0 6 registers 0x30 - 0x35
++#define MAC_INT_CLK_THRESH 0x38 // 0x0E0 1 register
++#define MAC_UNI_ADDR 0x3c // 0x0F0 6 registers 0x3c - 0x41
++#define MAC_CORE_CNTRL 0x7f // 0x1fC
+
-+config IXP4XX_MAC
-+ tristate "IXP4xx MAC support"
-+ depends on IXP4XX_NPE
-+ depends on IXP4XX_QMGR
-+ depends on NET_ETHERNET
-+ select MII
-+ help
-+ The IXP4XX MAC driver supports the MACs on the IXP4XX CPUs.
-+ There are 2 on ixp425 and up to 5 on ixdp465.
-+ You can either use this OR the Intel Access Library (IAL)
++/* TX Control Register 1*/
++
++#define TX_CNTRL1_TX_EN BIT(0)
++#define TX_CNTRL1_DUPLEX BIT(1)
++#define TX_CNTRL1_RETRY BIT(2)
++#define TX_CNTRL1_PAD_EN BIT(3)
++#define TX_CNTRL1_FCS_EN BIT(4)
++#define TX_CNTRL1_2DEFER BIT(5)
++#define TX_CNTRL1_RMII BIT(6)
++
++/* TX Control Register 2 */
++#define TX_CNTRL2_RETRIES_MASK 0xf
++
++/* RX Control Register 1 */
++#define RX_CNTRL1_RX_EN BIT(0)
++#define RX_CNTRL1_PADSTRIP_EN BIT(1)
++#define RX_CNTRL1_CRC_EN BIT(2)
++#define RX_CNTRL1_PAUSE_EN BIT(3)
++#define RX_CNTRL1_LOOP_EN BIT(4)
++#define RX_CNTRL1_ADDR_FLTR_EN BIT(5)
++#define RX_CNTRL1_RX_RUNT_EN BIT(6)
++#define RX_CNTRL1_BCAST_DIS BIT(7)
++
++/* RX Control Register 2 */
++#define RX_CNTRL2_DEFER_EN BIT(0)
++
++/* Core Control Register */
++#define CORE_RESET BIT(0)
++#define CORE_RX_FIFO_FLUSH BIT(1)
++#define CORE_TX_FIFO_FLUSH BIT(2)
++#define CORE_SEND_JAM BIT(3)
++#define CORE_MDC_EN BIT(4)
++
++/* Definitions for MII access routines*/
++
++#define MII_REG_SHL 16
++#define MII_ADDR_SHL 21
++
++#define MII_GO BIT(31)
++#define MII_WRITE BIT(26)
++#define MII_READ_FAIL BIT(31)
++
++#define MII_TIMEOUT_10TH_SECS 5
++#define MII_10TH_SEC_IN_MILLIS 100
+
-+config IXP4XX_CRYPTO
-+ tristate "IXP4xx crypto support"
-+ depends on IXP4XX_NPE
-+ depends on IXP4XX_QMGR
-+ help
-+ This driver is a generic NPE-crypto access layer.
-+ You need additional code in OCF for example.
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/mac_driver.c linux-2.6.19/drivers/net/ixp4xx/mac_driver.c
---- linux-2.6.19.orig/drivers/net/ixp4xx/mac_driver.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/mac_driver.c 2007-01-12 21:54:40.000000000 -0700
-@@ -0,0 +1,849 @@
++/*
++ *
++ * Default values
++ *
++ */
++
++#define MAC_DEF_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK)
++
++#define MAC_TX_CNTRL1_DEFAULT (\
++ TX_CNTRL1_TX_EN | \
++ TX_CNTRL1_RETRY | \
++ TX_CNTRL1_FCS_EN | \
++ TX_CNTRL1_2DEFER | \
++ TX_CNTRL1_PAD_EN )
++
++#define MAC_TX_MAX_RETRIES_DEFAULT 0x0f
++
++#define MAC_RX_CNTRL1_DEFAULT ( \
++ RX_CNTRL1_PADSTRIP_EN | \
++ RX_CNTRL1_CRC_EN | \
++ RX_CNTRL1_RX_EN )
++
++#define MAC_RX_CNTRL2_DEFAULT 0x0
++#define MAC_TX_CNTRL2_DEFAULT TX_CNTRL2_RETRIES_MASK
++
++/* Thresholds determined by NPE firmware FS */
++#define MAC_THRESH_P_EMPTY_DEFAULT 0x12
++#define MAC_THRESH_P_FULL_DEFAULT 0x30
++
++/* Number of bytes that must be in the tx fifo before
++ * transmission commences */
++#define MAC_BUF_SIZE_TX_DEFAULT 0x8
++
++/* One-part deferral values */
++#define MAC_TX_DEFER_DEFAULT 0x15
++#define MAC_RX_DEFER_DEFAULT 0x16
++
++/* Two-part deferral values... */
++#define MAC_TX_TWO_DEFER_1_DEFAULT 0x08
++#define MAC_TX_TWO_DEFER_2_DEFAULT 0x07
++
++/* This value applies to MII */
++#define MAC_SLOT_TIME_DEFAULT 0x80
++
++/* This value applies to RMII */
++#define MAC_SLOT_TIME_RMII_DEFAULT 0xFF
++
++#define MAC_ADDR_MASK_DEFAULT 0xFF
++
++#define MAC_INT_CLK_THRESH_DEFAULT 0x1
++/* The following is a value chosen at random */
++#define MAC_RANDOM_SEED_DEFAULT 0x8
++
++/* By default we must configure the MAC to generate the MDC clock*/
++#define CORE_DEFAULT (CORE_MDC_EN)
++
++/* End of Intel provided register information */
++
++extern int
++mdio_read_register(struct net_device *dev, int phy_addr, int phy_reg);
++extern void
++mdio_write_register(struct net_device *dev, int phy_addr, int phy_reg, int val);
++extern void init_mdio(struct net_device *dev, int phy_id);
++
++struct mac_info {
++ u32 __iomem *addr;
++ struct resource *res;
++ struct device *npe_dev;
++ struct net_device *netdev;
++ struct qm_qmgr *qmgr;
++ struct qm_queue *rxq;
++ struct qm_queue *txq;
++ struct qm_queue *rxdoneq;
++ u32 irqflags;
++ struct net_device_stats stat;
++ struct mii_if_info mii;
++ struct delayed_work mdio_thread;
++ int rxq_pkt;
++ int txq_pkt;
++ int unloading;
++ struct mac_plat_info *plat;
++ int npe_stat_num;
++ spinlock_t rx_lock;
++ u32 msg_enable;
++};
++
++static inline void mac_write_reg(struct mac_info *mac, int offset, u32 val)
++{
++ *(mac->addr + offset) = val;
++}
++static inline u32 mac_read_reg(struct mac_info *mac, int offset)
++{
++ return *(mac->addr + offset);
++}
++static inline void mac_set_regbit(struct mac_info *mac, int offset, u32 bit)
++{
++ mac_write_reg(mac, offset, mac_read_reg(mac, offset) | bit);
++}
++static inline void mac_reset_regbit(struct mac_info *mac, int offset, u32 bit)
++{
++ mac_write_reg(mac, offset, mac_read_reg(mac, offset) & ~bit);
++}
++
++static inline void mac_mdio_cmd_write(struct mac_info *mac, u32 cmd)
++{
++ int i;
++ for(i=0; i<4; i++) {
++ mac_write_reg(mac, MAC_MDIO_CMD + i, cmd & 0xff);
++ cmd >>=8;
++ }
++}
++
++#define mac_mdio_cmd_read(mac) mac_mdio_read((mac), MAC_MDIO_CMD)
++#define mac_mdio_status_read(mac) mac_mdio_read((mac), MAC_MDIO_STS)
++static inline u32 mac_mdio_read(struct mac_info *mac, int offset)
++{
++ int i;
++ u32 data = 0;
++ for(i=0; i<4; i++) {
++ data |= (mac_read_reg(mac, offset + i) & 0xff) << (i*8);
++ }
++ return data;
++}
++
++static inline u32 mdio_cmd(int phy_addr, int phy_reg)
++{
++ return phy_addr << MII_ADDR_SHL |
++ phy_reg << MII_REG_SHL |
++ MII_GO;
++}
++
++#define MAC_REG_LIST { \
++ MAC_TX_CNTRL1, MAC_TX_CNTRL2, \
++ MAC_RX_CNTRL1, MAC_RX_CNTRL2, \
++ MAC_RANDOM_SEED, MAC_THRESH_P_EMPTY, MAC_THRESH_P_FULL, \
++ MAC_BUF_SIZE_TX, MAC_TX_DEFER, MAC_RX_DEFER, \
++ MAC_TX_TWO_DEFER_1, MAC_TX_TWO_DEFER_2, MAC_SLOT_TIME, \
++ MAC_ADDR_MASK +0, MAC_ADDR_MASK +1, MAC_ADDR_MASK +2, \
++ MAC_ADDR_MASK +3, MAC_ADDR_MASK +4, MAC_ADDR_MASK +5, \
++ MAC_ADDR +0, MAC_ADDR +1, MAC_ADDR +2, \
++ MAC_ADDR +3, MAC_ADDR +4, MAC_ADDR +5, \
++ MAC_INT_CLK_THRESH, \
++ MAC_UNI_ADDR +0, MAC_UNI_ADDR +1, MAC_UNI_ADDR +2, \
++ MAC_UNI_ADDR +3, MAC_UNI_ADDR +4, MAC_UNI_ADDR +5, \
++ MAC_CORE_CNTRL \
++}
++
++#define NPE_STAT_NUM 34
++#define NPE_STAT_NUM_BASE 22
++#define NPE_Q_STAT_NUM 4
++
++#define NPE_Q_STAT_STRINGS \
++ {"RX ready to use queue len "}, \
++ {"RX received queue len "}, \
++ {"TX to be send queue len "}, \
++ {"TX done queue len "},
++
++#define NPE_STAT_STRINGS \
++ {"StatsAlignmentErrors "}, \
++ {"StatsFCSErrors "}, \
++ {"StatsInternalMacReceiveErrors "}, \
++ {"RxOverrunDiscards "}, \
++ {"RxLearnedEntryDiscards "}, \
++ {"RxLargeFramesDiscards "}, \
++ {"RxSTPBlockedDiscards "}, \
++ {"RxVLANTypeFilterDiscards "}, \
++ {"RxVLANIdFilterDiscards "}, \
++ {"RxInvalidSourceDiscards "}, \
++ {"RxBlackListDiscards "}, \
++ {"RxWhiteListDiscards "}, \
++ {"RxUnderflowEntryDiscards "}, \
++ {"StatsSingleCollisionFrames "}, \
++ {"StatsMultipleCollisionFrames "}, \
++ {"StatsDeferredTransmissions "}, \
++ {"StatsLateCollisions "}, \
++ {"StatsExcessiveCollsions "}, \
++ {"StatsInternalMacTransmitErrors"}, \
++ {"StatsCarrierSenseErrors "}, \
++ {"TxLargeFrameDiscards "}, \
++ {"TxVLANIdFilterDiscards "}, \
++\
++ {"RxValidFramesTotalOctets "}, \
++ {"RxUcastPkts "}, \
++ {"RxBcastPkts "}, \
++ {"RxMcastPkts "}, \
++ {"RxPkts64Octets "}, \
++ {"RxPkts65to127Octets "}, \
++ {"RxPkts128to255Octets "}, \
++ {"RxPkts256to511Octets "}, \
++ {"RxPkts512to1023Octets "}, \
++ {"RxPkts1024to1518Octets "}, \
++ {"RxInternalNPEReceiveErrors "}, \
++ {"TxInternalNPETransmitErrors "}
++
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/mac_driver.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/mac_driver.c 2007-02-21 02:24:46.000000000 -0800
+@@ -0,0 +1,850 @@
+/*
+ * mac_driver.c - provide a network interface for each MAC
+ *
@@ -2468,10 +2797,11 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/mac_driver.c linux-2.6.19/driver
+ .get_ethtool_stats = ixmac_get_ethtool_stats,
+};
+
-+static void mac_mdio_thread(void *_data)
++static void mac_mdio_thread(struct work_struct *work)
+{
-+ struct net_device *dev = _data;
-+ struct mac_info *mac = netdev_priv(dev);
++ struct mac_info *mac = container_of(work, struct mac_info,
++ mdio_thread.work);
++ struct net_device *dev = mac->netdev;
+
+ media_check(dev, 0);
+ schedule_delayed_work(&mac->mdio_thread, MDIO_INTERVAL);
@@ -2570,7 +2900,7 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/mac_driver.c linux-2.6.19/driver
+
+ init_mdio(dev, plat->phy_id);
+
-+ INIT_WORK(&mac->mdio_thread, mac_mdio_thread, dev);
++ INIT_DELAYED_WORK(&mac->mdio_thread, mac_mdio_thread);
+
+ /* The place of the MAC address is very system dependent.
+ * Here we use a random one to be replaced by one of the
@@ -2728,299 +3058,10 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/mac_driver.c linux-2.6.19/driver
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Christian Hohnstaedt <chohnstaedt@innominate.com>");
+
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/mac.h linux-2.6.19/drivers/net/ixp4xx/mac.h
---- linux-2.6.19.orig/drivers/net/ixp4xx/mac.h 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/mac.h 2007-01-12 21:54:40.000000000 -0700
-@@ -0,0 +1,275 @@
-+/*
-+ * Copyright (C) 2002-2006 Christian Hohnstaedt <chohnstaedt@innominate.com>
-+ *
-+ * This file is released under the GPLv2
-+ */
-+
-+#include <linux/resource.h>
-+#include <linux/netdevice.h>
-+#include <linux/io.h>
-+#include <linux/mii.h>
-+#include <linux/workqueue.h>
-+#include <asm/hardware.h>
-+#include <linux/ixp_qmgr.h>
-+
-+/* 32 bit offsets to be added to u32 *pointers */
-+#define MAC_TX_CNTRL1 0x00 // 0x000
-+#define MAC_TX_CNTRL2 0x01 // 0x004
-+#define MAC_RX_CNTRL1 0x04 // 0x010
-+#define MAC_RX_CNTRL2 0x05 // 0x014
-+#define MAC_RANDOM_SEED 0x08 // 0x020
-+#define MAC_THRESH_P_EMPTY 0x0c // 0x030
-+#define MAC_THRESH_P_FULL 0x0e // 0x038
-+#define MAC_BUF_SIZE_TX 0x10 // 0x040
-+#define MAC_TX_DEFER 0x14 // 0x050
-+#define MAC_RX_DEFER 0x15 // 0x054
-+#define MAC_TX_TWO_DEFER_1 0x18 // 0x060
-+#define MAC_TX_TWO_DEFER_2 0x19 // 0x064
-+#define MAC_SLOT_TIME 0x1c // 0x070
-+#define MAC_MDIO_CMD 0x20 // 0x080 4 registers 0x20 - 0x23
-+#define MAC_MDIO_STS 0x24 // 0x090 4 registers 0x24 - 0x27
-+#define MAC_ADDR_MASK 0x28 // 0x0A0 6 registers 0x28 - 0x2d
-+#define MAC_ADDR 0x30 // 0x0C0 6 registers 0x30 - 0x35
-+#define MAC_INT_CLK_THRESH 0x38 // 0x0E0 1 register
-+#define MAC_UNI_ADDR 0x3c // 0x0F0 6 registers 0x3c - 0x41
-+#define MAC_CORE_CNTRL 0x7f // 0x1fC
-+
-+/* TX Control Register 1*/
-+
-+#define TX_CNTRL1_TX_EN BIT(0)
-+#define TX_CNTRL1_DUPLEX BIT(1)
-+#define TX_CNTRL1_RETRY BIT(2)
-+#define TX_CNTRL1_PAD_EN BIT(3)
-+#define TX_CNTRL1_FCS_EN BIT(4)
-+#define TX_CNTRL1_2DEFER BIT(5)
-+#define TX_CNTRL1_RMII BIT(6)
-+
-+/* TX Control Register 2 */
-+#define TX_CNTRL2_RETRIES_MASK 0xf
-+
-+/* RX Control Register 1 */
-+#define RX_CNTRL1_RX_EN BIT(0)
-+#define RX_CNTRL1_PADSTRIP_EN BIT(1)
-+#define RX_CNTRL1_CRC_EN BIT(2)
-+#define RX_CNTRL1_PAUSE_EN BIT(3)
-+#define RX_CNTRL1_LOOP_EN BIT(4)
-+#define RX_CNTRL1_ADDR_FLTR_EN BIT(5)
-+#define RX_CNTRL1_RX_RUNT_EN BIT(6)
-+#define RX_CNTRL1_BCAST_DIS BIT(7)
-+
-+/* RX Control Register 2 */
-+#define RX_CNTRL2_DEFER_EN BIT(0)
-+
-+/* Core Control Register */
-+#define CORE_RESET BIT(0)
-+#define CORE_RX_FIFO_FLUSH BIT(1)
-+#define CORE_TX_FIFO_FLUSH BIT(2)
-+#define CORE_SEND_JAM BIT(3)
-+#define CORE_MDC_EN BIT(4)
-+
-+/* Definitions for MII access routines*/
-+
-+#define MII_REG_SHL 16
-+#define MII_ADDR_SHL 21
-+
-+#define MII_GO BIT(31)
-+#define MII_WRITE BIT(26)
-+#define MII_READ_FAIL BIT(31)
-+
-+#define MII_TIMEOUT_10TH_SECS 5
-+#define MII_10TH_SEC_IN_MILLIS 100
-+
-+/*
-+ *
-+ * Default values
-+ *
-+ */
-+
-+#define MAC_DEF_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK)
-+
-+#define MAC_TX_CNTRL1_DEFAULT (\
-+ TX_CNTRL1_TX_EN | \
-+ TX_CNTRL1_RETRY | \
-+ TX_CNTRL1_FCS_EN | \
-+ TX_CNTRL1_2DEFER | \
-+ TX_CNTRL1_PAD_EN )
-+
-+#define MAC_TX_MAX_RETRIES_DEFAULT 0x0f
-+
-+#define MAC_RX_CNTRL1_DEFAULT ( \
-+ RX_CNTRL1_PADSTRIP_EN | \
-+ RX_CNTRL1_CRC_EN | \
-+ RX_CNTRL1_RX_EN )
-+
-+#define MAC_RX_CNTRL2_DEFAULT 0x0
-+#define MAC_TX_CNTRL2_DEFAULT TX_CNTRL2_RETRIES_MASK
-+
-+/* Thresholds determined by NPE firmware FS */
-+#define MAC_THRESH_P_EMPTY_DEFAULT 0x12
-+#define MAC_THRESH_P_FULL_DEFAULT 0x30
-+
-+/* Number of bytes that must be in the tx fifo before
-+ * transmission commences */
-+#define MAC_BUF_SIZE_TX_DEFAULT 0x8
-+
-+/* One-part deferral values */
-+#define MAC_TX_DEFER_DEFAULT 0x15
-+#define MAC_RX_DEFER_DEFAULT 0x16
-+
-+/* Two-part deferral values... */
-+#define MAC_TX_TWO_DEFER_1_DEFAULT 0x08
-+#define MAC_TX_TWO_DEFER_2_DEFAULT 0x07
-+
-+/* This value applies to MII */
-+#define MAC_SLOT_TIME_DEFAULT 0x80
-+
-+/* This value applies to RMII */
-+#define MAC_SLOT_TIME_RMII_DEFAULT 0xFF
-+
-+#define MAC_ADDR_MASK_DEFAULT 0xFF
-+
-+#define MAC_INT_CLK_THRESH_DEFAULT 0x1
-+/* The following is a value chosen at random */
-+#define MAC_RANDOM_SEED_DEFAULT 0x8
-+
-+/* By default we must configure the MAC to generate the MDC clock*/
-+#define CORE_DEFAULT (CORE_MDC_EN)
-+
-+/* End of Intel provided register information */
-+
-+extern int
-+mdio_read_register(struct net_device *dev, int phy_addr, int phy_reg);
-+extern void
-+mdio_write_register(struct net_device *dev, int phy_addr, int phy_reg, int val);
-+extern void init_mdio(struct net_device *dev, int phy_id);
-+
-+struct mac_info {
-+ u32 __iomem *addr;
-+ struct resource *res;
-+ struct device *npe_dev;
-+ struct net_device *netdev;
-+ struct qm_qmgr *qmgr;
-+ struct qm_queue *rxq;
-+ struct qm_queue *txq;
-+ struct qm_queue *rxdoneq;
-+ u32 irqflags;
-+ struct net_device_stats stat;
-+ struct mii_if_info mii;
-+ struct work_struct mdio_thread;
-+ int rxq_pkt;
-+ int txq_pkt;
-+ int unloading;
-+ struct mac_plat_info *plat;
-+ int npe_stat_num;
-+ spinlock_t rx_lock;
-+ u32 msg_enable;
-+};
-+
-+static inline void mac_write_reg(struct mac_info *mac, int offset, u32 val)
-+{
-+ *(mac->addr + offset) = val;
-+}
-+static inline u32 mac_read_reg(struct mac_info *mac, int offset)
-+{
-+ return *(mac->addr + offset);
-+}
-+static inline void mac_set_regbit(struct mac_info *mac, int offset, u32 bit)
-+{
-+ mac_write_reg(mac, offset, mac_read_reg(mac, offset) | bit);
-+}
-+static inline void mac_reset_regbit(struct mac_info *mac, int offset, u32 bit)
-+{
-+ mac_write_reg(mac, offset, mac_read_reg(mac, offset) & ~bit);
-+}
-+
-+static inline void mac_mdio_cmd_write(struct mac_info *mac, u32 cmd)
-+{
-+ int i;
-+ for(i=0; i<4; i++) {
-+ mac_write_reg(mac, MAC_MDIO_CMD + i, cmd & 0xff);
-+ cmd >>=8;
-+ }
-+}
-+
-+#define mac_mdio_cmd_read(mac) mac_mdio_read((mac), MAC_MDIO_CMD)
-+#define mac_mdio_status_read(mac) mac_mdio_read((mac), MAC_MDIO_STS)
-+static inline u32 mac_mdio_read(struct mac_info *mac, int offset)
-+{
-+ int i;
-+ u32 data = 0;
-+ for(i=0; i<4; i++) {
-+ data |= (mac_read_reg(mac, offset + i) & 0xff) << (i*8);
-+ }
-+ return data;
-+}
-+
-+static inline u32 mdio_cmd(int phy_addr, int phy_reg)
-+{
-+ return phy_addr << MII_ADDR_SHL |
-+ phy_reg << MII_REG_SHL |
-+ MII_GO;
-+}
-+
-+#define MAC_REG_LIST { \
-+ MAC_TX_CNTRL1, MAC_TX_CNTRL2, \
-+ MAC_RX_CNTRL1, MAC_RX_CNTRL2, \
-+ MAC_RANDOM_SEED, MAC_THRESH_P_EMPTY, MAC_THRESH_P_FULL, \
-+ MAC_BUF_SIZE_TX, MAC_TX_DEFER, MAC_RX_DEFER, \
-+ MAC_TX_TWO_DEFER_1, MAC_TX_TWO_DEFER_2, MAC_SLOT_TIME, \
-+ MAC_ADDR_MASK +0, MAC_ADDR_MASK +1, MAC_ADDR_MASK +2, \
-+ MAC_ADDR_MASK +3, MAC_ADDR_MASK +4, MAC_ADDR_MASK +5, \
-+ MAC_ADDR +0, MAC_ADDR +1, MAC_ADDR +2, \
-+ MAC_ADDR +3, MAC_ADDR +4, MAC_ADDR +5, \
-+ MAC_INT_CLK_THRESH, \
-+ MAC_UNI_ADDR +0, MAC_UNI_ADDR +1, MAC_UNI_ADDR +2, \
-+ MAC_UNI_ADDR +3, MAC_UNI_ADDR +4, MAC_UNI_ADDR +5, \
-+ MAC_CORE_CNTRL \
-+}
-+
-+#define NPE_STAT_NUM 34
-+#define NPE_STAT_NUM_BASE 22
-+#define NPE_Q_STAT_NUM 4
-+
-+#define NPE_Q_STAT_STRINGS \
-+ {"RX ready to use queue len "}, \
-+ {"RX received queue len "}, \
-+ {"TX to be send queue len "}, \
-+ {"TX done queue len "},
-+
-+#define NPE_STAT_STRINGS \
-+ {"StatsAlignmentErrors "}, \
-+ {"StatsFCSErrors "}, \
-+ {"StatsInternalMacReceiveErrors "}, \
-+ {"RxOverrunDiscards "}, \
-+ {"RxLearnedEntryDiscards "}, \
-+ {"RxLargeFramesDiscards "}, \
-+ {"RxSTPBlockedDiscards "}, \
-+ {"RxVLANTypeFilterDiscards "}, \
-+ {"RxVLANIdFilterDiscards "}, \
-+ {"RxInvalidSourceDiscards "}, \
-+ {"RxBlackListDiscards "}, \
-+ {"RxWhiteListDiscards "}, \
-+ {"RxUnderflowEntryDiscards "}, \
-+ {"StatsSingleCollisionFrames "}, \
-+ {"StatsMultipleCollisionFrames "}, \
-+ {"StatsDeferredTransmissions "}, \
-+ {"StatsLateCollisions "}, \
-+ {"StatsExcessiveCollsions "}, \
-+ {"StatsInternalMacTransmitErrors"}, \
-+ {"StatsCarrierSenseErrors "}, \
-+ {"TxLargeFrameDiscards "}, \
-+ {"TxVLANIdFilterDiscards "}, \
-+\
-+ {"RxValidFramesTotalOctets "}, \
-+ {"RxUcastPkts "}, \
-+ {"RxBcastPkts "}, \
-+ {"RxMcastPkts "}, \
-+ {"RxPkts64Octets "}, \
-+ {"RxPkts65to127Octets "}, \
-+ {"RxPkts128to255Octets "}, \
-+ {"RxPkts256to511Octets "}, \
-+ {"RxPkts512to1023Octets "}, \
-+ {"RxPkts1024to1518Octets "}, \
-+ {"RxInternalNPEReceiveErrors "}, \
-+ {"TxInternalNPETransmitErrors "}
-+
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/Makefile linux-2.6.19/drivers/net/ixp4xx/Makefile
---- linux-2.6.19.orig/drivers/net/ixp4xx/Makefile 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/Makefile 2007-01-12 21:54:40.000000000 -0700
-@@ -0,0 +1,7 @@
-+obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
-+obj-$(CONFIG_IXP4XX_NPE) += ixp4xx_npe.o
-+obj-$(CONFIG_IXP4XX_MAC) += ixp4xx_mac.o
-+obj-$(CONFIG_IXP4XX_CRYPTO) += ixp4xx_crypto.o
-+
-+ixp4xx_npe-objs := ucode_dl.o npe_mh.o npe.o
-+ixp4xx_mac-objs := mac_driver.o phy.o
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/npe.c linux-2.6.19/drivers/net/ixp4xx/npe.c
---- linux-2.6.19.orig/drivers/net/ixp4xx/npe.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/npe.c 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/npe.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/npe.c 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,291 @@
+
+#include <linux/ixp_npe.h>
@@ -3313,9 +3354,10 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/npe.c linux-2.6.19/drivers/net/i
+EXPORT_SYMBOL(npe_stop);
+EXPORT_SYMBOL(npe_start);
+EXPORT_SYMBOL(npe_reset);
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/npe_mh.c linux-2.6.19/drivers/net/ixp4xx/npe_mh.c
---- linux-2.6.19.orig/drivers/net/ixp4xx/npe_mh.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/npe_mh.c 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/npe_mh.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/npe_mh.c 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,170 @@
+/*
+ * npe_mh.c - NPE message handler.
@@ -3487,9 +3529,10 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/npe_mh.c linux-2.6.19/drivers/ne
+EXPORT_SYMBOL(npe_mh_set_rxqid);
+EXPORT_SYMBOL(npe_mh_npe_loopback_mode);
+EXPORT_SYMBOL(npe_mh_get_stats);
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/phy.c linux-2.6.19/drivers/net/ixp4xx/phy.c
---- linux-2.6.19.orig/drivers/net/ixp4xx/phy.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/phy.c 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/phy.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/phy.c 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,113 @@
+/*
+ * phy.c - MDIO functions and mii initialisation
@@ -3604,9 +3647,10 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/phy.c linux-2.6.19/drivers/net/i
+ mac->mii.mdio_write = mdio_write_register;
+}
+
-diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/ucode_dl.c linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
---- linux-2.6.19.orig/drivers/net/ixp4xx/ucode_dl.c 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/drivers/net/ixp4xx/ucode_dl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/drivers/net/ixp4xx/ucode_dl.c 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,479 @@
+/*
+ * ucode_dl.c - provide an NPE device and a char-dev for microcode download
@@ -4087,32 +4131,10 @@ diff -Naur linux-2.6.19.orig/drivers/net/ixp4xx/ucode_dl.c linux-2.6.19/drivers/
+
+EXPORT_SYMBOL(get_npe_by_id);
+EXPORT_SYMBOL(return_npe_dev);
-diff -Naur linux-2.6.19.orig/drivers/net/Kconfig linux-2.6.19/drivers/net/Kconfig
---- linux-2.6.19.orig/drivers/net/Kconfig 2006-11-29 14:57:37.000000000 -0700
-+++ linux-2.6.19/drivers/net/Kconfig 2007-01-12 21:54:40.000000000 -0700
-@@ -190,6 +190,8 @@
-
- source "drivers/net/arm/Kconfig"
-
-+source "drivers/net/ixp4xx/Kconfig"
-+
- config MACE
- tristate "MACE (Power Mac ethernet) support"
- depends on NET_ETHERNET && PPC_PMAC && PPC32
-diff -Naur linux-2.6.19.orig/drivers/net/Makefile linux-2.6.19/drivers/net/Makefile
---- linux-2.6.19.orig/drivers/net/Makefile 2006-11-29 14:57:37.000000000 -0700
-+++ linux-2.6.19/drivers/net/Makefile 2007-01-12 21:54:40.000000000 -0700
-@@ -209,6 +209,7 @@
- obj-$(CONFIG_IRDA) += irda/
- obj-$(CONFIG_ETRAX_ETHERNET) += cris/
- obj-$(CONFIG_ENP2611_MSF_NET) += ixp2000/
-+obj-$(CONFIG_IXP4XX_NPE) += ixp4xx/
-
- obj-$(CONFIG_NETCONSOLE) += netconsole.o
-
-diff -Naur linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h linux-2.6.19/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
---- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2006-11-29 14:57:37.000000000 -0700
-+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+===================================================================
+--- linux-2.6.21-rc1-arm.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2007-02-21 02:24:18.000000000 -0800
++++ linux-2.6.21-rc1-arm/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2007-02-21 02:24:35.000000000 -0800
@@ -22,6 +22,8 @@
#ifndef _ASM_ARM_IXP4XX_H_
#define _ASM_ARM_IXP4XX_H_
@@ -4214,9 +4236,10 @@ diff -Naur linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h linux-2.6
#endif
#endif
-diff -Naur linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/npe_regs.h linux-2.6.19/include/asm-arm/arch-ixp4xx/npe_regs.h
---- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/npe_regs.h 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/npe_regs.h 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/include/asm-arm/arch-ixp4xx/npe_regs.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/include/asm-arm/arch-ixp4xx/npe_regs.h 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,82 @@
+#ifndef NPE_REGS_H
+#define NPE_REGS_H
@@ -4300,12 +4323,13 @@ diff -Naur linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/npe_regs.h linux-2.6.19
+
+#endif
+
-diff -Naur linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/platform.h linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
---- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/platform.h 2006-11-29 14:57:37.000000000 -0700
-+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h 2007-01-12 21:54:40.000000000 -0700
-@@ -89,6 +89,25 @@
-
- struct sys_timer;
+Index: linux-2.6.21-rc1-arm/include/asm-arm/arch-ixp4xx/platform.h
+===================================================================
+--- linux-2.6.21-rc1-arm.orig/include/asm-arm/arch-ixp4xx/platform.h 2007-02-21 02:24:18.000000000 -0800
++++ linux-2.6.21-rc1-arm/include/asm-arm/arch-ixp4xx/platform.h 2007-02-21 02:24:35.000000000 -0800
+@@ -86,6 +86,25 @@
+ unsigned long scl_pin;
+ };
+struct npe_plat_data {
+ const char *name;
@@ -4327,11 +4351,12 @@ diff -Naur linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/platform.h linux-2.6.19
+};
+
/*
- * Frequency of clock used for primary clocksource
- */
-diff -Naur linux-2.6.19.orig/include/linux/ixp_crypto.h linux-2.6.19/include/linux/ixp_crypto.h
---- linux-2.6.19.orig/include/linux/ixp_crypto.h 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/include/linux/ixp_crypto.h 2007-01-12 21:54:40.000000000 -0700
+ * This structure provide a means for the board setup code
+ * to give information to th pata_ixp4xx driver. It is
+Index: linux-2.6.21-rc1-arm/include/linux/ixp_crypto.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/include/linux/ixp_crypto.h 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,192 @@
+
+#ifndef IX_CRYPTO_H
@@ -4525,9 +4550,10 @@ diff -Naur linux-2.6.19.orig/include/linux/ixp_crypto.h linux-2.6.19/include/lin
+ const struct ix_hash_algo *auth, int len);
+
+#endif
-diff -Naur linux-2.6.19.orig/include/linux/ixp_npe.h linux-2.6.19/include/linux/ixp_npe.h
---- linux-2.6.19.orig/include/linux/ixp_npe.h 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/include/linux/ixp_npe.h 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/include/linux/ixp_npe.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/include/linux/ixp_npe.h 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2006 Christian Hohnstaedt <chohnstaedt@innominate.com>
@@ -4646,9 +4672,10 @@ diff -Naur linux-2.6.19.orig/include/linux/ixp_npe.h linux-2.6.19/include/linux/
+npe_mh_get_stats(struct npe_info *npe, struct mac_plat_info *mp, u32 phys, int reset);
+
+#endif
-diff -Naur linux-2.6.19.orig/include/linux/ixp_qmgr.h linux-2.6.19/include/linux/ixp_qmgr.h
---- linux-2.6.19.orig/include/linux/ixp_qmgr.h 1969-12-31 17:00:00.000000000 -0700
-+++ linux-2.6.19/include/linux/ixp_qmgr.h 2007-01-12 21:54:40.000000000 -0700
+Index: linux-2.6.21-rc1-arm/include/linux/ixp_qmgr.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/include/linux/ixp_qmgr.h 2007-02-21 02:24:35.000000000 -0800
@@ -0,0 +1,202 @@
+/*
+ * Copyright (C) 2006 Christian Hohnstaedt <chohnstaedt@innominate.com>
diff --git a/target/linux/ixp4xx-2.6/patches/102-nslu2_led_swap.patch b/target/linux/ixp4xx-2.6/patches/102-nslu2_led_swap.patch
deleted file mode 100644
index f6ea98bbd3..0000000000
--- a/target/linux/ixp4xx-2.6/patches/102-nslu2_led_swap.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Submitted as http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3984/1
-
-This patch fixes an error in the numbering of the disk LEDs on the
-Linksys NSLU2. The error crept in because the physical location
-of the LEDs has the Disk 2 LED *above* the Disk 1 LED.
-
-Thanks to Gordon Farquharson for reporting this.
-
-Signed-off-by: Rod Whitby <rod@whitby.id.au>
-
-PATCH FOLLOWS
-KernelVersion: 2.6.19
-
-Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/nslu2.h
-===================================================================
---- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/nslu2.h
-+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/nslu2.h
-@@ -76,6 +76,7 @@
-
- #define NSLU2_GPIO_BUZZ 4
- #define NSLU2_BZ_BM (1L << NSLU2_GPIO_BUZZ)
-+
- /* LEDs */
-
- #define NSLU2_LED_RED NSLU2_GPIO0
-@@ -84,8 +85,8 @@
- #define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED)
- #define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN)
-
--#define NSLU2_LED_DISK1 NSLU2_GPIO2
--#define NSLU2_LED_DISK2 NSLU2_GPIO3
-+#define NSLU2_LED_DISK1 NSLU2_GPIO3
-+#define NSLU2_LED_DISK2 NSLU2_GPIO2
-
- #define NSLU2_LED_DISK1_BM (1L << NSLU2_GPIO2)
- #define NSLU2_LED_DISK2_BM (1L << NSLU2_GPIO3)
diff --git a/target/linux/ixp4xx-2.6/patches/110-ixp4xx_net_driver_fix_mac_handling.patch b/target/linux/ixp4xx-2.6/patches/110-ixp4xx_net_driver_fix_mac_handling.patch
new file mode 100644
index 0000000000..1050702d88
--- /dev/null
+++ b/target/linux/ixp4xx-2.6/patches/110-ixp4xx_net_driver_fix_mac_handling.patch
@@ -0,0 +1,17 @@
+---
+ drivers/net/ixp4xx/mac_driver.c | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+Index: linux-2.6.21-rc4-git6-arm/drivers/net/ixp4xx/mac_driver.c
+===================================================================
+--- linux-2.6.21-rc4-git6-arm.orig/drivers/net/ixp4xx/mac_driver.c 2007-03-22 10:32:20.735684085 +0000
++++ linux-2.6.21-rc4-git6-arm/drivers/net/ixp4xx/mac_driver.c 2007-03-22 10:33:29.355972584 +0000
+@@ -842,7 +842,7 @@
+ }
+ }
+
+-module_init(init_mac);
++late_initcall(init_mac);
+ module_exit(finish_mac);
+
+ MODULE_LICENSE("GPL");
diff --git a/target/linux/ixp4xx-2.6/patches/133-ixp4xx_net_driver_improve_mac_handling.patch b/target/linux/ixp4xx-2.6/patches/133-ixp4xx_net_driver_improve_mac_handling.patch
deleted file mode 100644
index d632b3045b..0000000000
--- a/target/linux/ixp4xx-2.6/patches/133-ixp4xx_net_driver_improve_mac_handling.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff -Naupr a/drivers/net/ixp4xx/mac_driver.c b/drivers/net/ixp4xx/mac_driver.c
---- a/drivers/net/ixp4xx/mac_driver.c 2007-01-12 21:54:40.000000000 -0700
-+++ b/drivers/net/ixp4xx/mac_driver.c 2007-01-12 22:27:18.000000000 -0700
-@@ -350,6 +350,16 @@ static int ixmac_open (struct net_device
- mac->npe_stat_num = i<NPE_STAT_NUM ? NPE_STAT_NUM_BASE : NPE_STAT_NUM;
- mac->npe_stat_num += NPE_Q_STAT_NUM;
-
-+ /* Only use platform or random if there's currently no device hw addr */
-+ if (is_zero_ether_addr(dev->dev_addr)) {
-+ if (is_zero_ether_addr(mac->plat->hwaddr)) {
-+ random_ether_addr(dev->dev_addr);
-+ dev->dev_addr[5] = mac->plat->phy_id;
-+ }
-+ else
-+ memcpy(dev->dev_addr, mac->plat->hwaddr, 6);
-+ }
-+
- mac_set_uniaddr(dev);
- media_check(dev, 1);
- ixmac_set_rx_mode(dev);
-@@ -691,20 +701,6 @@ static int mac_probe(struct platform_dev
-
- INIT_WORK(&mac->mdio_thread, mac_mdio_thread, dev);
-
-- /* The place of the MAC address is very system dependent.
-- * Here we use a random one to be replaced by one of the
-- * following commands:
-- * "ip link set address 02:03:04:04:04:01 dev eth0"
-- * "ifconfig eth0 hw ether 02:03:04:04:04:07"
-- */
--
-- if (is_zero_ether_addr(plat->hwaddr)) {
-- random_ether_addr(dev->dev_addr);
-- dev->dev_addr[5] = plat->phy_id;
-- }
-- else
-- memcpy(dev->dev_addr, plat->hwaddr, 6);
--
- printk(KERN_INFO IXMAC_NAME " driver " IXMAC_VERSION
- ": %s on %s with PHY[%d] initialized\n",
- dev->name, npe->plat->name, plat->phy_id);
diff --git a/target/linux/ixp4xx-2.6/patches/139-ixp4xx_net_driver_mtd_load_fw.patch b/target/linux/ixp4xx-2.6/patches/139-ixp4xx_net_driver_mtd_load_fw.patch
index 0f81a0a0ed..46ba858f1c 100644
--- a/target/linux/ixp4xx-2.6/patches/139-ixp4xx_net_driver_mtd_load_fw.patch
+++ b/target/linux/ixp4xx-2.6/patches/139-ixp4xx_net_driver_mtd_load_fw.patch
@@ -1,7 +1,17 @@
-diff -Naupr a/drivers/net/ixp4xx/Kconfig b/drivers/net/ixp4xx/Kconfig
---- a/drivers/net/ixp4xx/Kconfig 2007-01-12 21:54:40.000000000 -0700
-+++ b/drivers/net/ixp4xx/Kconfig 2007-01-12 23:28:50.000000000 -0700
-@@ -11,6 +11,7 @@ config IXP4XX_NPE
+---
+ drivers/net/ixp4xx/Kconfig | 10 +
+ drivers/net/ixp4xx/Makefile | 1
+ drivers/net/ixp4xx/npe_ucode.c | 185 +++++++++++++++++++++++++++++++++
+ drivers/net/ixp4xx/ucode_dl.c | 43 ++++---
+ include/asm-arm/arch-ixp4xx/platform.h | 19 +++
+ include/linux/ixp_npe.h | 1
+ 6 files changed, 239 insertions(+), 20 deletions(-)
+
+Index: linux-2.6.20-rc3/drivers/net/ixp4xx/Kconfig
+===================================================================
+--- linux-2.6.20-rc3.orig/drivers/net/ixp4xx/Kconfig
++++ linux-2.6.20-rc3/drivers/net/ixp4xx/Kconfig
+@@ -11,6 +11,7 @@
tristate "IXP4xx NPE support"
depends on ARCH_IXP4XX
depends on NET_ETHERNET
@@ -9,7 +19,7 @@ diff -Naupr a/drivers/net/ixp4xx/Kconfig b/drivers/net/ixp4xx/Kconfig
help
The IXP4XX NPE driver supports the 3 CPU co-processors called
"Network Processing Engines" (NPE). It adds support fo downloading
-@@ -18,7 +19,7 @@ config IXP4XX_NPE
+@@ -18,7 +19,7 @@
More about this at: Documentation/networking/ixp4xx/README.
You can either use this OR the Intel Access Library (IAL)
@@ -18,7 +28,7 @@ diff -Naupr a/drivers/net/ixp4xx/Kconfig b/drivers/net/ixp4xx/Kconfig
bool "Use Firmware hotplug for Microcode download"
depends on IXP4XX_NPE
select HOTPLUG
-@@ -28,6 +29,13 @@ config IXP4XX_FW_LOAD
+@@ -28,6 +29,13 @@
/usr/lib/hotplug/firmware/NPE-[ABC]
see Documentation/firmware_class/hotplug-script
@@ -32,9 +42,10 @@ diff -Naupr a/drivers/net/ixp4xx/Kconfig b/drivers/net/ixp4xx/Kconfig
config IXP4XX_MAC
tristate "IXP4xx MAC support"
depends on IXP4XX_NPE
-diff -Naupr a/drivers/net/ixp4xx/Makefile b/drivers/net/ixp4xx/Makefile
---- a/drivers/net/ixp4xx/Makefile 2007-01-12 21:54:40.000000000 -0700
-+++ b/drivers/net/ixp4xx/Makefile 2007-01-12 23:28:50.000000000 -0700
+Index: linux-2.6.20-rc3/drivers/net/ixp4xx/Makefile
+===================================================================
+--- linux-2.6.20-rc3.orig/drivers/net/ixp4xx/Makefile
++++ linux-2.6.20-rc3/drivers/net/ixp4xx/Makefile
@@ -1,5 +1,6 @@
obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
obj-$(CONFIG_IXP4XX_NPE) += ixp4xx_npe.o
@@ -42,9 +53,10 @@ diff -Naupr a/drivers/net/ixp4xx/Makefile b/drivers/net/ixp4xx/Makefile
obj-$(CONFIG_IXP4XX_MAC) += ixp4xx_mac.o
obj-$(CONFIG_IXP4XX_CRYPTO) += ixp4xx_crypto.o
-diff -Naupr a/drivers/net/ixp4xx/npe_ucode.c b/drivers/net/ixp4xx/npe_ucode.c
---- a/drivers/net/ixp4xx/npe_ucode.c 1969-12-31 17:00:00.000000000 -0700
-+++ b/drivers/net/ixp4xx/npe_ucode.c 2007-01-12 23:28:50.000000000 -0700
+Index: linux-2.6.20-rc3/drivers/net/ixp4xx/npe_ucode.c
+===================================================================
+--- /dev/null
++++ linux-2.6.20-rc3/drivers/net/ixp4xx/npe_ucode.c
@@ -0,0 +1,185 @@
+/*
+ * Provide an NPE platform device for microcode handling
@@ -231,9 +243,10 @@ diff -Naupr a/drivers/net/ixp4xx/npe_ucode.c b/drivers/net/ixp4xx/npe_ucode.c
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
-diff -Naupr a/drivers/net/ixp4xx/ucode_dl.c b/drivers/net/ixp4xx/ucode_dl.c
---- a/drivers/net/ixp4xx/ucode_dl.c 2007-01-12 21:54:40.000000000 -0700
-+++ b/drivers/net/ixp4xx/ucode_dl.c 2007-01-12 23:28:50.000000000 -0700
+Index: linux-2.6.20-rc3/drivers/net/ixp4xx/ucode_dl.c
+===================================================================
+--- linux-2.6.20-rc3.orig/drivers/net/ixp4xx/ucode_dl.c
++++ linux-2.6.20-rc3/drivers/net/ixp4xx/ucode_dl.c
@@ -16,6 +16,7 @@
#include <linux/firmware.h>
#include <linux/dma-mapping.h>
@@ -255,7 +268,7 @@ diff -Naupr a/drivers/net/ixp4xx/ucode_dl.c b/drivers/net/ixp4xx/ucode_dl.c
#define EOF_BLOCK 0xf
#define IMG_SIZE(image) (((image)->size * sizeof(u32)) + \
sizeof(struct dl_image))
-@@ -38,21 +45,6 @@ enum blk_type {
+@@ -38,21 +45,6 @@
data,
};
@@ -277,7 +290,7 @@ diff -Naupr a/drivers/net/ixp4xx/ucode_dl.c b/drivers/net/ixp4xx/ucode_dl.c
struct dl_codeblock {
u32 npe_addr;
u32 size;
-@@ -127,20 +119,33 @@ download_block(struct npe_info *npe, str
+@@ -127,20 +119,33 @@
return 0;
}
@@ -313,7 +326,7 @@ diff -Naupr a/drivers/net/ixp4xx/ucode_dl.c b/drivers/net/ixp4xx/ucode_dl.c
npe = dev_get_drvdata(dev);
if (npe->loaded && (npe->usage > 0)) {
printk(KERN_INFO "Cowardly refusing to reload an Image "
-@@ -267,8 +272,7 @@ static ssize_t ucode_write(struct file *
+@@ -267,8 +272,7 @@
static void npe_firmware_probe(struct device *dev)
{
@@ -323,17 +336,18 @@ diff -Naupr a/drivers/net/ixp4xx/ucode_dl.c b/drivers/net/ixp4xx/ucode_dl.c
const struct firmware *fw_entry;
struct npe_info *npe = dev_get_drvdata(dev);
struct dl_image *image;
-@@ -477,3 +481,4 @@ MODULE_AUTHOR("Christian Hohnstaedt <cho
+@@ -477,3 +481,4 @@
EXPORT_SYMBOL(get_npe_by_id);
EXPORT_SYMBOL(return_npe_dev);
+EXPORT_SYMBOL(store_npe_image);
-diff -Naupr a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h
---- a/include/asm-arm/arch-ixp4xx/platform.h 2007-01-12 21:54:40.000000000 -0700
-+++ b/include/asm-arm/arch-ixp4xx/platform.h 2007-01-12 23:28:50.000000000 -0700
-@@ -89,6 +89,21 @@ struct ixp4xx_i2c_pins {
-
- struct sys_timer;
+Index: linux-2.6.20-rc3/include/asm-arm/arch-ixp4xx/platform.h
+===================================================================
+--- linux-2.6.20-rc3.orig/include/asm-arm/arch-ixp4xx/platform.h
++++ linux-2.6.20-rc3/include/asm-arm/arch-ixp4xx/platform.h
+@@ -86,6 +86,21 @@
+ unsigned long scl_pin;
+ };
+struct dl_block {
+ u32 type;
@@ -353,7 +367,7 @@ diff -Naupr a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4
struct npe_plat_data {
const char *name;
int data_size;
-@@ -108,6 +123,10 @@ struct mac_plat_info {
+@@ -105,6 +120,10 @@
};
@@ -362,12 +376,13 @@ diff -Naupr a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4
+};
+
/*
- * Frequency of clock used for primary clocksource
- */
-diff -Naupr a/include/linux/ixp_npe.h b/include/linux/ixp_npe.h
---- a/include/linux/ixp_npe.h 2007-01-12 21:54:40.000000000 -0700
-+++ b/include/linux/ixp_npe.h 2007-01-12 23:28:50.000000000 -0700
-@@ -99,6 +99,7 @@ extern void npe_reset(struct npe_info *n
+ * This structure provide a means for the board setup code
+ * to give information to th pata_ixp4xx driver. It is
+Index: linux-2.6.20-rc3/include/linux/ixp_npe.h
+===================================================================
+--- linux-2.6.20-rc3.orig/include/linux/ixp_npe.h
++++ linux-2.6.20-rc3/include/linux/ixp_npe.h
+@@ -99,6 +99,7 @@
extern struct device *get_npe_by_id(int id);
extern void return_npe_dev(struct device *dev);
diff --git a/target/linux/ixp4xx-2.6/patches/500-compex.patch b/target/linux/ixp4xx-2.6/patches/500-compex.patch
index 7d5d56ab69..854194b35f 100644
--- a/target/linux/ixp4xx-2.6/patches/500-compex.patch
+++ b/target/linux/ixp4xx-2.6/patches/500-compex.patch
@@ -129,8 +129,8 @@ diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/ixdp425-pci.c linux-2.6.19.2-owrt/
int __init ixdp425_pci_init(void)
{
if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
-- machine_is_avila() || machine_is_ixdp465())
-+ machine_is_avila() || machine_is_ixdp465() || machine_is_compex())
+- machine_is_ixdp465())
++ machine_is_ixdp465() || machine_is_compex())
pci_common_init(&ixdp425_pci);
return 0;
}
@@ -173,8 +173,12 @@ diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/Makefile linux-2.6.19.2-owrt/arch/
diff -Nur linux-2.6.19.2/arch/arm/tools/mach-types linux-2.6.19.2-owrt/arch/arm/tools/mach-types
--- linux-2.6.19.2/arch/arm/tools/mach-types 2007-04-10 01:27:55.000000000 +0200
+++ linux-2.6.19.2-owrt/arch/arm/tools/mach-types 2007-04-09 20:22:33.000000000 +0200
-@@ -1171,3 +1171,4 @@
- cdcs_quoll MACH_CDCS_QUOLL CDCS_QUOLL 1158
- quicksilver MACH_QUICKSILVER QUICKSILVER 1159
- uplat926 MACH_UPLAT926 UPLAT926 1160
+@@ -1278,7 +1278,7 @@
+ smdk6400 MACH_SMDK6400 SMDK6400 1270
+ nokia_n800 MACH_NOKIA_N800 NOKIA_N800 1271
+ greenphone MACH_GREENPHONE GREENPHONE 1272
+-compex42x MACH_COMPEXWP18 COMPEXWP18 1273
+compex MACH_COMPEX COMPEX 1273
+ xmate MACH_XMATE XMATE 1274
+ energizer MACH_ENERGIZER ENERGIZER 1275
+ ime1 MACH_IME1 IME1 1276
diff --git a/target/linux/ixp4xx-2.6/patches/700-remove_avila_ixdp425_setup.patch b/target/linux/ixp4xx-2.6/patches/700-remove_avila_ixdp425_setup.patch
deleted file mode 100644
index 852f6558b9..0000000000
--- a/target/linux/ixp4xx-2.6/patches/700-remove_avila_ixdp425_setup.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/ixdp425-pci.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/ixdp425-pci.c
---- linux-2.6.19.2/arch/arm/mach-ixp4xx/ixdp425-pci.c 2007-04-15 14:26:04.000000000 +0200
-+++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/ixdp425-pci.c 2007-05-10 11:10:40.000000000 +0200
-@@ -66,7 +66,7 @@
- int __init ixdp425_pci_init(void)
- {
- if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
-- machine_is_avila() || machine_is_ixdp465() || machine_is_compex())
-+ machine_is_ixdp465() || machine_is_compex())
- pci_common_init(&ixdp425_pci);
- return 0;
- }
-diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/ixdp425-setup.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/ixdp425-setup.c
---- linux-2.6.19.2/arch/arm/mach-ixp4xx/ixdp425-setup.c 2007-04-15 14:26:49.000000000 +0200
-+++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/ixdp425-setup.c 2007-05-10 11:10:01.000000000 +0200
-@@ -205,23 +205,3 @@
- .init_machine = ixdp425_init,
- MACHINE_END
- #endif
--
--/*
-- * Avila is functionally equivalent to IXDP425 except that it adds
-- * a CF IDE slot hanging off the expansion bus. When we have a
-- * driver for IXP4xx CF IDE with driver model support we'll move
-- * Avila to it's own setup file.
-- */
--#ifdef CONFIG_ARCH_AVILA
--MACHINE_START(AVILA, "Gateworks Avila Network Platform")
-- /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
-- .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
-- .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-- .map_io = ixp4xx_map_io,
-- .init_irq = ixp4xx_init_irq,
-- .timer = &ixp4xx_timer,
-- .boot_params = 0x0100,
-- .init_machine = ixdp425_init,
--MACHINE_END
--#endif
--
diff --git a/target/linux/ixp4xx-2.6/patches/710-avila_loft_setup.patch b/target/linux/ixp4xx-2.6/patches/710-avila_loft_setup.patch
deleted file mode 100644
index 4fb597d7db..0000000000
--- a/target/linux/ixp4xx-2.6/patches/710-avila_loft_setup.patch
+++ /dev/null
@@ -1,381 +0,0 @@
-This patch adds support for the Gateworks Avila Network Platform in
-a separate set of setup files to the IXDP425. This is necessary now
-that a driver for the Avila CF card slot is available. It also adds
-support for a minor variant on the Avila board known as the Loft,
-which has a different number of maximum PCI devices.
-
-Signed-off-by: Michael-Luke Jones <mlj28 <at> cam.ac.uk>
-
-Index: linux-2.6.19/arch/arm/mach-ixp4xx/Kconfig
-===================================================================
---- linux-2.6.19.orig/arch/arm/mach-ixp4xx/Kconfig
-+++ linux-2.6.19/arch/arm/mach-ixp4xx/Kconfig
-@@ -17,7 +17,7 @@ config MACH_NSLU2
- NSLU2 NAS device. For more information on this platform,
- see http://www.nslu2-linux.org
-
--config ARCH_AVILA
-+config MACH_AVILA
- bool "Avila"
- select PCI
- help
-@@ -25,6 +25,14 @@ config ARCH_AVILA
- Avila Network Platform. For more information on this platform,
- see <file:Documentation/arm/IXP4xx>.
-
-+config MACH_LOFT
-+ bool "Loft"
-+ depends on MACH_AVILA
-+ help
-+ Say 'Y' here if you want your kernel to support the Giant
-+ Shoulder Inc Loft board (a minor variation on the standard
-+ Gateworks Avila Network Platform).
-+
- config ARCH_ADI_COYOTE
- bool "Coyote"
- select PCI
-@@ -86,7 +94,7 @@ config MACH_NAS100D
- #
- config ARCH_IXDP4XX
- bool
-- depends on ARCH_IXDP425 || ARCH_AVILA || MACH_IXDP465
-+ depends on ARCH_IXDP425 || MACH_IXDP465
- default y
-
- #
-Index: linux-2.6.19/arch/arm/mach-ixp4xx/Makefile
-===================================================================
---- linux-2.6.19.orig/arch/arm/mach-ixp4xx/Makefile
-+++ linux-2.6.19/arch/arm/mach-ixp4xx/Makefile
-@@ -6,6 +6,7 @@ obj-pci-y :=
- obj-pci-n :=
-
- obj-pci-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o
-+obj-pci-$(CONFIG_MACH_AVILA) += avila-pci.o
- obj-pci-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o
- obj-pci-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o
- obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o
-@@ -15,6 +16,7 @@ obj-pci-$(CONFIG_MACH_NAS100D) += nas10
- obj-y += common.o
-
- obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-setup.o
-+obj-$(CONFIG_MACH_AVILA) += avila-setup.o
- obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o
- obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o
- obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
-Index: linux-2.6.19/arch/arm/mach-ixp4xx/avila-pci.c
-===================================================================
---- /dev/null
-+++ linux-2.6.19/arch/arm/mach-ixp4xx/avila-pci.c
-@@ -0,0 +1,78 @@
-+/*
-+ * arch/arm/mach-ixp4xx/avila-pci.c
-+ *
-+ * Gateworks Avila board-level PCI initialization
-+ *
-+ * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
-+ *
-+ * Based on ixdp-pci.c
-+ * Copyright (C) 2002 Intel Corporation.
-+ * Copyright (C) 2003-2004 MontaVista Software, Inc.
-+ *
-+ * Maintainer: Deepak Saxena <dsaxena@plexity.net>
-+ *
-+ * 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.
-+ *
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/pci.h>
-+#include <linux/init.h>
-+#include <linux/irq.h>
-+#include <linux/delay.h>
-+
-+#include <asm/mach/pci.h>
-+#include <asm/irq.h>
-+#include <asm/hardware.h>
-+#include <asm/mach-types.h>
-+
-+void __init avila_pci_preinit(void)
-+{
-+ set_irq_type(IRQ_AVILA_PCI_INTA, IRQT_LOW);
-+ set_irq_type(IRQ_AVILA_PCI_INTB, IRQT_LOW);
-+ set_irq_type(IRQ_AVILA_PCI_INTC, IRQT_LOW);
-+ set_irq_type(IRQ_AVILA_PCI_INTD, IRQT_LOW);
-+
-+ ixp4xx_pci_preinit();
-+}
-+
-+static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
-+{
-+ static int pci_irq_table[AVILA_PCI_IRQ_LINES] = {
-+ IRQ_AVILA_PCI_INTA,
-+ IRQ_AVILA_PCI_INTB,
-+ IRQ_AVILA_PCI_INTC,
-+ IRQ_AVILA_PCI_INTD
-+ };
-+
-+ int irq = -1;
-+
-+ if (slot >= 1 &&
-+ slot <= (machine_is_loft() ? LOFT_PCI_MAX_DEV : AVILA_PCI_MAX_DEV) &&
-+ pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) {
-+ irq = pci_irq_table[(slot + pin - 2) % 4];
-+ }
-+
-+ return irq;
-+}
-+
-+struct hw_pci avila_pci __initdata = {
-+ .nr_controllers = 1,
-+ .preinit = avila_pci_preinit,
-+ .swizzle = pci_std_swizzle,
-+ .setup = ixp4xx_setup,
-+ .scan = ixp4xx_scan_bus,
-+ .map_irq = avila_map_irq,
-+};
-+
-+int __init avila_pci_init(void)
-+{
-+ if (machine_is_avila() || machine_is_loft())
-+ pci_common_init(&avila_pci);
-+ return 0;
-+}
-+
-+subsys_initcall(avila_pci_init);
-+
-Index: linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c
-===================================================================
---- /dev/null
-+++ linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c
-@@ -0,0 +1,152 @@
-+/*
-+ * arch/arm/mach-ixp4xx/avila-setup.c
-+ *
-+ * Gateworks Avila board-setup
-+ *
-+ * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
-+ *
-+ * Based on ixdp-setup.c
-+ * Copyright (C) 2003-2005 MontaVista Software, Inc.
-+ *
-+ * Author: Deepak Saxena <dsaxena@plexity.net>
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/init.h>
-+#include <linux/device.h>
-+#include <linux/serial.h>
-+#include <linux/tty.h>
-+#include <linux/serial_8250.h>
-+#include <linux/slab.h>
-+
-+#include <asm/types.h>
-+#include <asm/setup.h>
-+#include <asm/memory.h>
-+#include <asm/hardware.h>
-+#include <asm/mach-types.h>
-+#include <asm/irq.h>
-+#include <asm/mach/arch.h>
-+#include <asm/mach/flash.h>
-+
-+static struct flash_platform_data avila_flash_data = {
-+ .map_name = "cfi_probe",
-+ .width = 2,
-+};
-+
-+static struct resource avila_flash_resource = {
-+ .flags = IORESOURCE_MEM,
-+};
-+
-+static struct platform_device avila_flash = {
-+ .name = "IXP4XX-Flash",
-+ .id = 0,
-+ .dev = {
-+ .platform_data = &avila_flash_data,
-+ },
-+ .num_resources = 1,
-+ .resource = &avila_flash_resource,
-+};
-+
-+static struct ixp4xx_i2c_pins avila_i2c_gpio_pins = {
-+ .sda_pin = AVILA_SDA_PIN,
-+ .scl_pin = AVILA_SCL_PIN,
-+};
-+
-+static struct platform_device avila_i2c_controller = {
-+ .name = "IXP4XX-I2C",
-+ .id = 0,
-+ .dev = {
-+ .platform_data = &avila_i2c_gpio_pins,
-+ },
-+ .num_resources = 0
-+};
-+
-+static struct resource avila_uart_resources[] = {
-+ {
-+ .start = IXP4XX_UART1_BASE_PHYS,
-+ .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
-+ .flags = IORESOURCE_MEM
-+ },
-+ {
-+ .start = IXP4XX_UART2_BASE_PHYS,
-+ .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
-+ .flags = IORESOURCE_MEM
-+ }
-+};
-+
-+static struct plat_serial8250_port avila_uart_data[] = {
-+ {
-+ .mapbase = IXP4XX_UART1_BASE_PHYS,
-+ .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
-+ .irq = IRQ_IXP4XX_UART1,
-+ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-+ .iotype = UPIO_MEM,
-+ .regshift = 2,
-+ .uartclk = IXP4XX_UART_XTAL,
-+ },
-+ {
-+ .mapbase = IXP4XX_UART2_BASE_PHYS,
-+ .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
-+ .irq = IRQ_IXP4XX_UART2,
-+ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-+ .iotype = UPIO_MEM,
-+ .regshift = 2,
-+ .uartclk = IXP4XX_UART_XTAL,
-+ },
-+ { },
-+};
-+
-+static struct platform_device avila_uart = {
-+ .name = "serial8250",
-+ .id = PLAT8250_DEV_PLATFORM,
-+ .dev.platform_data = avila_uart_data,
-+ .num_resources = 2,
-+ .resource = avila_uart_resources
-+};
-+
-+static struct platform_device *avila_devices[] __initdata = {
-+ &avila_i2c_controller,
-+ &avila_flash,
-+ &avila_uart
-+};
-+
-+static void __init avila_init(void)
-+{
-+ ixp4xx_sys_init();
-+
-+ avila_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
-+ avila_flash_resource.end =
-+ IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
-+
-+ platform_add_devices(avila_devices, ARRAY_SIZE(avila_devices));
-+}
-+
-+MACHINE_START(AVILA, "Gateworks Avila Network Platform")
-+ /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
-+ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
-+ .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-+ .map_io = ixp4xx_map_io,
-+ .init_irq = ixp4xx_init_irq,
-+ .timer = &ixp4xx_timer,
-+ .boot_params = 0x0100,
-+ .init_machine = avila_init,
-+MACHINE_END
-+
-+ /*
-+ * Loft is functionally equivalent to Avila except that it has a
-+ * different number for the maximum PCI devices. The MACHINE
-+ * structure below is identical to Avila except for the comment.
-+ */
-+#ifdef CONFIG_MACH_LOFT
-+MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")
-+ /* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */
-+ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
-+ .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-+ .map_io = ixp4xx_map_io,
-+ .init_irq = ixp4xx_init_irq,
-+ .timer = &ixp4xx_timer,
-+ .boot_params = 0x0100,
-+ .init_machine = avila_init,
-+MACHINE_END
-+#endif
-+
-Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/avila.h
-===================================================================
---- /dev/null
-+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/avila.h
-@@ -0,0 +1,39 @@
-+/*
-+ * include/asm-arm/arch-ixp4xx/avila.h
-+ *
-+ * Gateworks Avila platform specific definitions
-+ *
-+ * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
-+ *
-+ * Based on ixdp425.h
-+ * Author: Deepak Saxena <dsaxena@plexity.net>
-+ *
-+ * Copyright 2004 (c) MontaVista, Software, Inc.
-+ *
-+ * This file is licensed under the terms of the GNU General Public
-+ * License version 2. This program is licensed "as is" without any
-+ * warranty of any kind, whether express or implied.
-+ */
-+
-+#ifndef __ASM_ARCH_HARDWARE_H__
-+#error "Do not include this directly, instead #include <asm/hardware.h>"
-+#endif
-+
-+#define AVILA_SDA_PIN 7
-+#define AVILA_SCL_PIN 6
-+
-+/*
-+ * AVILA PCI IRQs
-+ */
-+#define AVILA_PCI_MAX_DEV 4
-+#define LOFT_PCI_MAX_DEV 6
-+#define AVILA_PCI_IRQ_LINES 4
-+
-+
-+/* PCI controller GPIO to IRQ pin mappings */
-+#define AVILA_PCI_INTA_PIN 11
-+#define AVILA_PCI_INTB_PIN 10
-+#define AVILA_PCI_INTC_PIN 9
-+#define AVILA_PCI_INTD_PIN 8
-+
-+
-Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/hardware.h
-===================================================================
---- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/hardware.h
-+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/hardware.h
-@@ -42,6 +42,7 @@ extern unsigned int processor_id;
-
- /* Platform specific details */
- #include "ixdp425.h"
-+#include "avila.h"
- #include "coyote.h"
- #include "prpmc1100.h"
- #include "nslu2.h"
-Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/irqs.h
-===================================================================
---- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/irqs.h
-+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/irqs.h
-@@ -79,6 +79,15 @@
- #define IRQ_IXDP425_PCI_INTD IRQ_IXP4XX_GPIO8
-
- /*
-+ * Gateworks Avila board IRQs
-+ */
-+#define IRQ_AVILA_PCI_INTA IRQ_IXP4XX_GPIO11
-+#define IRQ_AVILA_PCI_INTB IRQ_IXP4XX_GPIO10
-+#define IRQ_AVILA_PCI_INTC IRQ_IXP4XX_GPIO9
-+#define IRQ_AVILA_PCI_INTD IRQ_IXP4XX_GPIO8
-+
-+
-+/*
- * PrPMC1100 Board IRQs
- */
- #define IRQ_PRPMC1100_PCI_INTA IRQ_IXP4XX_GPIO11
diff --git a/target/linux/ixp4xx-2.6/patches/800-eeprom_new_notifier.patch b/target/linux/ixp4xx-2.6/patches/800-eeprom_new_notifier.patch
index 6c461089aa..79a097128c 100644
--- a/target/linux/ixp4xx-2.6/patches/800-eeprom_new_notifier.patch
+++ b/target/linux/ixp4xx-2.6/patches/800-eeprom_new_notifier.patch
@@ -9,11 +9,11 @@ the 'maclist' code and read out by the ethernet config.
Signed-off-by: John Bowler <jbowler@acm.org>
-Index: linux-2.6.19/drivers/i2c/chips/eeprom.c
+Index: linux-2.6.21-rc1-arm/drivers/i2c/chips/eeprom.c
===================================================================
---- linux-2.6.19.orig/drivers/i2c/chips/eeprom.c
-+++ linux-2.6.19/drivers/i2c/chips/eeprom.c
-@@ -34,6 +34,8 @@
+--- linux-2.6.21-rc1-arm.orig/drivers/i2c/chips/eeprom.c 2007-02-21 02:24:14.000000000 -0800
++++ linux-2.6.21-rc1-arm/drivers/i2c/chips/eeprom.c 2007-02-21 02:25:01.000000000 -0800
+@@ -33,6 +33,8 @@
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
@@ -22,7 +22,7 @@ Index: linux-2.6.19/drivers/i2c/chips/eeprom.c
/* Addresses to scan */
static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54,
-@@ -42,26 +44,7 @@ static unsigned short normal_i2c[] = { 0
+@@ -41,26 +43,7 @@
/* Insmod parameters */
I2C_CLIENT_INSMOD_1(eeprom);
@@ -50,7 +50,7 @@ Index: linux-2.6.19/drivers/i2c/chips/eeprom.c
static int eeprom_attach_adapter(struct i2c_adapter *adapter);
static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind);
-@@ -190,6 +173,7 @@ static int eeprom_detect(struct i2c_adap
+@@ -189,6 +172,7 @@
data->valid = 0;
mutex_init(&data->update_lock);
data->nature = UNKNOWN;
@@ -58,7 +58,7 @@ Index: linux-2.6.19/drivers/i2c/chips/eeprom.c
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
-@@ -213,6 +197,9 @@ static int eeprom_detect(struct i2c_adap
+@@ -212,6 +196,9 @@
if (err)
goto exit_detach;
@@ -68,7 +68,7 @@ Index: linux-2.6.19/drivers/i2c/chips/eeprom.c
return 0;
exit_detach:
-@@ -238,6 +225,41 @@ static int eeprom_detach_client(struct i
+@@ -237,6 +224,41 @@
return 0;
}
@@ -110,10 +110,10 @@ Index: linux-2.6.19/drivers/i2c/chips/eeprom.c
static int __init eeprom_init(void)
{
return i2c_add_driver(&eeprom_driver);
-Index: linux-2.6.19/include/linux/eeprom.h
+Index: linux-2.6.21-rc1-arm/include/linux/eeprom.h
===================================================================
---- /dev/null
-+++ linux-2.6.19/include/linux/eeprom.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21-rc1-arm/include/linux/eeprom.h 2007-02-21 02:25:01.000000000 -0800
@@ -0,0 +1,71 @@
+#ifndef _LINUX_EEPROM_H
+#define _LINUX_EEPROM_H
@@ -186,11 +186,11 @@ Index: linux-2.6.19/include/linux/eeprom.h
+extern int unregister_eeprom_notifier(struct notifier_block *nb);
+
+#endif /* _LINUX_EEPROM_H */
-Index: linux-2.6.19/include/linux/notifier.h
+Index: linux-2.6.21-rc1-arm/include/linux/notifier.h
===================================================================
---- linux-2.6.19.orig/include/linux/notifier.h
-+++ linux-2.6.19/include/linux/notifier.h
-@@ -187,5 +187,8 @@ extern int srcu_notifier_call_chain(stru
+--- linux-2.6.21-rc1-arm.orig/include/linux/notifier.h 2007-02-21 02:24:14.000000000 -0800
++++ linux-2.6.21-rc1-arm/include/linux/notifier.h 2007-02-21 02:25:01.000000000 -0800
+@@ -187,5 +187,8 @@
#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */