aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ifxmips/patches-2.6.33
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2010-04-10 20:11:28 +0000
committerJohn Crispin <john@openwrt.org>2010-04-10 20:11:28 +0000
commitb4d0b6cbb34d1cd5c71c122c2137e32476ec342a (patch)
tree39d1d9278deef057a8d2ccfe5e9d55325f28a991 /target/linux/ifxmips/patches-2.6.33
parentbe4d9660e8cb66fde329d829a53b1bd75382351e (diff)
downloadupstream-b4d0b6cbb34d1cd5c71c122c2137e32476ec342a.tar.gz
upstream-b4d0b6cbb34d1cd5c71c122c2137e32476ec342a.tar.bz2
upstream-b4d0b6cbb34d1cd5c71c122c2137e32476ec342a.zip
adss 2.6.33 kernel patches, not defult yet as linux-atm breaks on 2.6.33
SVN-Revision: 20789
Diffstat (limited to 'target/linux/ifxmips/patches-2.6.33')
-rw-r--r--target/linux/ifxmips/patches-2.6.33/000-mips-bad-intctl.patch39
-rw-r--r--target/linux/ifxmips/patches-2.6.33/010-mips_clocksource_init_war.patch35
-rw-r--r--target/linux/ifxmips/patches-2.6.33/020-genirq_fix.patch14
-rw-r--r--target/linux/ifxmips/patches-2.6.33/030-mips-multi-machine-update.patch134
-rw-r--r--target/linux/ifxmips/patches-2.6.33/100-board.patch58
-rw-r--r--target/linux/ifxmips/patches-2.6.33/110-drivers.patch141
-rw-r--r--target/linux/ifxmips/patches-2.6.33/200-cfi-swap.patch42
-rw-r--r--target/linux/ifxmips/patches-2.6.33/210-atm_hack.patch48
8 files changed, 511 insertions, 0 deletions
diff --git a/target/linux/ifxmips/patches-2.6.33/000-mips-bad-intctl.patch b/target/linux/ifxmips/patches-2.6.33/000-mips-bad-intctl.patch
new file mode 100644
index 0000000000..efecbf1f75
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/000-mips-bad-intctl.patch
@@ -0,0 +1,39 @@
+Index: linux-2.6.33.2/arch/mips/kernel/traps.c
+===================================================================
+--- linux-2.6.33.2.orig/arch/mips/kernel/traps.c 2010-04-02 01:02:33.000000000 +0200
++++ linux-2.6.33.2/arch/mips/kernel/traps.c 2010-04-02 23:36:16.000000000 +0200
+@@ -1496,7 +1496,18 @@
+ if (cpu_has_mips_r2) {
+ cp0_compare_irq_shift = CAUSEB_TI - CAUSEB_IP;
+ cp0_compare_irq = (read_c0_intctl() >> INTCTLB_IPTI) & 7;
++
++ if (!cp0_compare_irq)
++ cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
++
+ cp0_perfcount_irq = (read_c0_intctl() >> INTCTLB_IPPCI) & 7;
++
++ if (!cp0_perfcount_irq)
++ cp0_perfcount_irq = CP0_LEGACY_PERFCNT_IRQ;
++
++ if (arch_fixup_c0_irqs)
++ arch_fixup_c0_irqs();
++
+ if (cp0_perfcount_irq == cp0_compare_irq)
+ cp0_perfcount_irq = -1;
+ } else {
+Index: linux-2.6.33.2/arch/mips/include/asm/irq.h
+===================================================================
+--- linux-2.6.33.2.orig/arch/mips/include/asm/irq.h 2010-04-02 01:02:33.000000000 +0200
++++ linux-2.6.33.2/arch/mips/include/asm/irq.h 2010-04-02 23:37:14.000000000 +0200
+@@ -133,9 +133,11 @@
+ * IE7. Since R2 their number has to be read from the c0_intctl register.
+ */
+ #define CP0_LEGACY_COMPARE_IRQ 7
++#define CP0_LEGACY_PERFCNT_IRQ 7
+
+ extern int cp0_compare_irq;
+ extern int cp0_compare_irq_shift;
+ extern int cp0_perfcount_irq;
++extern void __weak arch_fixup_c0_irqs(void);
+
+ #endif /* _ASM_IRQ_H */
diff --git a/target/linux/ifxmips/patches-2.6.33/010-mips_clocksource_init_war.patch b/target/linux/ifxmips/patches-2.6.33/010-mips_clocksource_init_war.patch
new file mode 100644
index 0000000000..15fd78f4e6
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/010-mips_clocksource_init_war.patch
@@ -0,0 +1,35 @@
+Index: linux-2.6.32.10/arch/mips/kernel/cevt-r4k.c
+===================================================================
+--- linux-2.6.32.10.orig/arch/mips/kernel/cevt-r4k.c 2010-04-02 21:11:39.000000000 +0200
++++ linux-2.6.32.10/arch/mips/kernel/cevt-r4k.c 2010-04-02 21:11:52.000000000 +0200
+@@ -22,6 +22,22 @@
+
+ #ifndef CONFIG_MIPS_MT_SMTC
+
++/*
++ * Compare interrupt can be routed and latched outside the core,
++ * so a single execution hazard barrier may not be enough to give
++ * it time to clear as seen in the Cause register. 4 time the
++ * pipeline depth seems reasonably conservative, and empirically
++ * works better in configurations with high CPU/bus clock ratios.
++ */
++
++#define compare_change_hazard() \
++ do { \
++ irq_disable_hazard(); \
++ irq_disable_hazard(); \
++ irq_disable_hazard(); \
++ irq_disable_hazard(); \
++ } while (0)
++
+ static int mips_next_event(unsigned long delta,
+ struct clock_event_device *evt)
+ {
+@@ -31,6 +47,7 @@
+ cnt = read_c0_count();
+ cnt += delta;
+ write_c0_compare(cnt);
++ compare_change_hazard();
+ res = ((int)(read_c0_count() - cnt) > 0) ? -ETIME : 0;
+ return res;
+ }
diff --git a/target/linux/ifxmips/patches-2.6.33/020-genirq_fix.patch b/target/linux/ifxmips/patches-2.6.33/020-genirq_fix.patch
new file mode 100644
index 0000000000..852729f092
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/020-genirq_fix.patch
@@ -0,0 +1,14 @@
+Index: linux-2.6.33.2/kernel/irq/chip.c
+===================================================================
+--- linux-2.6.33.2.orig/kernel/irq/chip.c 2010-04-02 01:02:33.000000000 +0200
++++ linux-2.6.33.2/kernel/irq/chip.c 2010-04-02 23:37:40.000000000 +0200
+@@ -650,6 +650,9 @@
+
+ kstat_incr_irqs_this_cpu(irq, desc);
+
++ if (unlikely(!desc->action || (desc->status & IRQ_DISABLED)))
++ return;
++
+ if (desc->chip->ack)
+ desc->chip->ack(irq);
+
diff --git a/target/linux/ifxmips/patches-2.6.33/030-mips-multi-machine-update.patch b/target/linux/ifxmips/patches-2.6.33/030-mips-multi-machine-update.patch
new file mode 100644
index 0000000000..d63587901d
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/030-mips-multi-machine-update.patch
@@ -0,0 +1,134 @@
+--- a/arch/mips/kernel/mips_machine.c
++++ b/arch/mips/kernel/mips_machine.c
+@@ -7,12 +7,13 @@
+ *
+ */
+ #include <linux/mm.h>
++#include <linux/string.h>
+
+ #include <asm/mips_machine.h>
+-#include <asm/bootinfo.h>
+
+ static struct list_head mips_machines __initdata =
+ LIST_HEAD_INIT(mips_machines);
++static char *mips_machid __initdata;
+
+ char *mips_machine_name = "Unknown";
+
+@@ -55,20 +56,65 @@ void __init mips_machine_set_name(char *
+ }
+ }
+
+-void __init mips_machine_setup(unsigned long machtype)
++void __init mips_machine_setup(void)
+ {
+ struct mips_machine *mach;
+
+- mach = mips_machine_find(machtype);
++ mach = mips_machine_find(mips_machtype);
+ if (!mach) {
+- printk(KERN_ALERT "MIPS: no machine registered for "
+- "machtype %lu\n", machtype);
++ printk(KERN_WARNING "MIPS: no machine registered for "
++ "machtype %lu\n", mips_machtype);
+ return;
+ }
+
+ mips_machine_set_name(mach->mach_name);
+- printk(KERN_INFO "MIPS: machine is %s\n", mips_machine_name);
++ printk(KERN_NOTICE "MIPS: machine is %s\n", mips_machine_name);
+
+ if (mach->mach_setup)
+ mach->mach_setup();
+ }
++
++int __init mips_machtype_setup(char *id)
++{
++ if (mips_machid == NULL)
++ mips_machid = id;
++
++ return 1;
++}
++
++__setup("machtype=", mips_machtype_setup);
++
++static int __init mips_machtype_init(void)
++{
++ struct list_head *this;
++ struct mips_machine *mach;
++
++ if (mips_machid == NULL)
++ return 0;
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ if (mach->mach_id == NULL)
++ continue;
++
++ if (strcmp(mach->mach_id, mips_machid) == 0) {
++ mips_machtype = mach->mach_type;
++ return 0;
++ }
++ }
++
++ printk(KERN_WARNING
++ "MIPS: no machine found for id: '%s', registered machines:\n",
++ mips_machid);
++ printk(KERN_WARNING "%32s %s\n", "id", "name");
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ printk(KERN_WARNING "%32s %s\n",
++ mach->mach_id ? mach->mach_id : "", mach->mach_name);
++ }
++
++ return 0;
++}
++
++core_initcall(mips_machtype_init);
+--- a/arch/mips/include/asm/mips_machine.h
++++ b/arch/mips/include/asm/mips_machine.h
+@@ -13,25 +13,33 @@
+ #include <linux/init.h>
+ #include <linux/list.h>
+
++#include <asm/bootinfo.h>
++
+ struct mips_machine {
+ unsigned long mach_type;
+- void (*mach_setup)(void);
++ char *mach_id;
+ char *mach_name;
++ void (*mach_setup)(void);
+ struct list_head list;
+ };
+
+ void mips_machine_register(struct mips_machine *) __init;
+-void mips_machine_setup(unsigned long machtype) __init;
++void mips_machine_setup(void) __init;
++int mips_machtype_setup(char *id) __init;
+ void mips_machine_set_name(char *name) __init;
+
+ extern char *mips_machine_name;
+
+-#define MIPS_MACHINE(_type, _name, _setup) \
+-static char machine_name_##_type[] __initdata = _name; \
++#define MIPS_MACHINE(_type, _id, _name, _setup) \
++static const char machine_name_##_type[] __initconst \
++ __aligned(1) = _name; \
++static const char machine_id_##_type[] __initconst \
++ __aligned(1) = _id; \
+ static struct mips_machine machine_##_type __initdata = \
+ { \
+ .mach_type = _type, \
+- .mach_name = machine_name_##_type, \
++ .mach_id = (char *) machine_id_##_type, \
++ .mach_name = (char *) machine_name_##_type, \
+ .mach_setup = _setup, \
+ }; \
+ \
+@@ -44,4 +52,3 @@ static int __init register_machine_##_ty
+ pure_initcall(register_machine_##_type)
+
+ #endif /* __ASM_MIPS_MACHINE_H */
+-
diff --git a/target/linux/ifxmips/patches-2.6.33/100-board.patch b/target/linux/ifxmips/patches-2.6.33/100-board.patch
new file mode 100644
index 0000000000..651371bfef
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/100-board.patch
@@ -0,0 +1,58 @@
+Index: linux-2.6.33.2/arch/mips/Kconfig
+===================================================================
+--- linux-2.6.33.2.orig/arch/mips/Kconfig 2010-04-02 23:31:00.000000000 +0200
++++ linux-2.6.33.2/arch/mips/Kconfig 2010-04-02 23:38:38.000000000 +0200
+@@ -139,6 +139,9 @@
+
+ otherwise choose R3000.
+
++config IFXMIPS
++ bool "Infineon MIPS"
++
+ config MACH_JAZZ
+ bool "Jazz family of machines"
+ select ARC
+@@ -693,6 +696,7 @@
+ source "arch/mips/vr41xx/Kconfig"
+ source "arch/mips/cavium-octeon/Kconfig"
+ source "arch/mips/loongson/Kconfig"
++source "arch/mips/ifxmips/Kconfig"
+
+ endmenu
+
+Index: linux-2.6.33.2/arch/mips/Makefile
+===================================================================
+--- linux-2.6.33.2.orig/arch/mips/Makefile 2010-04-02 23:31:01.000000000 +0200
++++ linux-2.6.33.2/arch/mips/Makefile 2010-04-02 23:38:38.000000000 +0200
+@@ -317,6 +317,18 @@
+ load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000
+
+ #
++# Infineon IFXMIPS
++#
++core-$(CONFIG_IFXMIPS) += arch/mips/ifxmips/common/
++cflags-$(CONFIG_IFXMIPS) += -I$(srctree)/arch/mips/include/asm/mach-ifxmips
++
++core-$(CONFIG_IFXMIPS_DANUBE) += arch/mips/ifxmips/danube/
++cflags-$(CONFIG_IFXMIPS_DANUBE) += -I$(srctree)/arch/mips/include/asm/mach-ifxmips/danube/
++load-$(CONFIG_IFXMIPS_DANUBE) += 0xffffffff80002000
++
++core-$(CONFIG_IFXMIPS_COMPAT) += arch/mips/ifxmips/compat/
++
++#
+ # DECstation family
+ #
+ core-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/
+Index: linux-2.6.33.2/arch/mips/pci/Makefile
+===================================================================
+--- linux-2.6.33.2.orig/arch/mips/pci/Makefile 2010-04-02 01:02:33.000000000 +0200
++++ linux-2.6.33.2/arch/mips/pci/Makefile 2010-04-02 23:38:38.000000000 +0200
+@@ -55,7 +55,7 @@
+ obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o
+ obj-$(CONFIG_MIKROTIK_RB532) += pci-rc32434.o ops-rc32434.o fixup-rc32434.o
+ obj-$(CONFIG_CPU_CAVIUM_OCTEON) += pci-octeon.o pcie-octeon.o
+-
++obj-$(CONFIG_IFXMIPS) += pci-ifxmips.o ops-ifxmips.o
+ ifdef CONFIG_PCI_MSI
+ obj-$(CONFIG_CPU_CAVIUM_OCTEON) += msi-octeon.o
+ endif
diff --git a/target/linux/ifxmips/patches-2.6.33/110-drivers.patch b/target/linux/ifxmips/patches-2.6.33/110-drivers.patch
new file mode 100644
index 0000000000..f1d6b46653
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/110-drivers.patch
@@ -0,0 +1,141 @@
+Index: linux-2.6.33.2/drivers/serial/Kconfig
+===================================================================
+--- linux-2.6.33.2.orig/drivers/serial/Kconfig 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/serial/Kconfig 2010-04-05 20:33:43.000000000 +0200
+@@ -1383,6 +1383,14 @@
+ help
+ Support for Console on the NWP serial ports.
+
++config SERIAL_IFXMIPS
++ bool "IFXMips serial driver"
++ depends on IFXMIPS
++ select SERIAL_CORE
++ select SERIAL_CORE_CONSOLE
++ help
++ Driver for the ifxmipss built in ASC hardware
++
+ config SERIAL_QE
+ tristate "Freescale QUICC Engine serial port support"
+ depends on QUICC_ENGINE
+Index: linux-2.6.33.2/drivers/serial/Makefile
+===================================================================
+--- linux-2.6.33.2.orig/drivers/serial/Makefile 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/serial/Makefile 2010-04-05 20:34:00.000000000 +0200
+@@ -82,3 +82,4 @@
+ obj-$(CONFIG_SERIAL_QE) += ucc_uart.o
+ obj-$(CONFIG_SERIAL_TIMBERDALE) += timbuart.o
+ obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o
++obj-$(CONFIG_SERIAL_IFXMIPS) += ifxmips.o
+Index: linux-2.6.33.2/drivers/net/Kconfig
+===================================================================
+--- linux-2.6.33.2.orig/drivers/net/Kconfig 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/net/Kconfig 2010-04-05 20:33:43.000000000 +0200
+@@ -343,6 +343,12 @@
+
+ source "drivers/net/arm/Kconfig"
+
++config IFXMIPS_MII0
++ tristate "Infineon IFXMips eth0 driver"
++ depends on IFXMIPS
++ help
++ Support for the MII0 inside the IFXMips SOC
++
+ config AX88796
+ tristate "ASIX AX88796 NE2000 clone support"
+ depends on ARM || MIPS || SUPERH
+Index: linux-2.6.33.2/drivers/net/Makefile
+===================================================================
+--- linux-2.6.33.2.orig/drivers/net/Makefile 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/net/Makefile 2010-04-05 20:33:43.000000000 +0200
+@@ -247,6 +247,7 @@
+ obj-$(CONFIG_MLX4_CORE) += mlx4/
+ obj-$(CONFIG_ENC28J60) += enc28j60.o
+ obj-$(CONFIG_ETHOC) += ethoc.o
++obj-$(CONFIG_IFXMIPS_MII0) += ifxmips.o
+
+ obj-$(CONFIG_XTENSA_XT2000_SONIC) += xtsonic.o
+
+Index: linux-2.6.33.2/drivers/mtd/maps/Kconfig
+===================================================================
+--- linux-2.6.33.2.orig/drivers/mtd/maps/Kconfig 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/mtd/maps/Kconfig 2010-04-05 20:33:43.000000000 +0200
+@@ -257,6 +257,12 @@
+ help
+ Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards
+
++config MTD_IFXMIPS
++ tristate "IFXMIPS MTD support"
++ depends on IFXMIPS
++ help
++ Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards
++
+ config MTD_DILNETPC
+ tristate "CFI Flash device mapped on DIL/Net PC"
+ depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT && BROKEN
+Index: linux-2.6.33.2/drivers/mtd/maps/Makefile
+===================================================================
+--- linux-2.6.33.2.orig/drivers/mtd/maps/Makefile 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/mtd/maps/Makefile 2010-04-05 20:33:43.000000000 +0200
+@@ -61,3 +61,4 @@
+ obj-$(CONFIG_MTD_RBTX4939) += rbtx4939-flash.o
+ obj-$(CONFIG_MTD_VMU) += vmu-flash.o
+ obj-$(CONFIG_MTD_GPIO_ADDR) += gpio-addr-flash.o
++obj-$(CONFIG_MTD_IFXMIPS) += ifxmips.o
+Index: linux-2.6.33.2/drivers/watchdog/Kconfig
+===================================================================
+--- linux-2.6.33.2.orig/drivers/watchdog/Kconfig 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/watchdog/Kconfig 2010-04-05 20:33:43.000000000 +0200
+@@ -840,6 +840,12 @@
+ help
+ Hardware driver for the built-in watchdog timer on TXx9 MIPS SoCs.
+
++config IFXMIPS_WDT
++ bool "IFXMips watchdog"
++ depends on IFXMIPS
++ help
++ Hardware driver for the IFXMIPS Watchdog Timer.
++
+ # PARISC Architecture
+
+ # POWERPC Architecture
+Index: linux-2.6.33.2/drivers/watchdog/Makefile
+===================================================================
+--- linux-2.6.33.2.orig/drivers/watchdog/Makefile 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/watchdog/Makefile 2010-04-05 20:33:43.000000000 +0200
+@@ -112,6 +112,7 @@
+ obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
+ obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
+ obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
++obj-$(CONFIG_IFXMIPS_WDT) += ifxmips.o
+
+ # PARISC Architecture
+
+Index: linux-2.6.33.2/drivers/leds/Kconfig
+===================================================================
+--- linux-2.6.33.2.orig/drivers/leds/Kconfig 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/leds/Kconfig 2010-04-05 20:33:43.000000000 +0200
+@@ -269,6 +269,12 @@
+ To compile this driver as a module, choose M here: the module will
+ be called leds-adp5520.
+
++config LEDS_IFXMIPS
++ tristate "LED Support for IFXMIPS LEDs"
++ depends on LEDS_CLASS && IFXMIPS
++ help
++ This option enables support for the CM-X270 LEDs.
++
+ comment "LED Triggers"
+
+ config LEDS_TRIGGERS
+Index: linux-2.6.33.2/drivers/leds/Makefile
+===================================================================
+--- linux-2.6.33.2.orig/drivers/leds/Makefile 2010-04-05 20:33:41.000000000 +0200
++++ linux-2.6.33.2/drivers/leds/Makefile 2010-04-05 20:33:43.000000000 +0200
+@@ -33,6 +33,7 @@
+ obj-$(CONFIG_LEDS_INTEL_SS4200) += leds-ss4200.o
+ obj-$(CONFIG_LEDS_LT3593) += leds-lt3593.o
+ obj-$(CONFIG_LEDS_ADP5520) += leds-adp5520.o
++obj-$(CONFIG_LEDS_IFXMIPS) += leds-ifxmips.o
+
+ # LED SPI Drivers
+ obj-$(CONFIG_LEDS_DAC124S085) += leds-dac124s085.o
diff --git a/target/linux/ifxmips/patches-2.6.33/200-cfi-swap.patch b/target/linux/ifxmips/patches-2.6.33/200-cfi-swap.patch
new file mode 100644
index 0000000000..2fedf3ff66
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/200-cfi-swap.patch
@@ -0,0 +1,42 @@
+Index: linux-2.6.33.2/drivers/mtd/chips/cfi_cmdset_0001.c
+===================================================================
+--- linux-2.6.33.2.orig/drivers/mtd/chips/cfi_cmdset_0001.c 2010-04-02 01:02:33.000000000 +0200
++++ linux-2.6.33.2/drivers/mtd/chips/cfi_cmdset_0001.c 2010-04-02 23:47:32.000000000 +0200
+@@ -41,7 +41,11 @@
+ /* #define CMDSET0001_DISABLE_WRITE_SUSPEND */
+
+ // debugging, turns off buffer write mode if set to 1
+-#define FORCE_WORD_WRITE 0
++#ifdef CONFIG_IFXMIPS
++# define FORCE_WORD_WRITE 1
++#else
++# define FORCE_WORD_WRITE 0
++#endif
+
+ /* Intel chips */
+ #define I82802AB 0x00ad
+@@ -1494,6 +1498,9 @@
+ int ret=0;
+
+ adr += chip->start;
++#ifdef CONFIG_IFXMIPS
++ adr ^= 2;
++#endif
+
+ switch (mode) {
+ case FL_WRITING:
+Index: linux-2.6.33.2/drivers/mtd/chips/cfi_cmdset_0002.c
+===================================================================
+--- linux-2.6.33.2.orig/drivers/mtd/chips/cfi_cmdset_0002.c 2010-04-02 23:31:00.000000000 +0200
++++ linux-2.6.33.2/drivers/mtd/chips/cfi_cmdset_0002.c 2010-04-02 23:47:32.000000000 +0200
+@@ -1068,7 +1068,9 @@
+ int retry_cnt = 0;
+
+ adr += chip->start;
+-
++#ifdef CONFIG_IFXMIPS
++ adr ^= 2;
++#endif
+ spin_lock(chip->mutex);
+ ret = get_chip(map, chip, adr, FL_WRITING);
+ if (ret) {
diff --git a/target/linux/ifxmips/patches-2.6.33/210-atm_hack.patch b/target/linux/ifxmips/patches-2.6.33/210-atm_hack.patch
new file mode 100644
index 0000000000..afe5b41cb2
--- /dev/null
+++ b/target/linux/ifxmips/patches-2.6.33/210-atm_hack.patch
@@ -0,0 +1,48 @@
+Index: linux-2.6.32.10/arch/mips/mm/cache.c
+===================================================================
+--- linux-2.6.32.10.orig/arch/mips/mm/cache.c 2010-03-15 16:52:04.000000000 +0100
++++ linux-2.6.32.10/arch/mips/mm/cache.c 2010-04-02 21:18:51.000000000 +0200
+@@ -52,6 +52,8 @@
+ void (*_dma_cache_inv)(unsigned long start, unsigned long size);
+
+ EXPORT_SYMBOL(_dma_cache_wback_inv);
++EXPORT_SYMBOL(_dma_cache_wback);
++EXPORT_SYMBOL(_dma_cache_inv);
+
+ #endif /* CONFIG_DMA_NONCOHERENT */
+
+Index: linux-2.6.32.10/net/atm/proc.c
+===================================================================
+--- linux-2.6.32.10.orig/net/atm/proc.c 2010-03-15 16:52:04.000000000 +0100
++++ linux-2.6.32.10/net/atm/proc.c 2010-04-02 21:19:46.000000000 +0200
+@@ -152,7 +152,7 @@
+ static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc)
+ {
+ static const char *const class_name[] =
+- {"off","UBR","CBR","VBR","ABR"};
++ {"off","UBR","CBR","NTR-VBR","ABR","ANY","RT-VBR","UBR+","GFR" };
+ static const char *const aal_name[] = {
+ "---", "1", "2", "3/4", /* 0- 3 */
+ "???", "5", "???", "???", /* 4- 7 */
+Index: linux-2.6.32.10/net/atm/common.c
+===================================================================
+--- linux-2.6.32.10.orig/net/atm/common.c 2010-03-15 16:52:04.000000000 +0100
++++ linux-2.6.32.10/net/atm/common.c 2010-04-02 21:21:46.000000000 +0200
+@@ -56,12 +56,17 @@
+ write_unlock_irq(&vcc_sklist_lock);
+ }
+
++struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
++EXPORT_SYMBOL(ifx_atm_alloc_tx);
+
+ static struct sk_buff *alloc_tx(struct atm_vcc *vcc,unsigned int size)
+ {
+ struct sk_buff *skb;
+ struct sock *sk = sk_atm(vcc);
+
++ if (ifx_atm_alloc_tx != NULL)
++ return ifx_atm_alloc_tx(vcc, size);
++
+ if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) {
+ pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n",
+ sk_wmem_alloc_get(sk), size,