summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/Config.in1
-rw-r--r--target/linux/config/Config.in.block13
-rw-r--r--target/linux/config/Config.in.cpu21
-rw-r--r--target/linux/config/Config.in.flash3
-rw-r--r--target/linux/config/Config.in.graphics6
-rw-r--r--target/linux/config/Config.in.input10
-rw-r--r--target/linux/config/Config.in.kernel3
-rw-r--r--target/linux/config/Config.in.netdevice27
-rw-r--r--target/linux/config/Config.in.network2
-rw-r--r--target/linux/config/Config.in.pm6
-rw-r--r--target/linux/config/Config.in.sensors25
-rw-r--r--target/linux/config/Config.in.serial15
-rw-r--r--target/linux/config/Config.in.spi4
-rw-r--r--target/linux/config/Config.in.systems24
-rw-r--r--target/linux/config/Config.in.usb8
-rw-r--r--target/linux/patches/2.6.39/cris-etrax.patch12
-rw-r--r--target/linux/patches/2.6.39/mips-malta.patch135
-rw-r--r--target/linux/patches/2.6.39/rb4xx.patch7321
18 files changed, 2448 insertions, 5188 deletions
diff --git a/target/linux/Config.in b/target/linux/Config.in
index 7b52a3003..1b78cecb5 100644
--- a/target/linux/Config.in
+++ b/target/linux/Config.in
@@ -20,6 +20,7 @@ source target/linux/config/Config.in.misc
source target/linux/config/Config.in.mips
source target/linux/config/Config.in.lib
source target/linux/config/Config.in.pm
+source target/linux/config/Config.in.serial
source target/linux/config/Config.in.spi
source target/linux/config/Config.in.kvm
source target/linux/config/Config.in.debug
diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block
index 78e7b1bd5..fe4c0a9c8 100644
--- a/target/linux/config/Config.in.block
+++ b/target/linux/config/Config.in.block
@@ -62,6 +62,9 @@ config ADK_KERNEL_MMC
config ADK_KERNEL_MMC_BLOCK
boolean
+config ADK_KERNEL_SCSI_SYM53C8XX_2
+ boolean
+
config ADK_KERNEL_MMC_AT91
boolean
select ADK_KERNEL_BLOCK
@@ -121,14 +124,16 @@ config ADK_KERNEL_ATA_PIIX
select ADK_KERNEL_ATA_BMDMA
select ADK_KERNEL_BLK_DEV
select ADK_KERNEL_BLK_DEV_SD
- default y if ADK_TARGET_SYSTEM_QEMU_MIPS64
- default y if ADK_TARGET_SYSTEM_QEMU_MIPS64EL
+ default y if ADK_TARGET_SYSTEM_QEMU_I686
default y if ADK_TARGET_SYSTEM_QEMU_MIPS
default y if ADK_TARGET_SYSTEM_QEMU_MIPSEL
- default y if ADK_TARGET_SYSTEM_QEMU_X86
+ default y if ADK_TARGET_SYSTEM_QEMU_PPC
+ default y if ADK_TARGET_SYSTEM_QEMU_SPARC
default y if ADK_TARGET_SYSTEM_QEMU_X86_64
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default n
config ADK_KERNEL_SATA_AHCI
@@ -150,6 +155,8 @@ config ADK_KPACKAGE_KMOD_SATA_AHCI
select ADK_KERNEL_BLK_DEV_SD
depends on !ADK_KERNEL_SATA_AHCI
depends on ADK_TARGET_WITH_SATA
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default n
help
Enables support for AHCI Serial ATA.
diff --git a/target/linux/config/Config.in.cpu b/target/linux/config/Config.in.cpu
index 64d9e9f3f..5be6dacfc 100644
--- a/target/linux/config/Config.in.cpu
+++ b/target/linux/config/Config.in.cpu
@@ -11,3 +11,24 @@ config ADK_KERNEL_MTRR
boolean
default y if ADK_TARGET_CPU_WITH_MTRR
default n
+
+# hyper threading
+config ADK_KERNEL_PM_SLEEP_SMP
+ boolean
+ default y if ADK_TARGET_CPU_WITH_HT
+ default n
+
+config ADK_KERNEL_SMP
+ boolean
+ default y if ADK_TARGET_CPU_WITH_HT
+ default n
+
+config ADK_KERNEL_X86_HT
+ boolean
+ default y if ADK_TARGET_CPU_WITH_HT
+ default n
+
+config ADK_KERNEL_USE_GENERIC_SMP_HELPERS
+ boolean
+ default y if ADK_TARGET_CPU_WITH_HT
+ default n
diff --git a/target/linux/config/Config.in.flash b/target/linux/config/Config.in.flash
index 3e2898617..fb4f22221 100644
--- a/target/linux/config/Config.in.flash
+++ b/target/linux/config/Config.in.flash
@@ -1,5 +1,8 @@
config ADK_KERNEL_MTD
boolean
+
+config ADK_KERNEL_MTD_MTDRAM
+ boolean
config ADK_KERNEL_MTD_NAND
boolean
diff --git a/target/linux/config/Config.in.graphics b/target/linux/config/Config.in.graphics
index 667593de9..5cbe307f0 100644
--- a/target/linux/config/Config.in.graphics
+++ b/target/linux/config/Config.in.graphics
@@ -3,6 +3,7 @@ config ADK_KERNEL_VT
default y if ADK_HARDWARE_QEMU
default y if ADK_TARGET_WITH_VGA
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default n
config ADK_KERNEL_VT_CONSOLE
@@ -10,6 +11,7 @@ config ADK_KERNEL_VT_CONSOLE
default y if ADK_HARDWARE_QEMU
default y if ADK_TARGET_WITH_VGA
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default n
config ADK_KERNEL_FONTS
@@ -71,7 +73,7 @@ config ADK_KERNEL_FB_SM7XX
Framebuffer support for Lemote Yeelong.
config ADK_HARDWARE_GRAPHICS_INTEL_I915
- prompt "................................ Support for Intel graphic cards (AGP/DRM/KMS)"
+ prompt "............................ Support for Intel graphic cards (AGP/DRM/KMS/NM10)"
boolean
select ADK_KERNEL_FB
select ADK_KERNEL_DRM
@@ -83,7 +85,7 @@ config ADK_HARDWARE_GRAPHICS_INTEL_I915
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
default n
- depends on ADK_TARGET_SYSTEM_IBM_X40 || ADK_NATIVE_SYSTEM_IBM_X40
+ depends on ADK_TARGET_SYSTEM_IBM_X40 || ADK_NATIVE_SYSTEM_IBM_X40 || ADK_TARGET_SYSTEM_INTEL_ATOM || ADK_NATIVE_SYSTEM_INTEL_ATOM
help
AGP/DRM/KMS support for Intel chipset i915.
diff --git a/target/linux/config/Config.in.input b/target/linux/config/Config.in.input
index b8566e569..65524a0d3 100644
--- a/target/linux/config/Config.in.input
+++ b/target/linux/config/Config.in.input
@@ -6,6 +6,8 @@ config ADK_KERNEL_INPUT
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2
default n
@@ -15,6 +17,8 @@ config ADK_KERNEL_INPUT_KEYBOARD
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2
default n
@@ -24,6 +28,8 @@ config ADK_KERNEL_KEYBOARD_ATKBD
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2
default n
@@ -33,6 +39,8 @@ config ADK_KERNEL_INPUT_MOUSE
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2
default n
@@ -42,6 +50,8 @@ config ADK_KERNEL_INPUT_MOUSEDEV
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2
default n
diff --git a/target/linux/config/Config.in.kernel b/target/linux/config/Config.in.kernel
index 696f7afc9..1791a624a 100644
--- a/target/linux/config/Config.in.kernel
+++ b/target/linux/config/Config.in.kernel
@@ -85,3 +85,6 @@ config ADK_KERNEL_NFS_COMMON
config ADK_KERNEL_SUNRPC
boolean
+
+config ADK_KERNEL_PCI
+ boolean
diff --git a/target/linux/config/Config.in.netdevice b/target/linux/config/Config.in.netdevice
index d9a8cd9dc..b615156f9 100644
--- a/target/linux/config/Config.in.netdevice
+++ b/target/linux/config/Config.in.netdevice
@@ -22,6 +22,16 @@ config ADK_KERNEL_NETDEV_1000
config ADK_KERNEL_VIA_RHINE_MMIO
boolean
+config ADK_KERNEL_SMC91X
+ boolean
+ select ADK_KERNEL_NETDEVICES
+ select ADK_KERNEL_NET_ETHERNET
+ select ADK_KERNEL_NET_PCI
+ select ADK_KERNEL_MII
+ default y if ADK_TARGET_QEMU_ARM_MODEL_VERSATILE
+ default n
+ help
+
config ADK_KERNEL_CPMAC
boolean
select ADK_KERNEL_NETDEVICES
@@ -42,6 +52,17 @@ config ADK_KERNEL_MACB
default n
help
+config ADK_KERNEL_PCNET32
+ boolean
+ select ADK_KERNEL_NETDEVICES
+ select ADK_KERNEL_NET_ETHERNET
+ select ADK_KERNEL_NET_PCI
+ select ADK_KERNEL_MII
+ default y if ADK_TARGET_SYSTEM_QEMU_MIPSEL
+ default y if ADK_TARGET_SYSTEM_QEMU_MIPS
+ default n
+ help
+
config ADK_KERNEL_NATSEMI
boolean
select ADK_KERNEL_NETDEVICES
@@ -135,7 +156,7 @@ config ADK_KERNEL_E1000
select ADK_KERNEL_NETDEV_1000
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
- default y if ADK_TARGET_SYSTEM_QEMU_X86
+ default y if ADK_TARGET_SYSTEM_QEMU_I686
default y if ADK_TARGET_SYSTEM_QEMU_X86_64
default n
help
@@ -154,6 +175,8 @@ config ADK_KERNEL_R8169
select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NETDEV_1000
+ select ADK_KERNEL_MII
+ select ADK_KPACKAGE_KMOD_FW_LOADER
default y if ADK_TARGET_SYSTEM_OVH_RPS
default n
help
@@ -246,6 +269,8 @@ config ADK_KPACKAGE_KMOD_R8169
select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NETDEV_1000
+ select ADK_KERNEL_MII
+ select ADK_KPACKAGE_KMOD_FW_LOADER
depends on !ADK_KERNEL_R8169
default n
help
diff --git a/target/linux/config/Config.in.network b/target/linux/config/Config.in.network
index 6e4267857..2ec253111 100644
--- a/target/linux/config/Config.in.network
+++ b/target/linux/config/Config.in.network
@@ -158,7 +158,7 @@ config ADK_KPACKAGE_KMOD_NET_IPGRE
config ADK_KPACKAGE_KMOD_IPV6
prompt "kmod-ipv6......................... IPv6 support"
tristate
- default n
+ default m
help
This is complemental support for the IP version 6.
You will still be able to do traditional IPv4 networking as well.
diff --git a/target/linux/config/Config.in.pm b/target/linux/config/Config.in.pm
index 5ffd8aca9..4e35a12b2 100644
--- a/target/linux/config/Config.in.pm
+++ b/target/linux/config/Config.in.pm
@@ -36,6 +36,8 @@ config ADK_HARDWARE_ACPI
select ADK_KERNEL_ACPI_BUTTON
select ADK_KERNEL_ACPI_FAN
select ADK_KERNEL_ACPI_DOCK
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
default n
@@ -46,6 +48,8 @@ config ADK_KERNEL_SUSPEND
prompt "Enable Suspend-to-RAM support"
boolean
select ADK_KERNEL_PM
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
default n
@@ -58,6 +62,8 @@ config ADK_KERNEL_HIBERNATION
select ADK_KERNEL_PM
select ADK_KERNEL_SWAP
select BUSYBOX_SWAPONOFF
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
default n
diff --git a/target/linux/config/Config.in.sensors b/target/linux/config/Config.in.sensors
new file mode 100644
index 000000000..941913bbd
--- /dev/null
+++ b/target/linux/config/Config.in.sensors
@@ -0,0 +1,25 @@
+menu "Sensors"
+
+config ADK_KERNEL_HWMON
+ boolean
+
+config ADK_KPACKAGE_KMOD_CORETEMP
+ prompt "kmod-coretemp..................... Coretemp"
+ boolean
+ select ADK_KERNEL_I2C
+ select ADK_KERNEL_I2C_CHARDEV
+ select ADK_KERNEL_HWMON
+ select ADK_KERNEL_EXPERIMENTAL
+ default n
+ help
+ Coretemp module
+
+config ADK_KPACKAGE_KMOD_IT87
+ prompt "kmod-it87......................... it87"
+ boolean
+ default n
+ help
+ Module for IT87 smbus chipsets
+
+endmenu
+
diff --git a/target/linux/config/Config.in.serial b/target/linux/config/Config.in.serial
new file mode 100644
index 000000000..adc25312d
--- /dev/null
+++ b/target/linux/config/Config.in.serial
@@ -0,0 +1,15 @@
+config ADK_KERNEL_SERIAL_PXA
+ boolean
+ default y if ADK_TARGET_QEMU_ARM_MODEL_SPITZ
+
+config ADK_KERNEL_SERIAL_PXA_CONSOLE
+ boolean
+ default y if ADK_TARGET_QEMU_ARM_MODEL_SPITZ
+
+config ADK_KERNEL_SERIAL_AMBA_PL011
+ boolean
+ default y if ADK_TARGET_QEMU_ARM_MODEL_VERSATILE
+
+config ADK_KERNEL_SERIAL_AMBA_PL011_CONSOLE
+ boolean
+ default y if ADK_TARGET_QEMU_ARM_MODEL_VERSATILE
diff --git a/target/linux/config/Config.in.spi b/target/linux/config/Config.in.spi
index a141f8231..73db5e86d 100644
--- a/target/linux/config/Config.in.spi
+++ b/target/linux/config/Config.in.spi
@@ -12,3 +12,7 @@ config ADK_KERNEL_SPI_RB4XX
config ADK_KERNEL_SPI_RB4XX_CPLD
select ADK_KERNEL_SPI
boolean
+
+config ADK_KERNEL_SPI_PXA2XX
+ select ADK_KERNEL_SPI
+ boolean
diff --git a/target/linux/config/Config.in.systems b/target/linux/config/Config.in.systems
index 8750ac281..3e64caddc 100644
--- a/target/linux/config/Config.in.systems
+++ b/target/linux/config/Config.in.systems
@@ -1,3 +1,10 @@
+# page size
+config ADK_KERNEL_PAGE_SIZE_4KB
+ boolean
+
+config ADK_KERNEL_PAGE_SIZE_16KB
+ boolean
+
# mips systems
config ADK_KERNEL_ATHEROS_AR231X
boolean
@@ -28,6 +35,18 @@ config ADK_KERNEL_LEMOTE_MACH2F
boolean
# arm systems
+config ADK_KERNEL_ARCH_VERSATILE
+ boolean
+
+config ADK_KERNEL_ARCH_PXA
+ boolean
+
+config ADK_KERNEL_PXA_SHARPSL
+ boolean
+
+config ADK_KERNEL_MACH_SPITZ
+ boolean
+
config ADK_KERNEL_ARCH_AT91
boolean
@@ -37,6 +56,7 @@ config ADK_KERNEL_ARCH_AT91SAM9G20
config ADK_KERNEL_MACH_ACMENETUSFOXG20
boolean
+# endianesss and ABI
config ADK_KERNEL_AEABI
boolean
@@ -45,3 +65,7 @@ config ADK_KERNEL_CPU_BIG_ENDIAN
config ADK_KERNEL_CPU_LITTLE_ENDIAN
boolean
+
+# cris systems
+config ADK_KERNEL_ETRAXFS
+ boolean
diff --git a/target/linux/config/Config.in.usb b/target/linux/config/Config.in.usb
index f16ef7dab..057fa1ffc 100644
--- a/target/linux/config/Config.in.usb
+++ b/target/linux/config/Config.in.usb
@@ -35,6 +35,8 @@ config ADK_KPACKAGE_KMOD_USB
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20
default y if ADK_TARGET_SYSTEM_FOXBOARD_LX
@@ -78,6 +80,8 @@ config ADK_KPACKAGE_KMOD_USB_UHCI_HCD
depends on !ADK_TARGET_SYSTEM_FOXBOARD_LX
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default n
help
@@ -101,6 +105,8 @@ config ADK_KPACKAGE_KMOD_USB_OHCI_HCD
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13
default y if ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default n
help
The Open Host Controller Interface (OHCI) is a standard for accessing
@@ -152,6 +158,8 @@ config ADK_KPACKAGE_KMOD_USB_EHCI_HCD
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13
+ default y if ADK_TARGET_SYSTEM_INTEL_ATOM
+ default y if ADK_NATIVE_SYSTEM_INTEL_ATOM
default y if ADK_TARGET_SYSTEM_IBM_X40
default y if ADK_NATIVE_SYSTEM_IBM_X40
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
diff --git a/target/linux/patches/2.6.39/cris-etrax.patch b/target/linux/patches/2.6.39/cris-etrax.patch
new file mode 100644
index 000000000..a80d9a8b8
--- /dev/null
+++ b/target/linux/patches/2.6.39/cris-etrax.patch
@@ -0,0 +1,12 @@
+diff -Nur linux-2.6.39.orig/arch/cris/arch-v32/drivers/i2c.h linux-2.6.39/arch/cris/arch-v32/drivers/i2c.h
+--- linux-2.6.39.orig/arch/cris/arch-v32/drivers/i2c.h 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/arch/cris/arch-v32/drivers/i2c.h 2011-08-24 19:15:05.000000000 +0200
+@@ -2,7 +2,7 @@
+ #include <linux/init.h>
+
+ /* High level I2C actions */
+-int __init i2c_init(void);
++static int __init i2c_init(void);
+ int i2c_write(unsigned char theSlave, void *data, size_t nbytes);
+ int i2c_read(unsigned char theSlave, void *data, size_t nbytes);
+ int i2c_writereg(unsigned char theSlave, unsigned char theReg, unsigned char theValue);
diff --git a/target/linux/patches/2.6.39/mips-malta.patch b/target/linux/patches/2.6.39/mips-malta.patch
new file mode 100644
index 000000000..cc8789dca
--- /dev/null
+++ b/target/linux/patches/2.6.39/mips-malta.patch
@@ -0,0 +1,135 @@
+http://lkml.indiana.edu/hypermail/linux/kernel/1105.3/02199.html
+
+diff -Nur linux-2.6.39.orig/arch/mips/include/asm/smp-ops.h linux-2.6.39/arch/mips/include/asm/smp-ops.h
+--- linux-2.6.39.orig/arch/mips/include/asm/smp-ops.h 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/arch/mips/include/asm/smp-ops.h 2011-08-29 04:39:03.360480881 +0200
+@@ -56,8 +56,43 @@
+
+ #endif /* !CONFIG_SMP */
+
+-extern struct plat_smp_ops up_smp_ops;
+-extern struct plat_smp_ops cmp_smp_ops;
+-extern struct plat_smp_ops vsmp_smp_ops;
++static inline int register_up_smp_ops(void)
++{
++#ifdef CONFIG_SMP_UP
++ extern struct plat_smp_ops up_smp_ops;
++
++ register_smp_ops(&up_smp_ops);
++
++ return 0;
++#else
++ return -ENODEV;
++#endif
++}
++
++static inline int register_cmp_smp_ops(void)
++{
++#ifdef CONFIG_MIPS_CMP
++ extern struct plat_smp_ops cmp_smp_ops;
++
++ register_smp_ops(&cmp_smp_ops);
++
++ return 0;
++#else
++ return -ENODEV;
++#endif
++}
++
++static inline int register_vsmp_smp_ops(void)
++{
++#ifdef CONFIG_MIPS_MT_SMP
++ extern struct plat_smp_ops vsmp_smp_ops;
++
++ register_smp_ops(&vsmp_smp_ops);
++
++ return 0;
++#else
++ return -ENODEV;
++#endif
++}
+
+ #endif /* __ASM_SMP_OPS_H */
+diff -Nur linux-2.6.39.orig/arch/mips/mipssim/sim_setup.c linux-2.6.39/arch/mips/mipssim/sim_setup.c
+--- linux-2.6.39.orig/arch/mips/mipssim/sim_setup.c 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/arch/mips/mipssim/sim_setup.c 2011-08-29 04:39:03.390480572 +0200
+@@ -59,18 +59,17 @@
+
+ prom_meminit();
+
+-#ifdef CONFIG_MIPS_MT_SMP
+- if (cpu_has_mipsmt)
+- register_smp_ops(&vsmp_smp_ops);
+- else
+- register_smp_ops(&up_smp_ops);
+-#endif
++ if (cpu_has_mipsmt) {
++ if (!register_vsmp_smp_ops())
++ return;
++
+ #ifdef CONFIG_MIPS_MT_SMTC
+- if (cpu_has_mipsmt)
+ register_smp_ops(&ssmtc_smp_ops);
+- else
+- register_smp_ops(&up_smp_ops);
++ return;
+ #endif
++ }
++
++ register_up_smp_ops();
+ }
+
+ static void __init serial_init(void)
+diff -Nur linux-2.6.39.orig/arch/mips/mti-malta/malta-init.c linux-2.6.39/arch/mips/mti-malta/malta-init.c
+--- linux-2.6.39.orig/arch/mips/mti-malta/malta-init.c 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/arch/mips/mti-malta/malta-init.c 2011-08-29 04:39:03.700480601 +0200
+@@ -29,6 +29,7 @@
+ #include <asm/system.h>
+ #include <asm/cacheflush.h>
+ #include <asm/traps.h>
++#include <asm/smp-ops.h>
+
+ #include <asm/gcmpregs.h>
+ #include <asm/mips-boards/prom.h>
+@@ -358,15 +359,14 @@
+ #ifdef CONFIG_SERIAL_8250_CONSOLE
+ console_config();
+ #endif
+-#ifdef CONFIG_MIPS_CMP
+ /* Early detection of CMP support */
+ if (gcmp_probe(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ))
+- register_smp_ops(&cmp_smp_ops);
+- else
+-#endif
+-#ifdef CONFIG_MIPS_MT_SMP
+- register_smp_ops(&vsmp_smp_ops);
+-#endif
++ if (!register_cmp_smp_ops())
++ return;
++
++ if (!register_vsmp_smp_ops())
++ return;
++
+ #ifdef CONFIG_MIPS_MT_SMTC
+ register_smp_ops(&msmtc_smp_ops);
+ #endif
+diff -Nur linux-2.6.39.orig/arch/mips/pmc-sierra/msp71xx/msp_setup.c linux-2.6.39/arch/mips/pmc-sierra/msp71xx/msp_setup.c
+--- linux-2.6.39.orig/arch/mips/pmc-sierra/msp71xx/msp_setup.c 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/arch/mips/pmc-sierra/msp71xx/msp_setup.c 2011-08-29 04:39:03.790480302 +0200
+@@ -228,13 +228,11 @@
+ */
+ msp_serial_setup();
+
+-#ifdef CONFIG_MIPS_MT_SMP
+- register_smp_ops(&vsmp_smp_ops);
+-#endif
+-
++ if (register_vsmp_smp_ops()) {
+ #ifdef CONFIG_MIPS_MT_SMTC
+- register_smp_ops(&msp_smtc_smp_ops);
++ register_smp_ops(&msp_smtc_smp_ops);
+ #endif
++ }
+
+ #ifdef CONFIG_PMCTWILED
+ /*
diff --git a/target/linux/patches/2.6.39/rb4xx.patch b/target/linux/patches/2.6.39/rb4xx.patch
index 49fd204d7..4f2e1cd84 100644
--- a/target/linux/patches/2.6.39/rb4xx.patch
+++ b/target/linux/patches/2.6.39/rb4xx.patch
@@ -1,6 +1,571 @@
+diff -Nur linux-2.6.39.orig/arch/mips/Kconfig linux-2.6.39/arch/mips/Kconfig
+--- linux-2.6.39.orig/arch/mips/Kconfig 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/arch/mips/Kconfig 2011-08-24 18:17:24.000000000 +0200
+@@ -84,6 +84,23 @@
+ help
+ Support for the Atheros AR71XX/AR724X/AR913X SoCs.
+
++config ATHEROS_AR71XX
++ bool "Atheros AR71xx based boards"
++ select CEVT_R4K
++ select CSRC_R4K
++ select DMA_NONCOHERENT
++ select HW_HAS_PCI
++ select IRQ_CPU
++ select ARCH_REQUIRE_GPIOLIB
++ select SYS_HAS_CPU_MIPS32_R1
++ select SYS_HAS_CPU_MIPS32_R2
++ select SYS_SUPPORTS_32BIT_KERNEL
++ select SYS_SUPPORTS_BIG_ENDIAN
++ select SYS_HAS_EARLY_PRINTK
++ select MIPS_MACHINE
++ help
++ Support for Atheros AR71xx based boards.
++
+ config BCM47XX
+ bool "Broadcom BCM47XX based boards"
+ select CEVT_R4K
+@@ -739,6 +756,7 @@
+ endchoice
+
+ source "arch/mips/alchemy/Kconfig"
++source "arch/mips/ar71xx/Kconfig"
+ source "arch/mips/ath79/Kconfig"
+ source "arch/mips/bcm63xx/Kconfig"
+ source "arch/mips/jazz/Kconfig"
+@@ -907,6 +925,9 @@
+ config MIPS_DISABLE_OBSOLETE_IDE
+ bool
+
++config MYLOADER
++ bool
++
+ config SYNC_R4K
+ bool
+
+diff -Nur linux-2.6.39.orig/arch/mips/Makefile linux-2.6.39/arch/mips/Makefile
+--- linux-2.6.39.orig/arch/mips/Makefile 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/arch/mips/Makefile 2011-08-24 18:17:24.000000000 +0200
+@@ -158,6 +158,13 @@
+ endif
+ cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1
+
++#
++# Atheros AR71xx
++#
++core-$(CONFIG_ATHEROS_AR71XX) += arch/mips/ar71xx/
++cflags-$(CONFIG_ATHEROS_AR71XX) += -I$(srctree)/arch/mips/include/asm/mach-ar71xx
++load-$(CONFIG_ATHEROS_AR71XX) += 0xffffffff80060000
++
+ cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)
+ cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(call cc-option,-mfix-r4400,)
+ cflags-$(CONFIG_CPU_DADDI_WORKAROUNDS) += $(call cc-option,-mno-daddi,)
+@@ -174,6 +181,7 @@
+ #
+ libs-$(CONFIG_ARC) += arch/mips/fw/arc/
+ libs-$(CONFIG_CFE) += arch/mips/fw/cfe/
++libs-$(CONFIG_MYLOADER) += arch/mips/fw/myloader/
+ libs-$(CONFIG_SNIPROM) += arch/mips/fw/sni/
+ libs-y += arch/mips/fw/lib/
+
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/Kconfig linux-2.6.39/arch/mips/ar71xx/Kconfig
+--- linux-2.6.39.orig/arch/mips/ar71xx/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/Kconfig 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,420 @@
++if ATHEROS_AR71XX
++
++menu "Atheros AR71xx machine selection"
++
++config AR71XX_MACH_AP81
++ bool "Atheros AP81 board support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_AP83
++ bool "Atheros AP83 board support"
++ select SOC_AR913X
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_AP96
++ bool "Atheros AP96 board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP94_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_AP121
++ bool "Atheros AP121 board support"
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ select AR71XX_DEV_AR9XXX_WMAC
++ select SOC_AR933X
++ default n
++
++config AR71XX_MACH_DB120
++ bool "Atheros DB120 board support"
++ select SOC_AR934X
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_DB120_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_DIR_600_A1
++ bool "D-Link DIR-600 rev. A1 support"
++ select SOC_AR724X
++ select AR71XX_DEV_AP91_PCI if PCI
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_NVRAM
++ default n
++
++config AR71XX_MACH_DIR_615_C1
++ bool "D-Link DIR-615 rev. C1 support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_NVRAM
++ default n
++
++config AR71XX_MACH_DIR_825_B1
++ bool "D-Link DIR-825 rev. B1 board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP94_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_JA76PF
++ bool "jjPlus JA76PF board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_PB42_PCI if PCI
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_JWAP003
++ bool "jjPlus JWAP003 board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_PB42_PCI if PCI
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_PB42
++ bool "Atheros PB42 board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_PB42_PCI if PCI
++ default n
++
++config AR71XX_MACH_PB44
++ bool "Atheros PB44 board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_PB42_PCI if PCI
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_PB92
++ bool "Atheros PB92 board support"
++ select SOC_AR724X
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_PB9X_PCI if PCI
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_AW_NR580
++ bool "AzureWave AW-NR580 board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_PB42_PCI if PCI
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_WZR_HP_AG300H
++ bool "Buffalo WZR-HP-AG300H board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_WZR_HP_G300NH
++ bool "Buffalo WZR-HP-G300NH board support"
++ select SOC_AR913X
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ select RTL8366_SMI
++ default n
++
++config AR71XX_MACH_WP543
++ bool "Compex WP543/WPJ543 board support"
++ select SOC_AR71XX
++ select MYLOADER
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_PB42_PCI if PCI
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_WRT160NL
++ bool "Linksys WRT160NL board support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ select AR71XX_NVRAM
++ default n
++
++config AR71XX_MACH_WRT400N
++ bool "Linksys WRT400N board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_AP94_PCI if PCI
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_RB4XX
++ bool "MikroTik RouterBOARD 4xx series support"
++ select SOC_AR71XX
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_RB750
++ bool "MikroTik RouterBOARD 750 support"
++ select SOC_AR724X
++ default n
++
++config AR71XX_MACH_WNDR3700
++ bool "NETGEAR WNDR3700 board support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP94_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_WNR2000
++ bool "NETGEAR WNR2000 board support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_MZK_W04NU
++ bool "Planex MZK-W04NU board support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_MZK_W300NH
++ bool "Planex MZK-W300NH board support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_NBG460N
++ bool "Zyxel NBG460N/550N/550NH board support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_TL_MR3X20
++ bool "TP-LINK TL-MR3220/3420 support"
++ select SOC_AR724X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP91_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_TL_WA901ND
++ bool "TP-LINK TL-WA901ND support"
++ select SOC_AR724X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP91_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_TL_WA901ND_V2
++ bool "TP-LINK TL-WA901ND v2 support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_TL_WR741ND
++ bool "TP-LINK TL-WR741ND support"
++ select SOC_AR724X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP91_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_TL_WR841N_V1
++ bool "TP-LINK TL-WR841N v1 support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_PB42_PCI if PCI
++ select AR71XX_DEV_DSA
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_TL_WR941ND
++ bool "TP-LINK TL-WR941ND support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_DSA
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_TL_WR1043ND
++ bool "TP-LINK TL-WR1043ND support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_TEW_632BRP
++ bool "TRENDnet TEW-632BRP support"
++ select SOC_AR913X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AR9XXX_WMAC
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_NVRAM
++ default n
++
++config AR71XX_MACH_UBNT
++ bool "Ubiquiti AR71xx based boards support"
++ select SOC_AR71XX
++ select SOC_AR724X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP91_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ select AR71XX_DEV_PB42_PCI if PCI
++ select AR71XX_DEV_USB
++ default n
++
++config AR71XX_MACH_EAP7660D
++ bool "Senao EAP7660D support"
++ select SOC_AR71XX
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++config AR71XX_MACH_ZCN_1523H
++ bool "Zcomax ZCN-1523H support"
++ select SOC_AR724X
++ select AR71XX_DEV_M25P80
++ select AR71XX_DEV_AP91_PCI if PCI
++ select AR71XX_DEV_GPIO_BUTTONS
++ select AR71XX_DEV_LEDS_GPIO
++ default n
++
++endmenu
++
++config SOC_AR71XX
++ bool
++ select USB_ARCH_HAS_EHCI
++ select USB_ARCH_HAS_OHCI
++
++config SOC_AR724X
++ bool
++ select USB_ARCH_HAS_EHCI
++ select USB_ARCH_HAS_OHCI
++
++config SOC_AR913X
++ bool
++ select USB_ARCH_HAS_EHCI
++
++config SOC_AR934X
++ bool
++ select USB_ARCH_HAS_EHCI
++
++config AR71XX_DEV_M25P80
++ def_bool n
++
++config AR71XX_DEV_AP91_PCI
++ select AR71XX_PCI_ATH9K_FIXUP
++ def_bool n
++
++config AR71XX_DEV_AP94_PCI
++ select AR71XX_PCI_ATH9K_FIXUP
++ def_bool n
++
++config AR71XX_DEV_AR9XXX_WMAC
++ def_bool n
++
++config AR71XX_DEV_DB120_PCI
++ select AR71XX_PCI_ATH9K_FIXUP
++ def_bool n
++
++config AR71XX_DEV_DSA
++ def_bool n
++
++config AR71XX_DEV_GPIO_BUTTONS
++ def_bool n
++
++config AR71XX_DEV_LEDS_GPIO
++ def_bool n
++
++config AR71XX_DEV_PB42_PCI
++ def_bool n
++
++config AR71XX_DEV_PB9X_PCI
++ def_bool n
++
++config AR71XX_DEV_USB
++ def_bool n
++
++config AR71XX_NVRAM
++ def_bool n
++
++config AR71XX_PCI_ATH9K_FIXUP
++ def_bool n
++
++config SOC_AR933X
++ bool
++ select USB_ARCH_HAS_EHCI
++
++endif
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/Makefile linux-2.6.39/arch/mips/ar71xx/Makefile
+--- linux-2.6.39.orig/arch/mips/ar71xx/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/Makefile 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,67 @@
++#
++# Makefile for the Atheros AR71xx SoC specific parts of the kernel
++#
++# Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++# Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++#
++# 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.
++
++obj-y := prom.o irq.o setup.o devices.o gpio.o ar71xx.o
++
++obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
++obj-$(CONFIG_PCI) += pci.o
++
++obj-$(CONFIG_AR71XX_DEV_AP91_PCI) += dev-ap91-pci.o
++obj-$(CONFIG_AR71XX_DEV_AP94_PCI) += dev-ap94-pci.o
++obj-$(CONFIG_AR71XX_DEV_AR9XXX_WMAC) += dev-ar9xxx-wmac.o
++obj-$(CONFIG_AR71XX_DEV_DB120_PCI) += dev-db120-pci.o
++obj-$(CONFIG_AR71XX_DEV_DSA) += dev-dsa.o
++obj-$(CONFIG_AR71XX_DEV_GPIO_BUTTONS) += dev-gpio-buttons.o
++obj-$(CONFIG_AR71XX_DEV_LEDS_GPIO) += dev-leds-gpio.o
++obj-$(CONFIG_AR71XX_DEV_M25P80) += dev-m25p80.o
++obj-$(CONFIG_AR71XX_DEV_PB42_PCI) += dev-pb42-pci.o
++obj-$(CONFIG_AR71XX_DEV_PB9X_PCI) += dev-pb9x-pci.o
++obj-$(CONFIG_AR71XX_DEV_USB) += dev-usb.o
++
++obj-$(CONFIG_AR71XX_NVRAM) += nvram.o
++obj-$(CONFIG_AR71XX_PCI_ATH9K_FIXUP) += pci-ath9k-fixup.o
++
++obj-$(CONFIG_AR71XX_MACH_AP121) += mach-ap121.o
++obj-$(CONFIG_AR71XX_MACH_AP81) += mach-ap81.o
++obj-$(CONFIG_AR71XX_MACH_AP83) += mach-ap83.o
++obj-$(CONFIG_AR71XX_MACH_AP96) += mach-ap96.o
++obj-$(CONFIG_AR71XX_MACH_AW_NR580) += mach-aw-nr580.o
++obj-$(CONFIG_AR71XX_MACH_DB120) += mach-db120.o
++obj-$(CONFIG_AR71XX_MACH_DIR_600_A1) += mach-dir-600-a1.o
++obj-$(CONFIG_AR71XX_MACH_DIR_615_C1) += mach-dir-615-c1.o
++obj-$(CONFIG_AR71XX_MACH_DIR_825_B1) += mach-dir-825-b1.o
++obj-$(CONFIG_AR71XX_MACH_EAP7660D) += mach-eap7660d.o
++obj-$(CONFIG_AR71XX_MACH_JA76PF) += mach-ja76pf.o
++obj-$(CONFIG_AR71XX_MACH_JWAP003) += mach-jwap003.o
++obj-$(CONFIG_AR71XX_MACH_MZK_W04NU) += mach-mzk-w04nu.o
++obj-$(CONFIG_AR71XX_MACH_MZK_W300NH) += mach-mzk-w300nh.o
++obj-$(CONFIG_AR71XX_MACH_NBG460N) += mach-nbg460n.o
++obj-$(CONFIG_AR71XX_MACH_PB42) += mach-pb42.o
++obj-$(CONFIG_AR71XX_MACH_PB44) += mach-pb44.o
++obj-$(CONFIG_AR71XX_MACH_PB92) += mach-pb92.o
++obj-$(CONFIG_AR71XX_MACH_RB4XX) += mach-rb4xx.o
++obj-$(CONFIG_AR71XX_MACH_RB750) += mach-rb750.o
++obj-$(CONFIG_AR71XX_MACH_TEW_632BRP) += mach-tew-632brp.o
++obj-$(CONFIG_AR71XX_MACH_TL_MR3X20) += mach-tl-mr3x20.o
++obj-$(CONFIG_AR71XX_MACH_TL_WA901ND) += mach-tl-wa901nd.o
++obj-$(CONFIG_AR71XX_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
++obj-$(CONFIG_AR71XX_MACH_TL_WR741ND) += mach-tl-wr741nd.o
++obj-$(CONFIG_AR71XX_MACH_TL_WR841N_V1) += mach-tl-wr841n.o
++obj-$(CONFIG_AR71XX_MACH_TL_WR941ND) += mach-tl-wr941nd.o
++obj-$(CONFIG_AR71XX_MACH_TL_WR1043ND) += mach-tl-wr1043nd.o
++obj-$(CONFIG_AR71XX_MACH_UBNT) += mach-ubnt.o
++obj-$(CONFIG_AR71XX_MACH_WNDR3700) += mach-wndr3700.o
++obj-$(CONFIG_AR71XX_MACH_WNR2000) += mach-wnr2000.o
++obj-$(CONFIG_AR71XX_MACH_WP543) += mach-wp543.o
++obj-$(CONFIG_AR71XX_MACH_WRT160NL) += mach-wrt160nl.o
++obj-$(CONFIG_AR71XX_MACH_WRT400N) += mach-wrt400n.o
++obj-$(CONFIG_AR71XX_MACH_WZR_HP_G300NH) += mach-wzr-hp-g300nh.o
++obj-$(CONFIG_AR71XX_MACH_WZR_HP_AG300H) += mach-wzr-hp-ag300h.o
++obj-$(CONFIG_AR71XX_MACH_ZCN_1523H) += mach-zcn-1523h.o
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/ar71xx.c linux-2.6.39/arch/mips/ar71xx/ar71xx.c
--- linux-2.6.39.orig/arch/mips/ar71xx/ar71xx.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/ar71xx.c 2011-08-24 02:41:55.227990426 +0200
++++ linux-2.6.39/arch/mips/ar71xx/ar71xx.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,230 @@
+/*
+ * AR71xx SoC routines
@@ -234,7 +799,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/ar71xx.c linux-2.6.39/arch/mips/ar7
+EXPORT_SYMBOL_GPL(ar71xx_flash_release);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap91-pci.c linux-2.6.39/arch/mips/ar71xx/dev-ap91-pci.c
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-ap91-pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-ap91-pci.c 2011-08-24 02:41:55.277990824 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-ap91-pci.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,71 @@
+/*
+ * Atheros AP91 reference board PCI initialization
@@ -309,7 +874,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap91-pci.c linux-2.6.39/arch/mi
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap91-pci.h linux-2.6.39/arch/mips/ar71xx/dev-ap91-pci.h
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-ap91-pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-ap91-pci.h 2011-08-24 02:41:55.287981779 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-ap91-pci.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,25 @@
+/*
+ * Atheros AP91 reference board PCI initialization
@@ -338,7 +903,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap91-pci.h linux-2.6.39/arch/mi
+
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap94-pci.c linux-2.6.39/arch/mips/ar71xx/dev-ap94-pci.c
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-ap94-pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-ap94-pci.c 2011-08-24 02:41:55.287981779 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-ap94-pci.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,109 @@
+/*
+ * Atheros AP94 reference board PCI initialization
@@ -451,7 +1016,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap94-pci.c linux-2.6.39/arch/mi
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap94-pci.h linux-2.6.39/arch/mips/ar71xx/dev-ap94-pci.h
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-ap94-pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-ap94-pci.h 2011-08-24 02:41:55.287981779 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-ap94-pci.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,31 @@
+/*
+ * Atheros AP94 reference board PCI initialization
@@ -486,7 +1051,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ap94-pci.h linux-2.6.39/arch/mi
+
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ar9xxx-wmac.c linux-2.6.39/arch/mips/ar71xx/dev-ar9xxx-wmac.c
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-ar9xxx-wmac.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-ar9xxx-wmac.c 2011-08-24 02:41:55.287981779 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-ar9xxx-wmac.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,154 @@
+/*
+ * Atheros AR9XXX SoCs built-in WMAC device support
@@ -644,7 +1209,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ar9xxx-wmac.c linux-2.6.39/arch
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ar9xxx-wmac.h linux-2.6.39/arch/mips/ar71xx/dev-ar9xxx-wmac.h
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-ar9xxx-wmac.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-ar9xxx-wmac.h 2011-08-24 02:41:55.297981663 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-ar9xxx-wmac.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,20 @@
+/*
+ * Atheros AR9XXX SoCs built-in WMAC device support
@@ -668,7 +1233,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-ar9xxx-wmac.h linux-2.6.39/arch
+#endif /* _AR71XX_DEV_AR9XXX_WMAC_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-db120-pci.c linux-2.6.39/arch/mips/ar71xx/dev-db120-pci.c
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-db120-pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-db120-pci.c 2011-08-24 02:41:55.317990461 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-db120-pci.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,31 @@
+/*
+ * Atheros db120 reference board PCI initialization
@@ -703,7 +1268,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-db120-pci.c linux-2.6.39/arch/m
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-db120-pci.h linux-2.6.39/arch/mips/ar71xx/dev-db120-pci.h
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-db120-pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-db120-pci.h 2011-08-24 02:41:55.327990934 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-db120-pci.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,22 @@
+/*
+ * Atheros DB120 reference board PCI initialization
@@ -729,7 +1294,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-db120-pci.h linux-2.6.39/arch/m
+#endif /* _AR71XX_DEV_DB120_PCI_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-dsa.c linux-2.6.39/arch/mips/ar71xx/dev-dsa.c
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-dsa.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-dsa.c 2011-08-24 02:41:55.337990441 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-dsa.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,50 @@
+/*
+ * Atheros AR71xx DSA switch device support
@@ -783,7 +1348,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-dsa.c linux-2.6.39/arch/mips/ar
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-dsa.h linux-2.6.39/arch/mips/ar71xx/dev-dsa.h
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-dsa.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-dsa.h 2011-08-24 02:41:55.347990727 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-dsa.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,20 @@
+/*
+ * Atheros AR71xx DSA switch device support
@@ -807,7 +1372,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-dsa.h linux-2.6.39/arch/mips/ar
+#endif /* _AR71XX_DEV_DSA_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-gpio-buttons.c linux-2.6.39/arch/mips/ar71xx/dev-gpio-buttons.c
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-gpio-buttons.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-gpio-buttons.c 2011-08-24 02:41:55.347990727 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-gpio-buttons.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,58 @@
+/*
+ * Atheros AR71xx GPIO button support
@@ -869,7 +1434,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-gpio-buttons.c linux-2.6.39/arc
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-gpio-buttons.h linux-2.6.39/arch/mips/ar71xx/dev-gpio-buttons.h
--- linux-2.6.39.orig/arch/mips/ar71xx/dev-gpio-buttons.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-gpio-buttons.h 2011-08-24 02:41:55.347990727 +0200
++++ linux-2.6.39/arch/mips/ar71xx/dev-gpio-buttons.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,23 @@
+/*
+ * Atheros AR71xx GPIO button support
@@ -894,9 +1459,505 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-gpio-buttons.h linux-2.6.39/arc
+ struct gpio_keys_button *buttons);
+
+#endif /* _AR71XX_DEV_GPIO_BUTTONS_H */
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.c linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.c
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.c 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,57 @@
++/*
++ * Atheros AR71xx GPIO LED device support
++ *
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * Parts of this file are based on Atheros' 2.6.15 BSP
++ *
++ * 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/init.h>
++#include <linux/slab.h>
++#include <linux/platform_device.h>
++
++#include "dev-leds-gpio.h"
++
++void __init ar71xx_add_device_leds_gpio(int id, unsigned num_leds,
++ struct gpio_led *leds)
++{
++ struct platform_device *pdev;
++ struct gpio_led_platform_data pdata;
++ struct gpio_led *p;
++ int err;
++
++ p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL);
++ if (!p)
++ return;
++
++ memcpy(p, leds, num_leds * sizeof(*p));
++
++ pdev = platform_device_alloc("leds-gpio", id);
++ if (!pdev)
++ goto err_free_leds;
++
++ memset(&pdata, 0, sizeof(pdata));
++ pdata.num_leds = num_leds;
++ pdata.leds = p;
++
++ err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
++ if (err)
++ goto err_put_pdev;
++
++ err = platform_device_add(pdev);
++ if (err)
++ goto err_put_pdev;
++
++ return;
++
++err_put_pdev:
++ platform_device_put(pdev);
++
++err_free_leds:
++ kfree(p);
++}
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.h linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.h
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.h 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,21 @@
++/*
++ * Atheros AR71xx GPIO LED device support
++ *
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation.
++ */
++
++#ifndef _AR71XX_DEV_LEDS_GPIO_H
++#define _AR71XX_DEV_LEDS_GPIO_H
++
++#include <linux/leds.h>
++
++void ar71xx_add_device_leds_gpio(int id,
++ unsigned num_leds,
++ struct gpio_led *leds) __init;
++
++#endif /* _AR71XX_DEV_LEDS_GPIO_H */
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.c linux-2.6.39/arch/mips/ar71xx/dev-m25p80.c
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-m25p80.c 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,30 @@
++/*
++ * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
++ *
++ * 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/init.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/flash.h>
++
++#include "devices.h"
++#include "dev-m25p80.h"
++
++static struct spi_board_info ar71xx_spi_info[] = {
++ {
++ .bus_num = 0,
++ .chip_select = 0,
++ .max_speed_hz = 25000000,
++ .modalias = "m25p80",
++ }
++};
++
++void __init ar71xx_add_device_m25p80(struct flash_platform_data *pdata)
++{
++ ar71xx_spi_info[0].platform_data = pdata;
++ ar71xx_add_device_spi(NULL, ar71xx_spi_info,
++ ARRAY_SIZE(ar71xx_spi_info));
++}
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.h linux-2.6.39/arch/mips/ar71xx/dev-m25p80.h
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-m25p80.h 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,16 @@
++/*
++ * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation.
++ */
++
++#ifndef _AR71XX_DEV_M25P80_H
++#define _AR71XX_DEV_M25P80_H
++
++#include <linux/spi/flash.h>
++
++void ar71xx_add_device_m25p80(struct flash_platform_data *pdata) __init;
++
++#endif /* _AR71XX_DEV_M25P80_H */
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.c linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.c
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.c 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,40 @@
++/*
++ * Atheros PB42 reference board PCI initialization
++ *
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * Parts of this file are based on Atheros' 2.6.15 BSP
++ *
++ * 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/pci.h>
++
++#include <asm/mach-ar71xx/ar71xx.h>
++#include <asm/mach-ar71xx/pci.h>
++
++#include "dev-pb42-pci.h"
++
++static struct ar71xx_pci_irq pb42_pci_irqs[] __initdata = {
++ {
++ .slot = 0,
++ .pin = 1,
++ .irq = AR71XX_PCI_IRQ_DEV0,
++ }, {
++ .slot = 1,
++ .pin = 1,
++ .irq = AR71XX_PCI_IRQ_DEV1,
++ }, {
++ .slot = 2,
++ .pin = 1,
++ .irq = AR71XX_PCI_IRQ_DEV2,
++ }
++};
++
++void __init pb42_pci_init(void)
++{
++ ar71xx_pci_init(ARRAY_SIZE(pb42_pci_irqs), pb42_pci_irqs);
++}
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.h linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.h
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.h 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,21 @@
++/*
++ * Atheros PB42 reference board PCI initialization
++ *
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation.
++ */
++
++#ifndef _AR71XX_DEV_PB42_PCI_H
++#define _AR71XX_DEV_PB42_PCI_H
++
++#if defined(CONFIG_AR71XX_DEV_PB42_PCI)
++void pb42_pci_init(void) __init;
++#else
++static inline void pb42_pci_init(void) { }
++#endif
++
++#endif /* _AR71XX_DEV_PB42_PCI_H */
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.c linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.c
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.c 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,33 @@
++/*
++ * Atheros PB9x reference board PCI initialization
++ *
++ * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * Parts of this file are based on Atheros' 2.6.15 BSP
++ *
++ * 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/pci.h>
++
++#include <asm/mach-ar71xx/ar71xx.h>
++#include <asm/mach-ar71xx/pci.h>
++
++#include "dev-pb9x-pci.h"
++
++static struct ar71xx_pci_irq pb9x_pci_irqs[] __initdata = {
++ {
++ .slot = 0,
++ .pin = 1,
++ .irq = AR71XX_PCI_IRQ_DEV0,
++ }
++};
++
++void __init pb9x_pci_init(void)
++{
++ ar71xx_pci_init(ARRAY_SIZE(pb9x_pci_irqs), pb9x_pci_irqs);
++}
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.h linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.h
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.h 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,22 @@
++/*
++ * Atheros PB9x reference board PCI initialization
++ *
++ * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation.
++ */
++
++#ifndef _AR71XX_DEV_PB9X_PCI_H
++#define _AR71XX_DEV_PB9X_PCI_H
++
++#if defined(CONFIG_AR71XX_DEV_PB9X_PCI)
++void pb9x_pci_init(void) __init;
++#else
++static inline void pb9x_pci_init(void) { }
++#endif
++
++#endif /* _AR71XX_DEV_PB9X_PCI_H */
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.c linux-2.6.39/arch/mips/ar71xx/dev-usb.c
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-usb.c 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,199 @@
++/*
++ * Atheros AR71xx USB host device support
++ *
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * Parts of this file are based on Atheros' 2.6.15 BSP
++ *
++ * 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/init.h>
++#include <linux/delay.h>
++#include <linux/dma-mapping.h>
++#include <linux/platform_device.h>
++
++#include <asm/mach-ar71xx/ar71xx.h>
++#include <asm/mach-ar71xx/platform.h>
++
++#include "dev-usb.h"
++
++/*
++ * OHCI (USB full speed host controller)
++ */
++static struct resource ar71xx_ohci_resources[] = {
++ [0] = {
++ .start = AR71XX_OHCI_BASE,
++ .end = AR71XX_OHCI_BASE + AR71XX_OHCI_SIZE - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = AR71XX_MISC_IRQ_OHCI,
++ .end = AR71XX_MISC_IRQ_OHCI,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct resource ar7240_ohci_resources[] = {
++ [0] = {
++ .start = AR7240_OHCI_BASE,
++ .end = AR7240_OHCI_BASE + AR7240_OHCI_SIZE - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = AR71XX_CPU_IRQ_USB,
++ .end = AR71XX_CPU_IRQ_USB,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static u64 ar71xx_ohci_dmamask = DMA_BIT_MASK(32);
++static struct platform_device ar71xx_ohci_device = {
++ .name = "ar71xx-ohci",
++ .id = -1,
++ .resource = ar71xx_ohci_resources,
++ .num_resources = ARRAY_SIZE(ar71xx_ohci_resources),
++ .dev = {
++ .dma_mask = &ar71xx_ohci_dmamask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++};
++
++/*
++ * EHCI (USB high/full speed host controller)
++ */
++static struct resource ar71xx_ehci_resources[] = {
++ [0] = {
++ .start = AR71XX_EHCI_BASE,
++ .end = AR71XX_EHCI_BASE + AR71XX_EHCI_SIZE - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = AR71XX_CPU_IRQ_USB,
++ .end = AR71XX_CPU_IRQ_USB,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static u64 ar71xx_ehci_dmamask = DMA_BIT_MASK(32);
++static struct ar71xx_ehci_platform_data ar71xx_ehci_data;
++
++static struct platform_device ar71xx_ehci_device = {
++ .name = "ar71xx-ehci",
++ .id = -1,
++ .resource = ar71xx_ehci_resources,
++ .num_resources = ARRAY_SIZE(ar71xx_ehci_resources),
++ .dev = {
++ .dma_mask = &ar71xx_ehci_dmamask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ .platform_data = &ar71xx_ehci_data,
++ },
++};
++
++#define AR71XX_USB_RESET_MASK \
++ (RESET_MODULE_USB_HOST | RESET_MODULE_USB_PHY \
++ | RESET_MODULE_USB_OHCI_DLL)
++
++#define AR7240_USB_RESET_MASK \
++ (RESET_MODULE_USB_HOST | RESET_MODULE_USB_OHCI_DLL_7240)
++
++static void __init ar71xx_usb_setup(void)
++{
++ ar71xx_device_stop(AR71XX_USB_RESET_MASK);
++ mdelay(1000);
++ ar71xx_device_start(AR71XX_USB_RESET_MASK);
++
++ /* Turning on the Buff and Desc swap bits */
++ ar71xx_usb_ctrl_wr(USB_CTRL_REG_CONFIG, 0xf0000);
++
++ /* WAR for HW bug. Here it adjusts the duration between two SOFS */
++ ar71xx_usb_ctrl_wr(USB_CTRL_REG_FLADJ, 0x20c00);
++
++ mdelay(900);
++
++ platform_device_register(&ar71xx_ohci_device);
++ platform_device_register(&ar71xx_ehci_device);
++}
++
++static void __init ar7240_usb_setup(void)
++{
++ ar71xx_device_stop(AR7240_USB_RESET_MASK);
++ mdelay(1000);
++ ar71xx_device_start(AR7240_USB_RESET_MASK);
++
++ /* WAR for HW bug. Here it adjusts the duration between two SOFS */
++ ar71xx_usb_ctrl_wr(USB_CTRL_REG_FLADJ, 0x3);
++
++ ar71xx_ohci_device.resource = ar7240_ohci_resources;
++ ar71xx_ohci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources);
++ platform_device_register(&ar71xx_ohci_device);
++}
++
++static void __init ar7241_usb_setup(void)
++{
++ ar71xx_device_start(AR724X_RESET_USBSUS_OVERRIDE);
++ mdelay(10);
++
++ ar71xx_device_start(AR724X_RESET_USB_HOST);
++ mdelay(10);
++
++ ar71xx_device_start(AR724X_RESET_USB_PHY);
++ mdelay(10);
++
++ ar71xx_ehci_data.is_ar91xx = 1;
++ ar71xx_ehci_device.resource = ar7240_ohci_resources;
++ ar71xx_ehci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources);
++ platform_device_register(&ar71xx_ehci_device);
++}
++
++static void __init ar91xx_usb_setup(void)
++{
++ ar71xx_device_stop(RESET_MODULE_USBSUS_OVERRIDE);
++ mdelay(10);
++
++ ar71xx_device_start(RESET_MODULE_USB_HOST);
++ mdelay(10);
++
++ ar71xx_device_start(RESET_MODULE_USB_PHY);
++ mdelay(10);
++
++ ar71xx_ehci_data.is_ar91xx = 1;
++ platform_device_register(&ar71xx_ehci_device);
++}
++
++void __init ar71xx_add_device_usb(void)
++{
++ switch (ar71xx_soc) {
++ case AR71XX_SOC_AR7240:
++ ar7240_usb_setup();
++ break;
++
++ case AR71XX_SOC_AR7241:
++ case AR71XX_SOC_AR7242:
++ ar7241_usb_setup();
++ break;
++
++ case AR71XX_SOC_AR7130:
++ case AR71XX_SOC_AR7141:
++ case AR71XX_SOC_AR7161:
++ ar71xx_usb_setup();
++ break;
++
++ case AR71XX_SOC_AR9130:
++ case AR71XX_SOC_AR9132:
++ case AR71XX_SOC_AR9330:
++ case AR71XX_SOC_AR9331:
++ case AR71XX_SOC_AR9341:
++ case AR71XX_SOC_AR9342:
++ case AR71XX_SOC_AR9344:
++ ar91xx_usb_setup();
++ break;
++
++ default:
++ BUG();
++ }
++}
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.h linux-2.6.39/arch/mips/ar71xx/dev-usb.h
+--- linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/dev-usb.h 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,17 @@
++/*
++ * Atheros AR71xx USB host device support
++ *
++ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation.
++ */
++
++#ifndef _AR71XX_DEV_USB_H
++#define _AR71XX_DEV_USB_H
++
++void ar71xx_add_device_usb(void) __init;
++
++#endif /* _AR71XX_DEV_USB_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/devices.c linux-2.6.39/arch/mips/ar71xx/devices.c
--- linux-2.6.39.orig/arch/mips/ar71xx/devices.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/devices.c 2011-08-24 02:41:55.347990727 +0200
++++ linux-2.6.39/arch/mips/ar71xx/devices.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,765 @@
+/*
+ * Atheros AR71xx SoC platform devices
@@ -1665,7 +2726,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/devices.c linux-2.6.39/arch/mips/ar
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/devices.h linux-2.6.39/arch/mips/ar71xx/devices.h
--- linux-2.6.39.orig/arch/mips/ar71xx/devices.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/devices.h 2011-08-24 02:41:55.347990727 +0200
++++ linux-2.6.39/arch/mips/ar71xx/devices.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,50 @@
+/*
+ * Atheros AR71xx SoC device definitions
@@ -1717,505 +2778,9 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/devices.h linux-2.6.39/arch/mips/ar
+void ar71xx_add_device_wdt(void) __init;
+
+#endif /* __AR71XX_DEVICES_H */
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.c linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.c
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.c 2011-08-24 02:41:55.347990727 +0200
-@@ -0,0 +1,57 @@
-+/*
-+ * Atheros AR71xx GPIO LED device support
-+ *
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * Parts of this file are based on Atheros' 2.6.15 BSP
-+ *
-+ * 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/init.h>
-+#include <linux/slab.h>
-+#include <linux/platform_device.h>
-+
-+#include "dev-leds-gpio.h"
-+
-+void __init ar71xx_add_device_leds_gpio(int id, unsigned num_leds,
-+ struct gpio_led *leds)
-+{
-+ struct platform_device *pdev;
-+ struct gpio_led_platform_data pdata;
-+ struct gpio_led *p;
-+ int err;
-+
-+ p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL);
-+ if (!p)
-+ return;
-+
-+ memcpy(p, leds, num_leds * sizeof(*p));
-+
-+ pdev = platform_device_alloc("leds-gpio", id);
-+ if (!pdev)
-+ goto err_free_leds;
-+
-+ memset(&pdata, 0, sizeof(pdata));
-+ pdata.num_leds = num_leds;
-+ pdata.leds = p;
-+
-+ err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
-+ if (err)
-+ goto err_put_pdev;
-+
-+ err = platform_device_add(pdev);
-+ if (err)
-+ goto err_put_pdev;
-+
-+ return;
-+
-+err_put_pdev:
-+ platform_device_put(pdev);
-+
-+err_free_leds:
-+ kfree(p);
-+}
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.h linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.h
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-leds-gpio.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-leds-gpio.h 2011-08-24 02:41:55.367990903 +0200
-@@ -0,0 +1,21 @@
-+/*
-+ * Atheros AR71xx GPIO LED device support
-+ *
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ */
-+
-+#ifndef _AR71XX_DEV_LEDS_GPIO_H
-+#define _AR71XX_DEV_LEDS_GPIO_H
-+
-+#include <linux/leds.h>
-+
-+void ar71xx_add_device_leds_gpio(int id,
-+ unsigned num_leds,
-+ struct gpio_led *leds) __init;
-+
-+#endif /* _AR71XX_DEV_LEDS_GPIO_H */
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.c linux-2.6.39/arch/mips/ar71xx/dev-m25p80.c
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-m25p80.c 2011-08-24 02:41:55.367990903 +0200
-@@ -0,0 +1,30 @@
-+/*
-+ * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
-+ *
-+ * 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/init.h>
-+#include <linux/spi/spi.h>
-+#include <linux/spi/flash.h>
-+
-+#include "devices.h"
-+#include "dev-m25p80.h"
-+
-+static struct spi_board_info ar71xx_spi_info[] = {
-+ {
-+ .bus_num = 0,
-+ .chip_select = 0,
-+ .max_speed_hz = 25000000,
-+ .modalias = "m25p80",
-+ }
-+};
-+
-+void __init ar71xx_add_device_m25p80(struct flash_platform_data *pdata)
-+{
-+ ar71xx_spi_info[0].platform_data = pdata;
-+ ar71xx_add_device_spi(NULL, ar71xx_spi_info,
-+ ARRAY_SIZE(ar71xx_spi_info));
-+}
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.h linux-2.6.39/arch/mips/ar71xx/dev-m25p80.h
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-m25p80.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-m25p80.h 2011-08-24 02:41:55.377990515 +0200
-@@ -0,0 +1,16 @@
-+/*
-+ * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ */
-+
-+#ifndef _AR71XX_DEV_M25P80_H
-+#define _AR71XX_DEV_M25P80_H
-+
-+#include <linux/spi/flash.h>
-+
-+void ar71xx_add_device_m25p80(struct flash_platform_data *pdata) __init;
-+
-+#endif /* _AR71XX_DEV_M25P80_H */
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.c linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.c
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.c 2011-08-24 02:41:55.377990515 +0200
-@@ -0,0 +1,40 @@
-+/*
-+ * Atheros PB42 reference board PCI initialization
-+ *
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * Parts of this file are based on Atheros' 2.6.15 BSP
-+ *
-+ * 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/pci.h>
-+
-+#include <asm/mach-ar71xx/ar71xx.h>
-+#include <asm/mach-ar71xx/pci.h>
-+
-+#include "dev-pb42-pci.h"
-+
-+static struct ar71xx_pci_irq pb42_pci_irqs[] __initdata = {
-+ {
-+ .slot = 0,
-+ .pin = 1,
-+ .irq = AR71XX_PCI_IRQ_DEV0,
-+ }, {
-+ .slot = 1,
-+ .pin = 1,
-+ .irq = AR71XX_PCI_IRQ_DEV1,
-+ }, {
-+ .slot = 2,
-+ .pin = 1,
-+ .irq = AR71XX_PCI_IRQ_DEV2,
-+ }
-+};
-+
-+void __init pb42_pci_init(void)
-+{
-+ ar71xx_pci_init(ARRAY_SIZE(pb42_pci_irqs), pb42_pci_irqs);
-+}
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.h linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.h
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb42-pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-pb42-pci.h 2011-08-24 02:41:55.387991243 +0200
-@@ -0,0 +1,21 @@
-+/*
-+ * Atheros PB42 reference board PCI initialization
-+ *
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ */
-+
-+#ifndef _AR71XX_DEV_PB42_PCI_H
-+#define _AR71XX_DEV_PB42_PCI_H
-+
-+#if defined(CONFIG_AR71XX_DEV_PB42_PCI)
-+void pb42_pci_init(void) __init;
-+#else
-+static inline void pb42_pci_init(void) { }
-+#endif
-+
-+#endif /* _AR71XX_DEV_PB42_PCI_H */
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.c linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.c
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.c 2011-08-24 02:41:55.387991243 +0200
-@@ -0,0 +1,33 @@
-+/*
-+ * Atheros PB9x reference board PCI initialization
-+ *
-+ * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * Parts of this file are based on Atheros' 2.6.15 BSP
-+ *
-+ * 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/pci.h>
-+
-+#include <asm/mach-ar71xx/ar71xx.h>
-+#include <asm/mach-ar71xx/pci.h>
-+
-+#include "dev-pb9x-pci.h"
-+
-+static struct ar71xx_pci_irq pb9x_pci_irqs[] __initdata = {
-+ {
-+ .slot = 0,
-+ .pin = 1,
-+ .irq = AR71XX_PCI_IRQ_DEV0,
-+ }
-+};
-+
-+void __init pb9x_pci_init(void)
-+{
-+ ar71xx_pci_init(ARRAY_SIZE(pb9x_pci_irqs), pb9x_pci_irqs);
-+}
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.h linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.h
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-pb9x-pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-pb9x-pci.h 2011-08-24 02:41:55.387991243 +0200
-@@ -0,0 +1,22 @@
-+/*
-+ * Atheros PB9x reference board PCI initialization
-+ *
-+ * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ */
-+
-+#ifndef _AR71XX_DEV_PB9X_PCI_H
-+#define _AR71XX_DEV_PB9X_PCI_H
-+
-+#if defined(CONFIG_AR71XX_DEV_PB9X_PCI)
-+void pb9x_pci_init(void) __init;
-+#else
-+static inline void pb9x_pci_init(void) { }
-+#endif
-+
-+#endif /* _AR71XX_DEV_PB9X_PCI_H */
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.c linux-2.6.39/arch/mips/ar71xx/dev-usb.c
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-usb.c 2011-08-24 02:41:55.417990329 +0200
-@@ -0,0 +1,199 @@
-+/*
-+ * Atheros AR71xx USB host device support
-+ *
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * Parts of this file are based on Atheros' 2.6.15 BSP
-+ *
-+ * 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/init.h>
-+#include <linux/delay.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/platform_device.h>
-+
-+#include <asm/mach-ar71xx/ar71xx.h>
-+#include <asm/mach-ar71xx/platform.h>
-+
-+#include "dev-usb.h"
-+
-+/*
-+ * OHCI (USB full speed host controller)
-+ */
-+static struct resource ar71xx_ohci_resources[] = {
-+ [0] = {
-+ .start = AR71XX_OHCI_BASE,
-+ .end = AR71XX_OHCI_BASE + AR71XX_OHCI_SIZE - 1,
-+ .flags = IORESOURCE_MEM,
-+ },
-+ [1] = {
-+ .start = AR71XX_MISC_IRQ_OHCI,
-+ .end = AR71XX_MISC_IRQ_OHCI,
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static struct resource ar7240_ohci_resources[] = {
-+ [0] = {
-+ .start = AR7240_OHCI_BASE,
-+ .end = AR7240_OHCI_BASE + AR7240_OHCI_SIZE - 1,
-+ .flags = IORESOURCE_MEM,
-+ },
-+ [1] = {
-+ .start = AR71XX_CPU_IRQ_USB,
-+ .end = AR71XX_CPU_IRQ_USB,
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static u64 ar71xx_ohci_dmamask = DMA_BIT_MASK(32);
-+static struct platform_device ar71xx_ohci_device = {
-+ .name = "ar71xx-ohci",
-+ .id = -1,
-+ .resource = ar71xx_ohci_resources,
-+ .num_resources = ARRAY_SIZE(ar71xx_ohci_resources),
-+ .dev = {
-+ .dma_mask = &ar71xx_ohci_dmamask,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ },
-+};
-+
-+/*
-+ * EHCI (USB high/full speed host controller)
-+ */
-+static struct resource ar71xx_ehci_resources[] = {
-+ [0] = {
-+ .start = AR71XX_EHCI_BASE,
-+ .end = AR71XX_EHCI_BASE + AR71XX_EHCI_SIZE - 1,
-+ .flags = IORESOURCE_MEM,
-+ },
-+ [1] = {
-+ .start = AR71XX_CPU_IRQ_USB,
-+ .end = AR71XX_CPU_IRQ_USB,
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static u64 ar71xx_ehci_dmamask = DMA_BIT_MASK(32);
-+static struct ar71xx_ehci_platform_data ar71xx_ehci_data;
-+
-+static struct platform_device ar71xx_ehci_device = {
-+ .name = "ar71xx-ehci",
-+ .id = -1,
-+ .resource = ar71xx_ehci_resources,
-+ .num_resources = ARRAY_SIZE(ar71xx_ehci_resources),
-+ .dev = {
-+ .dma_mask = &ar71xx_ehci_dmamask,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ .platform_data = &ar71xx_ehci_data,
-+ },
-+};
-+
-+#define AR71XX_USB_RESET_MASK \
-+ (RESET_MODULE_USB_HOST | RESET_MODULE_USB_PHY \
-+ | RESET_MODULE_USB_OHCI_DLL)
-+
-+#define AR7240_USB_RESET_MASK \
-+ (RESET_MODULE_USB_HOST | RESET_MODULE_USB_OHCI_DLL_7240)
-+
-+static void __init ar71xx_usb_setup(void)
-+{
-+ ar71xx_device_stop(AR71XX_USB_RESET_MASK);
-+ mdelay(1000);
-+ ar71xx_device_start(AR71XX_USB_RESET_MASK);
-+
-+ /* Turning on the Buff and Desc swap bits */
-+ ar71xx_usb_ctrl_wr(USB_CTRL_REG_CONFIG, 0xf0000);
-+
-+ /* WAR for HW bug. Here it adjusts the duration between two SOFS */
-+ ar71xx_usb_ctrl_wr(USB_CTRL_REG_FLADJ, 0x20c00);
-+
-+ mdelay(900);
-+
-+ platform_device_register(&ar71xx_ohci_device);
-+ platform_device_register(&ar71xx_ehci_device);
-+}
-+
-+static void __init ar7240_usb_setup(void)
-+{
-+ ar71xx_device_stop(AR7240_USB_RESET_MASK);
-+ mdelay(1000);
-+ ar71xx_device_start(AR7240_USB_RESET_MASK);
-+
-+ /* WAR for HW bug. Here it adjusts the duration between two SOFS */
-+ ar71xx_usb_ctrl_wr(USB_CTRL_REG_FLADJ, 0x3);
-+
-+ ar71xx_ohci_device.resource = ar7240_ohci_resources;
-+ ar71xx_ohci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources);
-+ platform_device_register(&ar71xx_ohci_device);
-+}
-+
-+static void __init ar7241_usb_setup(void)
-+{
-+ ar71xx_device_start(AR724X_RESET_USBSUS_OVERRIDE);
-+ mdelay(10);
-+
-+ ar71xx_device_start(AR724X_RESET_USB_HOST);
-+ mdelay(10);
-+
-+ ar71xx_device_start(AR724X_RESET_USB_PHY);
-+ mdelay(10);
-+
-+ ar71xx_ehci_data.is_ar91xx = 1;
-+ ar71xx_ehci_device.resource = ar7240_ohci_resources;
-+ ar71xx_ehci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources);
-+ platform_device_register(&ar71xx_ehci_device);
-+}
-+
-+static void __init ar91xx_usb_setup(void)
-+{
-+ ar71xx_device_stop(RESET_MODULE_USBSUS_OVERRIDE);
-+ mdelay(10);
-+
-+ ar71xx_device_start(RESET_MODULE_USB_HOST);
-+ mdelay(10);
-+
-+ ar71xx_device_start(RESET_MODULE_USB_PHY);
-+ mdelay(10);
-+
-+ ar71xx_ehci_data.is_ar91xx = 1;
-+ platform_device_register(&ar71xx_ehci_device);
-+}
-+
-+void __init ar71xx_add_device_usb(void)
-+{
-+ switch (ar71xx_soc) {
-+ case AR71XX_SOC_AR7240:
-+ ar7240_usb_setup();
-+ break;
-+
-+ case AR71XX_SOC_AR7241:
-+ case AR71XX_SOC_AR7242:
-+ ar7241_usb_setup();
-+ break;
-+
-+ case AR71XX_SOC_AR7130:
-+ case AR71XX_SOC_AR7141:
-+ case AR71XX_SOC_AR7161:
-+ ar71xx_usb_setup();
-+ break;
-+
-+ case AR71XX_SOC_AR9130:
-+ case AR71XX_SOC_AR9132:
-+ case AR71XX_SOC_AR9330:
-+ case AR71XX_SOC_AR9331:
-+ case AR71XX_SOC_AR9341:
-+ case AR71XX_SOC_AR9342:
-+ case AR71XX_SOC_AR9344:
-+ ar91xx_usb_setup();
-+ break;
-+
-+ default:
-+ BUG();
-+ }
-+}
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.h linux-2.6.39/arch/mips/ar71xx/dev-usb.h
---- linux-2.6.39.orig/arch/mips/ar71xx/dev-usb.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/dev-usb.h 2011-08-24 02:41:55.427989786 +0200
-@@ -0,0 +1,17 @@
-+/*
-+ * Atheros AR71xx USB host device support
-+ *
-+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ */
-+
-+#ifndef _AR71XX_DEV_USB_H
-+#define _AR71XX_DEV_USB_H
-+
-+void ar71xx_add_device_usb(void) __init;
-+
-+#endif /* _AR71XX_DEV_USB_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/early_printk.c linux-2.6.39/arch/mips/ar71xx/early_printk.c
--- linux-2.6.39.orig/arch/mips/ar71xx/early_printk.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/early_printk.c 2011-08-24 02:41:55.427989786 +0200
++++ linux-2.6.39/arch/mips/ar71xx/early_printk.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,96 @@
+/*
+ * Atheros AR7xxx/AR9xxx SoC early printk support
@@ -2315,7 +2880,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/early_printk.c linux-2.6.39/arch/mi
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/gpio.c linux-2.6.39/arch/mips/ar71xx/gpio.c
--- linux-2.6.39.orig/arch/mips/ar71xx/gpio.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/gpio.c 2011-08-24 02:41:55.457989607 +0200
++++ linux-2.6.39/arch/mips/ar71xx/gpio.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,193 @@
+/*
+ * Atheros AR7XXX/AR9XXX SoC GPIO API support
@@ -2512,7 +3077,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/gpio.c linux-2.6.39/arch/mips/ar71x
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/irq.c linux-2.6.39/arch/mips/ar71xx/irq.c
--- linux-2.6.39.orig/arch/mips/ar71xx/irq.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/irq.c 2011-08-24 02:41:55.457989607 +0200
++++ linux-2.6.39/arch/mips/ar71xx/irq.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,377 @@
+/*
+ * Atheros AR71xx SoC specific interrupt handling
@@ -2891,433 +3456,9 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/irq.c linux-2.6.39/arch/mips/ar71xx
+
+ ar71xx_gpio_irq_init();
+}
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/Kconfig linux-2.6.39/arch/mips/ar71xx/Kconfig
---- linux-2.6.39.orig/arch/mips/ar71xx/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/Kconfig 2011-08-24 04:20:27.209240389 +0200
-@@ -0,0 +1,420 @@
-+if ATHEROS_AR71XX
-+
-+menu "Atheros AR71xx machine selection"
-+
-+config AR71XX_MACH_AP81
-+ bool "Atheros AP81 board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_AP83
-+ bool "Atheros AP83 board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_AP96
-+ bool "Atheros AP96 board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP94_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_AP121
-+ bool "Atheros AP121 board support"
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select SOC_AR933X
-+ default n
-+
-+config AR71XX_MACH_DB120
-+ bool "Atheros DB120 board support"
-+ select SOC_AR934X
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_DB120_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_DIR_600_A1
-+ bool "D-Link DIR-600 rev. A1 support"
-+ select SOC_AR724X
-+ select AR71XX_DEV_AP91_PCI if PCI
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_NVRAM
-+ default n
-+
-+config AR71XX_MACH_DIR_615_C1
-+ bool "D-Link DIR-615 rev. C1 support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_NVRAM
-+ default n
-+
-+config AR71XX_MACH_DIR_825_B1
-+ bool "D-Link DIR-825 rev. B1 board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP94_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_JA76PF
-+ bool "jjPlus JA76PF board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_JWAP003
-+ bool "jjPlus JWAP003 board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_PB42
-+ bool "Atheros PB42 board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ default n
-+
-+config AR71XX_MACH_PB44
-+ bool "Atheros PB44 board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_PB92
-+ bool "Atheros PB92 board support"
-+ select SOC_AR724X
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_PB9X_PCI if PCI
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_AW_NR580
-+ bool "AzureWave AW-NR580 board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_WZR_HP_AG300H
-+ bool "Buffalo WZR-HP-AG300H board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_WZR_HP_G300NH
-+ bool "Buffalo WZR-HP-G300NH board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ select RTL8366_SMI
-+ default n
-+
-+config AR71XX_MACH_WP543
-+ bool "Compex WP543/WPJ543 board support"
-+ select SOC_AR71XX
-+ select MYLOADER
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_WRT160NL
-+ bool "Linksys WRT160NL board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ select AR71XX_NVRAM
-+ default n
-+
-+config AR71XX_MACH_WRT400N
-+ bool "Linksys WRT400N board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_AP94_PCI if PCI
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_RB4XX
-+ bool "MikroTik RouterBOARD 4xx series support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_RB750
-+ bool "MikroTik RouterBOARD 750 support"
-+ select SOC_AR724X
-+ default n
-+
-+config AR71XX_MACH_WNDR3700
-+ bool "NETGEAR WNDR3700 board support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP94_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_WNR2000
-+ bool "NETGEAR WNR2000 board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_MZK_W04NU
-+ bool "Planex MZK-W04NU board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_MZK_W300NH
-+ bool "Planex MZK-W300NH board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_NBG460N
-+ bool "Zyxel NBG460N/550N/550NH board support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_TL_MR3X20
-+ bool "TP-LINK TL-MR3220/3420 support"
-+ select SOC_AR724X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP91_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_TL_WA901ND
-+ bool "TP-LINK TL-WA901ND support"
-+ select SOC_AR724X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP91_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_TL_WA901ND_V2
-+ bool "TP-LINK TL-WA901ND v2 support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_TL_WR741ND
-+ bool "TP-LINK TL-WR741ND support"
-+ select SOC_AR724X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP91_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_TL_WR841N_V1
-+ bool "TP-LINK TL-WR841N v1 support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ select AR71XX_DEV_DSA
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_TL_WR941ND
-+ bool "TP-LINK TL-WR941ND support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_DSA
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_TL_WR1043ND
-+ bool "TP-LINK TL-WR1043ND support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_TEW_632BRP
-+ bool "TRENDnet TEW-632BRP support"
-+ select SOC_AR913X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AR9XXX_WMAC
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_NVRAM
-+ default n
-+
-+config AR71XX_MACH_UBNT
-+ bool "Ubiquiti AR71xx based boards support"
-+ select SOC_AR71XX
-+ select SOC_AR724X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP91_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ select AR71XX_DEV_PB42_PCI if PCI
-+ select AR71XX_DEV_USB
-+ default n
-+
-+config AR71XX_MACH_EAP7660D
-+ bool "Senao EAP7660D support"
-+ select SOC_AR71XX
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+config AR71XX_MACH_ZCN_1523H
-+ bool "Zcomax ZCN-1523H support"
-+ select SOC_AR724X
-+ select AR71XX_DEV_M25P80
-+ select AR71XX_DEV_AP91_PCI if PCI
-+ select AR71XX_DEV_GPIO_BUTTONS
-+ select AR71XX_DEV_LEDS_GPIO
-+ default n
-+
-+endmenu
-+
-+config SOC_AR71XX
-+ bool
-+ select USB_ARCH_HAS_EHCI
-+ select USB_ARCH_HAS_OHCI
-+
-+config SOC_AR724X
-+ bool
-+ select USB_ARCH_HAS_EHCI
-+ select USB_ARCH_HAS_OHCI
-+
-+config SOC_AR913X
-+ bool
-+ select USB_ARCH_HAS_EHCI
-+
-+config SOC_AR934X
-+ bool
-+ select USB_ARCH_HAS_EHCI
-+
-+config AR71XX_DEV_M25P80
-+ def_bool n
-+
-+config AR71XX_DEV_AP91_PCI
-+ select AR71XX_PCI_ATH9K_FIXUP
-+ def_bool n
-+
-+config AR71XX_DEV_AP94_PCI
-+ select AR71XX_PCI_ATH9K_FIXUP
-+ def_bool n
-+
-+config AR71XX_DEV_AR9XXX_WMAC
-+ def_bool n
-+
-+config AR71XX_DEV_DB120_PCI
-+ select AR71XX_PCI_ATH9K_FIXUP
-+ def_bool n
-+
-+config AR71XX_DEV_DSA
-+ def_bool n
-+
-+config AR71XX_DEV_GPIO_BUTTONS
-+ def_bool n
-+
-+config AR71XX_DEV_LEDS_GPIO
-+ def_bool n
-+
-+config AR71XX_DEV_PB42_PCI
-+ def_bool n
-+
-+config AR71XX_DEV_PB9X_PCI
-+ def_bool n
-+
-+config AR71XX_DEV_USB
-+ def_bool n
-+
-+config AR71XX_NVRAM
-+ def_bool n
-+
-+config AR71XX_PCI_ATH9K_FIXUP
-+ def_bool n
-+
-+config SOC_AR933X
-+ bool
-+ select USB_ARCH_HAS_EHCI
-+
-+endif
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap121.c linux-2.6.39/arch/mips/ar71xx/mach-ap121.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-ap121.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-ap121.c 2011-08-24 02:41:55.477989660 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-ap121.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,245 @@
+/*
+ * Atheros AP121 board support
@@ -3566,7 +3707,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap121.c linux-2.6.39/arch/mips
+ ap121_mini_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap81.c linux-2.6.39/arch/mips/ar71xx/mach-ap81.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-ap81.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-ap81.c 2011-08-24 02:41:55.477989660 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-ap81.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,142 @@
+/*
+ * Atheros AP81 board support
@@ -3712,7 +3853,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap81.c linux-2.6.39/arch/mips/
+MIPS_MACHINE(AR71XX_MACH_AP81, "AP81", "Atheros AP81", ap81_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap83.c linux-2.6.39/arch/mips/ar71xx/mach-ap83.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-ap83.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-ap83.c 2011-08-24 02:41:55.477989660 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-ap83.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,267 @@
+/*
+ * Atheros AP83 board support
@@ -3983,7 +4124,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap83.c linux-2.6.39/arch/mips/
+MIPS_MACHINE(AR71XX_MACH_AP83, "AP83", "Atheros AP83", ap83_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap96.c linux-2.6.39/arch/mips/ar71xx/mach-ap96.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-ap96.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-ap96.c 2011-08-24 02:41:55.477989660 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-ap96.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,180 @@
+/*
+ * Atheros AP96 board support
@@ -4167,7 +4308,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ap96.c linux-2.6.39/arch/mips/
+MIPS_MACHINE(AR71XX_MACH_AP96, "AP96", "Atheros AP96", ap96_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-aw-nr580.c linux-2.6.39/arch/mips/ar71xx/mach-aw-nr580.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-aw-nr580.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-aw-nr580.c 2011-08-24 02:41:55.487989871 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-aw-nr580.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,102 @@
+/*
+ * AzureWave AW-NR580 board support
@@ -4273,7 +4414,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-aw-nr580.c linux-2.6.39/arch/m
+ aw_nr580_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-db120.c linux-2.6.39/arch/mips/ar71xx/mach-db120.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-db120.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-db120.c 2011-08-24 02:41:55.487989871 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-db120.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,134 @@
+/*
+ * Atheros DB120 board (WASP SoC) support
@@ -4411,7 +4552,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-db120.c linux-2.6.39/arch/mips
+MIPS_MACHINE(AR71XX_MACH_DB120, "DB120", "Atheros DB120", db120_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-600-a1.c linux-2.6.39/arch/mips/ar71xx/mach-dir-600-a1.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-600-a1.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-dir-600-a1.c 2011-08-24 02:41:55.487989871 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-dir-600-a1.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,159 @@
+/*
+ * D-Link DIR-600 rev. A1 board support
@@ -4574,7 +4715,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-600-a1.c linux-2.6.39/arch
+ dir_600_a1_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-615-c1.c linux-2.6.39/arch/mips/ar71xx/mach-dir-615-c1.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-615-c1.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-dir-615-c1.c 2011-08-24 02:41:55.487989871 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-dir-615-c1.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,175 @@
+/*
+ * D-Link DIR-615 rev C1 board support
@@ -4753,7 +4894,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-615-c1.c linux-2.6.39/arch
+ dir_615c1_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-825-b1.c linux-2.6.39/arch/mips/ar71xx/mach-dir-825-b1.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-825-b1.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-dir-825-b1.c 2011-08-24 02:41:55.487989871 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-dir-825-b1.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,198 @@
+/*
+ * D-Link DIR-825 rev. B1 board support
@@ -4955,7 +5096,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-dir-825-b1.c linux-2.6.39/arch
+ dir825b1_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-eap7660d.c linux-2.6.39/arch/mips/ar71xx/mach-eap7660d.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-eap7660d.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-eap7660d.c 2011-08-24 02:41:55.497990784 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-eap7660d.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,180 @@
+/*
+ * Senao EAP7660D board support
@@ -5139,7 +5280,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-eap7660d.c linux-2.6.39/arch/m
+ eap7660d_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ja76pf.c linux-2.6.39/arch/mips/ar71xx/mach-ja76pf.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-ja76pf.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-ja76pf.c 2011-08-24 02:41:55.517989552 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-ja76pf.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,102 @@
+/*
+ * jjPlus JA76PF board support
@@ -5245,7 +5386,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ja76pf.c linux-2.6.39/arch/mip
+MIPS_MACHINE(AR71XX_MACH_JA76PF, "JA76PF", "jjPlus JA76PF", ja76pf_init);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-jwap003.c linux-2.6.39/arch/mips/ar71xx/mach-jwap003.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-jwap003.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-jwap003.c 2011-08-24 02:41:55.517989552 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-jwap003.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,83 @@
+/*
+ * jjPlus JWAP003 board support
@@ -5332,7 +5473,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-jwap003.c linux-2.6.39/arch/mi
+MIPS_MACHINE(AR71XX_MACH_JWAP003, "JWAP003", "jjPlus JWAP003", jwap003_init);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-mzk-w04nu.c linux-2.6.39/arch/mips/ar71xx/mach-mzk-w04nu.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-mzk-w04nu.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-mzk-w04nu.c 2011-08-24 02:41:55.517989552 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-mzk-w04nu.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,166 @@
+/*
+ * Planex MZK-W04NU board support
@@ -5502,7 +5643,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-mzk-w04nu.c linux-2.6.39/arch/
+ mzk_w04nu_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-mzk-w300nh.c linux-2.6.39/arch/mips/ar71xx/mach-mzk-w300nh.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-mzk-w300nh.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-mzk-w300nh.c 2011-08-24 02:41:55.527982711 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-mzk-w300nh.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,159 @@
+/*
+ * Planex MZK-W300NH board support
@@ -5665,7 +5806,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-mzk-w300nh.c linux-2.6.39/arch
+ mzk_w300nh_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-nbg460n.c linux-2.6.39/arch/mips/ar71xx/mach-nbg460n.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-nbg460n.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-nbg460n.c 2011-08-24 02:41:55.537990605 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-nbg460n.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,225 @@
+/*
+ * Zyxel NBG 460N/550N/550NH board support
@@ -5894,7 +6035,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-nbg460n.c linux-2.6.39/arch/mi
+ nbg460n_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-pb42.c linux-2.6.39/arch/mips/ar71xx/mach-pb42.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-pb42.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-pb42.c 2011-08-24 02:41:55.537990605 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-pb42.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,74 @@
+/*
+ * Atheros PB42 board support
@@ -5972,7 +6113,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-pb42.c linux-2.6.39/arch/mips/
+MIPS_MACHINE(AR71XX_MACH_PB42, "PB42", "Atheros PB42", pb42_init);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-pb44.c linux-2.6.39/arch/mips/ar71xx/mach-pb44.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-pb44.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-pb44.c 2011-08-24 02:41:55.537990605 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-pb44.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,213 @@
+/*
+ * Atheros PB44 board support
@@ -6189,7 +6330,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-pb44.c linux-2.6.39/arch/mips/
+MIPS_MACHINE(AR71XX_MACH_PB44, "PB44", "Atheros PB44", pb44_init);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-pb92.c linux-2.6.39/arch/mips/ar71xx/mach-pb92.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-pb92.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-pb92.c 2011-08-24 02:41:55.567991163 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-pb92.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,105 @@
+/*
+ * Atheros PB92 board support
@@ -6298,7 +6439,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-pb92.c linux-2.6.39/arch/mips/
+MIPS_MACHINE(AR71XX_MACH_PB92, "PB92", "Atheros PB92", pb92_init);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-rb4xx.c linux-2.6.39/arch/mips/ar71xx/mach-rb4xx.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-rb4xx.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-rb4xx.c 2011-08-24 02:41:55.567991163 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-rb4xx.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,344 @@
+/*
+ * MikroTik RouterBOARD 4xx series support
@@ -6646,7 +6787,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-rb4xx.c linux-2.6.39/arch/mips
+ rb493_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-rb750.c linux-2.6.39/arch/mips/ar71xx/mach-rb750.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-rb750.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-rb750.c 2011-08-24 02:41:55.567991163 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-rb750.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,144 @@
+/*
+ * MikroTik RouterBOARD 750 support
@@ -6794,7 +6935,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-rb750.c linux-2.6.39/arch/mips
+ rb750_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tew-632brp.c linux-2.6.39/arch/mips/ar71xx/mach-tew-632brp.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tew-632brp.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tew-632brp.c 2011-08-24 02:41:55.577989822 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-tew-632brp.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,151 @@
+/*
+ * TrendNET TEW-632BRP board support
@@ -6949,7 +7090,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tew-632brp.c linux-2.6.39/arch
+ tew_632brp_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-mr3x20.c linux-2.6.39/arch/mips/ar71xx/mach-tl-mr3x20.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-mr3x20.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tl-mr3x20.c 2011-08-24 02:41:55.577989822 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-tl-mr3x20.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,166 @@
+/*
+ * TP-LINK TL-MR3220/3420 board support
@@ -7117,15 +7258,16 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-mr3x20.c linux-2.6.39/arch/
+
+MIPS_MACHINE(AR71XX_MACH_TL_MR3420, "TL-MR3420", "TP-LINK TL-MR3420",
+ tl_mr3420_setup);
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd.c
---- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd.c 2011-08-24 02:41:55.587990766 +0200
-@@ -0,0 +1,130 @@
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd-v2.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd-v2.c
+--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd-v2.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd-v2.c 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,132 @@
+/*
-+ * TP-LINK TL-WA901ND board support
++ * TP-LINK TL-WA901ND v2 board support
+ *
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2010 Pieter Hollants <pieter@hollants.com>
++ * Copyright (C) 2011 Jonathan Bennett <jbscience87@gmail.com>
+ *
+ * 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
@@ -7140,21 +7282,23 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd.c linux-2.6.39/arch
+#include "machtype.h"
+#include "devices.h"
+#include "dev-m25p80.h"
-+#include "dev-ap91-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
++#include "dev-ar9xxx-wmac.h"
+
-+#define TL_WA901ND_GPIO_LED_QSS 0
-+#define TL_WA901ND_GPIO_LED_SYSTEM 1
++#define TL_WA901ND_V2_GPIO_LED_QSS 4
++#define TL_WA901ND_V2_GPIO_LED_SYSTEM 2
++#define TL_WA901ND_V2_GPIO_LED_WLAN 9
+
-+#define TL_WA901ND_GPIO_BTN_RESET 11
-+#define TL_WA901ND_GPIO_BTN_QSS 12
+
-+#define TL_WA901ND_KEYS_POLL_INTERVAL 20 /* msecs */
-+#define TL_WA901ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WA901ND_KEYS_POLL_INTERVAL)
++#define TL_WA901ND_V2_GPIO_BTN_RESET 3
++#define TL_WA901ND_V2_GPIO_BTN_QSS 7
+
++#define TL_WA901ND_V2_KEYS_POLL_INTERVAL 20 /* msecs */
++#define TL_WA901ND_V2_KEYS_DEBOUNCE_INTERVAL \
++ (3 * TL_WA901ND_V2_KEYS_POLL_INTERVAL)
+#ifdef CONFIG_MTD_PARTITIONS
-+static struct mtd_partition tl_wa901nd_partitions[] = {
++static struct mtd_partition tl_wa901nd_v2_partitions[] = {
+ {
+ .name = "u-boot",
+ .offset = 0,
@@ -7181,86 +7325,84 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd.c linux-2.6.39/arch
+};
+#endif /* CONFIG_MTD_PARTITIONS */
+
-+static struct flash_platform_data tl_wa901nd_flash_data = {
++static struct flash_platform_data tl_wa901nd_v2_flash_data = {
+#ifdef CONFIG_MTD_PARTITIONS
-+ .parts = tl_wa901nd_partitions,
-+ .nr_parts = ARRAY_SIZE(tl_wa901nd_partitions),
++ .parts = tl_wa901nd_v2_partitions,
++ .nr_parts = ARRAY_SIZE(tl_wa901nd_v2_partitions),
+#endif
+};
+
-+static struct gpio_led tl_wa901nd_leds_gpio[] __initdata = {
++static struct gpio_led tl_wa901nd_v2_leds_gpio[] __initdata = {
+ {
-+ .name = "tl-wa901nd:green:system",
-+ .gpio = TL_WA901ND_GPIO_LED_SYSTEM,
++ .name = "tl-wa901nd-v2:green:system",
++ .gpio = TL_WA901ND_V2_GPIO_LED_SYSTEM,
+ .active_low = 1,
+ }, {
-+ .name = "tl-wa901nd:green:qss",
-+ .gpio = TL_WA901ND_GPIO_LED_QSS,
++ .name = "tl-wa901nd-v2:green:qss",
++ .gpio = TL_WA901ND_V2_GPIO_LED_QSS,
++ }, {
++ .name = "tl-wa901nd-v2:green:wlan",
++ .gpio = TL_WA901ND_V2_GPIO_LED_WLAN,
+ .active_low = 1,
+ }
+};
+
-+static struct gpio_keys_button tl_wa901nd_gpio_keys[] __initdata = {
++static struct gpio_keys_button tl_wa901nd_v2_gpio_keys[] __initdata = {
+ {
+ .desc = "reset",
+ .type = EV_KEY,
-+ .code = BTN_0,
-+ .debounce_interval = TL_WA901ND_KEYS_DEBOUNCE_INTERVAL,
-+ .gpio = TL_WA901ND_GPIO_BTN_RESET,
++ .code = KEY_RESTART,
++ .debounce_interval = TL_WA901ND_V2_KEYS_DEBOUNCE_INTERVAL,
++ .gpio = TL_WA901ND_V2_GPIO_BTN_RESET,
+ .active_low = 1,
+ }, {
+ .desc = "qss",
+ .type = EV_KEY,
-+ .code = BTN_1,
-+ .debounce_interval = TL_WA901ND_KEYS_DEBOUNCE_INTERVAL,
-+ .gpio = TL_WA901ND_GPIO_BTN_QSS,
++ .code = KEY_WPS_BUTTON,
++ .debounce_interval = TL_WA901ND_V2_KEYS_DEBOUNCE_INTERVAL,
++ .gpio = TL_WA901ND_V2_GPIO_BTN_QSS,
+ .active_low = 1,
+ }
+};
+
-+static void __init tl_wa901nd_setup(void)
++static void __init tl_wa901nd_v2_setup(void)
+{
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
-+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
++ u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
+
-+ /*
-+ * ar71xx_eth0 would be the WAN port, but is not connected on
-+ * the TL-WA901ND. ar71xx_eth1 connects to the internal switch chip,
-+ * however we have a single LAN port only.
-+ */
-+ ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 0);
-+ ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-+ ar71xx_eth1_data.speed = SPEED_1000;
-+ ar71xx_eth1_data.duplex = DUPLEX_FULL;
-+ ar71xx_eth1_data.has_ar7240_switch = 1;
++ ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
+
++ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
++ ar71xx_eth0_data.phy_mask = 0x00001000;
+ ar71xx_add_device_mdio(0x0);
-+ ar71xx_add_device_eth(1);
+
-+ ar71xx_add_device_m25p80(&tl_wa901nd_flash_data);
++ ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC |
++ RESET_MODULE_GE0_PHY;
++ ar71xx_add_device_eth(0);
+
-+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_leds_gpio),
-+ tl_wa901nd_leds_gpio);
++ ar71xx_add_device_m25p80(&tl_wa901nd_v2_flash_data);
+
-+ ar71xx_register_gpio_keys_polled(-1, TL_WA901ND_KEYS_POLL_INTERVAL,
-+ ARRAY_SIZE(tl_wa901nd_gpio_keys),
-+ tl_wa901nd_gpio_keys);
++ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_v2_leds_gpio),
++ tl_wa901nd_v2_leds_gpio);
+
-+ ap91_pci_init(ee, mac);
++ ar71xx_register_gpio_keys_polled(-1, TL_WA901ND_V2_KEYS_POLL_INTERVAL,
++ ARRAY_SIZE(tl_wa901nd_v2_gpio_keys),
++ tl_wa901nd_v2_gpio_keys);
++
++ ar9xxx_add_device_wmac(eeprom, mac);
+}
+
-+MIPS_MACHINE(AR71XX_MACH_TL_WA901ND, "TL-WA901ND", "TP-LINK TL-WA901ND",
-+ tl_wa901nd_setup);
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd-v2.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd-v2.c
---- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd-v2.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd-v2.c 2011-08-24 02:41:55.587990766 +0200
-@@ -0,0 +1,132 @@
++MIPS_MACHINE(AR71XX_MACH_TL_WA901ND_V2, "TL-WA901ND-v2",
++ "TP-LINK TL-WA901ND v2", tl_wa901nd_v2_setup);
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd.c
+--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wa901nd.c 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,130 @@
+/*
-+ * TP-LINK TL-WA901ND v2 board support
++ * TP-LINK TL-WA901ND board support
+ *
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2010 Pieter Hollants <pieter@hollants.com>
-+ * Copyright (C) 2011 Jonathan Bennett <jbscience87@gmail.com>
+ *
+ * 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
@@ -7275,23 +7417,21 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd-v2.c linux-2.6.39/a
+#include "machtype.h"
+#include "devices.h"
+#include "dev-m25p80.h"
++#include "dev-ap91-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
-+#include "dev-ar9xxx-wmac.h"
+
-+#define TL_WA901ND_V2_GPIO_LED_QSS 4
-+#define TL_WA901ND_V2_GPIO_LED_SYSTEM 2
-+#define TL_WA901ND_V2_GPIO_LED_WLAN 9
++#define TL_WA901ND_GPIO_LED_QSS 0
++#define TL_WA901ND_GPIO_LED_SYSTEM 1
+
++#define TL_WA901ND_GPIO_BTN_RESET 11
++#define TL_WA901ND_GPIO_BTN_QSS 12
+
-+#define TL_WA901ND_V2_GPIO_BTN_RESET 3
-+#define TL_WA901ND_V2_GPIO_BTN_QSS 7
++#define TL_WA901ND_KEYS_POLL_INTERVAL 20 /* msecs */
++#define TL_WA901ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WA901ND_KEYS_POLL_INTERVAL)
+
-+#define TL_WA901ND_V2_KEYS_POLL_INTERVAL 20 /* msecs */
-+#define TL_WA901ND_V2_KEYS_DEBOUNCE_INTERVAL \
-+ (3 * TL_WA901ND_V2_KEYS_POLL_INTERVAL)
+#ifdef CONFIG_MTD_PARTITIONS
-+static struct mtd_partition tl_wa901nd_v2_partitions[] = {
++static struct mtd_partition tl_wa901nd_partitions[] = {
+ {
+ .name = "u-boot",
+ .offset = 0,
@@ -7318,78 +7458,79 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wa901nd-v2.c linux-2.6.39/a
+};
+#endif /* CONFIG_MTD_PARTITIONS */
+
-+static struct flash_platform_data tl_wa901nd_v2_flash_data = {
++static struct flash_platform_data tl_wa901nd_flash_data = {
+#ifdef CONFIG_MTD_PARTITIONS
-+ .parts = tl_wa901nd_v2_partitions,
-+ .nr_parts = ARRAY_SIZE(tl_wa901nd_v2_partitions),
++ .parts = tl_wa901nd_partitions,
++ .nr_parts = ARRAY_SIZE(tl_wa901nd_partitions),
+#endif
+};
+
-+static struct gpio_led tl_wa901nd_v2_leds_gpio[] __initdata = {
++static struct gpio_led tl_wa901nd_leds_gpio[] __initdata = {
+ {
-+ .name = "tl-wa901nd-v2:green:system",
-+ .gpio = TL_WA901ND_V2_GPIO_LED_SYSTEM,
++ .name = "tl-wa901nd:green:system",
++ .gpio = TL_WA901ND_GPIO_LED_SYSTEM,
+ .active_low = 1,
+ }, {
-+ .name = "tl-wa901nd-v2:green:qss",
-+ .gpio = TL_WA901ND_V2_GPIO_LED_QSS,
-+ }, {
-+ .name = "tl-wa901nd-v2:green:wlan",
-+ .gpio = TL_WA901ND_V2_GPIO_LED_WLAN,
++ .name = "tl-wa901nd:green:qss",
++ .gpio = TL_WA901ND_GPIO_LED_QSS,
+ .active_low = 1,
+ }
+};
+
-+static struct gpio_keys_button tl_wa901nd_v2_gpio_keys[] __initdata = {
++static struct gpio_keys_button tl_wa901nd_gpio_keys[] __initdata = {
+ {
+ .desc = "reset",
+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = TL_WA901ND_V2_KEYS_DEBOUNCE_INTERVAL,
-+ .gpio = TL_WA901ND_V2_GPIO_BTN_RESET,
++ .code = BTN_0,
++ .debounce_interval = TL_WA901ND_KEYS_DEBOUNCE_INTERVAL,
++ .gpio = TL_WA901ND_GPIO_BTN_RESET,
+ .active_low = 1,
+ }, {
+ .desc = "qss",
+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = TL_WA901ND_V2_KEYS_DEBOUNCE_INTERVAL,
-+ .gpio = TL_WA901ND_V2_GPIO_BTN_QSS,
++ .code = BTN_1,
++ .debounce_interval = TL_WA901ND_KEYS_DEBOUNCE_INTERVAL,
++ .gpio = TL_WA901ND_GPIO_BTN_QSS,
+ .active_low = 1,
+ }
+};
+
-+static void __init tl_wa901nd_v2_setup(void)
++static void __init tl_wa901nd_setup(void)
+{
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
-+ u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
++ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
-+ ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
++ /*
++ * ar71xx_eth0 would be the WAN port, but is not connected on
++ * the TL-WA901ND. ar71xx_eth1 connects to the internal switch chip,
++ * however we have a single LAN port only.
++ */
++ ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 0);
++ ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
++ ar71xx_eth1_data.speed = SPEED_1000;
++ ar71xx_eth1_data.duplex = DUPLEX_FULL;
++ ar71xx_eth1_data.has_ar7240_switch = 1;
+
-+ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-+ ar71xx_eth0_data.phy_mask = 0x00001000;
+ ar71xx_add_device_mdio(0x0);
++ ar71xx_add_device_eth(1);
+
-+ ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC |
-+ RESET_MODULE_GE0_PHY;
-+ ar71xx_add_device_eth(0);
-+
-+ ar71xx_add_device_m25p80(&tl_wa901nd_v2_flash_data);
++ ar71xx_add_device_m25p80(&tl_wa901nd_flash_data);
+
-+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_v2_leds_gpio),
-+ tl_wa901nd_v2_leds_gpio);
++ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_leds_gpio),
++ tl_wa901nd_leds_gpio);
+
-+ ar71xx_register_gpio_keys_polled(-1, TL_WA901ND_V2_KEYS_POLL_INTERVAL,
-+ ARRAY_SIZE(tl_wa901nd_v2_gpio_keys),
-+ tl_wa901nd_v2_gpio_keys);
++ ar71xx_register_gpio_keys_polled(-1, TL_WA901ND_KEYS_POLL_INTERVAL,
++ ARRAY_SIZE(tl_wa901nd_gpio_keys),
++ tl_wa901nd_gpio_keys);
+
-+ ar9xxx_add_device_wmac(eeprom, mac);
++ ap91_pci_init(ee, mac);
+}
+
-+MIPS_MACHINE(AR71XX_MACH_TL_WA901ND_V2, "TL-WA901ND-v2",
-+ "TP-LINK TL-WA901ND v2", tl_wa901nd_v2_setup);
++MIPS_MACHINE(AR71XX_MACH_TL_WA901ND, "TL-WA901ND", "TP-LINK TL-WA901ND",
++ tl_wa901nd_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr1043nd.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wr1043nd.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr1043nd.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr1043nd.c 2011-08-24 02:41:55.587990766 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr1043nd.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,156 @@
+/*
+ * TP-LINK TL-WR1043ND board support
@@ -7549,7 +7690,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr1043nd.c linux-2.6.39/arc
+ tl_wr1043nd_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr741nd.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wr741nd.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr741nd.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr741nd.c 2011-08-24 02:41:55.587990766 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr741nd.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,135 @@
+/*
+ * TP-LINK TL-WR741ND board support
@@ -7688,7 +7829,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr741nd.c linux-2.6.39/arch
+ tl_wr741nd_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr841n.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wr841n.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr841n.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr841n.c 2011-08-24 02:41:55.597982750 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr841n.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,144 @@
+/*
+ * TP-LINK TL-WR841N board support
@@ -7836,7 +7977,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr841n.c linux-2.6.39/arch/
+ tl_wr841n_v1_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr941nd.c linux-2.6.39/arch/mips/ar71xx/mach-tl-wr941nd.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr941nd.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr941nd.c 2011-08-24 02:41:55.597982750 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-tl-wr941nd.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,147 @@
+/*
+ * TP-LINK TL-WR941ND board support
@@ -7985,88 +8126,9 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-tl-wr941nd.c linux-2.6.39/arch
+
+MIPS_MACHINE(AR71XX_MACH_TL_WR941ND, "TL-WR941ND", "TP-LINK TL-WR941ND",
+ tl_wr941nd_setup);
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/machtype.h linux-2.6.39/arch/mips/ar71xx/machtype.h
---- linux-2.6.39.orig/arch/mips/ar71xx/machtype.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/machtype.h 2011-08-24 02:41:55.597982750 +0200
-@@ -0,0 +1,75 @@
-+/*
-+ * Atheros AR71xx machine type definitions
-+ *
-+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ */
-+
-+#ifndef _AR71XX_MACHTYPE_H
-+#define _AR71XX_MACHTYPE_H
-+
-+#include <asm/mips_machine.h>
-+
-+enum ar71xx_mach_type {
-+ AR71XX_MACH_GENERIC = 0,
-+ AR71XX_MACH_AP121, /* Atheros AP121 */
-+ AR71XX_MACH_AP121_MINI, /* Atheros AP121-MINI */
-+ AR71XX_MACH_AP81, /* Atheros AP81 */
-+ AR71XX_MACH_AP83, /* Atheros AP83 */
-+ AR71XX_MACH_AW_NR580, /* AzureWave AW-NR580 */
-+ AR71XX_MACH_DIR_600_A1, /* D-Link DIR-600 rev. A1 */
-+ AR71XX_MACH_DIR_615_C1, /* D-Link DIR-615 rev. C1 */
-+ AR71XX_MACH_DIR_825_B1, /* D-Link DIR-825 rev. B1 */
-+ AR71XX_MACH_JA76PF, /* jjPlus JA76PF */
-+ AR71XX_MACH_JWAP003, /* jjPlus JWAP003 */
-+ AR71XX_MACH_RB_411, /* MikroTik RouterBOARD 411/411A/411AH */
-+ AR71XX_MACH_RB_411U, /* MikroTik RouterBOARD 411U */
-+ AR71XX_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */
-+ AR71XX_MACH_RB_433U, /* MikroTik RouterBOARD 433UAH */
-+ AR71XX_MACH_RB_450, /* MikroTik RouterBOARD 450 */
-+ AR71XX_MACH_RB_450G, /* MikroTik RouterBOARD 450G */
-+ AR71XX_MACH_RB_493, /* Mikrotik RouterBOARD 493/493AH */
-+ AR71XX_MACH_RB_750, /* MikroTik RouterBOARD 750 */
-+ AR71XX_MACH_PB42, /* Atheros PB42 */
-+ AR71XX_MACH_PB44, /* Atheros PB44 */
-+ AR71XX_MACH_PB92, /* Atheros PB92 */
-+ AR71XX_MACH_MZK_W04NU, /* Planex MZK-W04NU */
-+ AR71XX_MACH_MZK_W300NH, /* Planex MZK-W300NH */
-+ AR71XX_MACH_NBG460N, /* Zyxel NBG460N/550N/550NH */
-+ AR71XX_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
-+ AR71XX_MACH_TL_MR3220, /* TP-LINK TL-MR3220 */
-+ AR71XX_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */
-+ AR71XX_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
-+ AR71XX_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
-+ AR71XX_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */
-+ AR71XX_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
-+ AR71XX_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
-+ AR71XX_MACH_TL_WR1043ND, /* TP-LINK TL-WR1041ND */
-+ AR71XX_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
-+ AR71XX_MACH_UBNT_LSX, /* Ubiquiti LSX */
-+ AR71XX_MACH_UBNT_RS, /* Ubiquiti RouterStation */
-+ AR71XX_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
-+ AR71XX_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
-+ AR71XX_MACH_UBNT_ROCKET_M, /* Ubiquiti Rocket M */
-+ AR71XX_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */
-+ AR71XX_MACH_WNDR3700, /* NETGEAR WNDR3700 */
-+ AR71XX_MACH_WNDR3700V2, /* NETGEAR WNDR3700v2 */
-+ AR71XX_MACH_WNR2000, /* NETGEAR WNR2000 */
-+ AR71XX_MACH_WP543, /* Compex WP543 */
-+ AR71XX_MACH_WRT160NL, /* Linksys WRT160NL */
-+ AR71XX_MACH_WRT400N, /* Linksys WRT400N */
-+ AR71XX_MACH_WZR_HP_AG300H, /* Buffalo WZR-HP-AG300H */
-+ AR71XX_MACH_WZR_HP_G300NH, /* Buffalo WZR-HP-G300NH */
-+ AR71XX_MACH_EAP7660D, /* Senao EAP7660D */
-+ AR71XX_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */
-+ AR71XX_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */
-+ AR71XX_MACH_AP96, /* Atheros AP96 */
-+ AR71XX_MACH_UBNT_UNIFI, /* Unifi */
-+ AR71XX_MACH_DB120, /* Atheros DB120 (AR934x based) */
-+};
-+
-+#endif /* _AR71XX_MACHTYPE_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ubnt.c linux-2.6.39/arch/mips/ar71xx/mach-ubnt.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-ubnt.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-ubnt.c 2011-08-24 02:41:55.597982750 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-ubnt.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,333 @@
+/*
+ * Ubiquiti RouterStation support
@@ -8403,7 +8465,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-ubnt.c linux-2.6.39/arch/mips/
+ ubnt_unifi_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wndr3700.c linux-2.6.39/arch/mips/ar71xx/mach-wndr3700.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-wndr3700.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-wndr3700.c 2011-08-24 02:41:55.607980283 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-wndr3700.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,290 @@
+/*
+ * Netgear WNDR3700 board support
@@ -8697,7 +8759,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wndr3700.c linux-2.6.39/arch/m
+ wndr3700v2_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wnr2000.c linux-2.6.39/arch/mips/ar71xx/mach-wnr2000.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-wnr2000.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-wnr2000.c 2011-08-24 02:41:55.617990333 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-wnr2000.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,150 @@
+/*
+ * NETGEAR WNR2000 board support
@@ -8851,7 +8913,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wnr2000.c linux-2.6.39/arch/mi
+MIPS_MACHINE(AR71XX_MACH_WNR2000, "WNR2000", "NETGEAR WNR2000", wnr2000_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wp543.c linux-2.6.39/arch/mips/ar71xx/mach-wp543.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-wp543.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-wp543.c 2011-08-24 02:41:55.617990333 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-wp543.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,101 @@
+/*
+ * Compex WP543/WPJ543 board support
@@ -8956,7 +9018,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wp543.c linux-2.6.39/arch/mips
+MIPS_MACHINE(AR71XX_MACH_WP543, "WP543", "Compex WP543", wp543_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wrt160nl.c linux-2.6.39/arch/mips/ar71xx/mach-wrt160nl.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-wrt160nl.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-wrt160nl.c 2011-08-24 02:41:55.617990333 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-wrt160nl.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,161 @@
+/*
+ * Linksys WRT160NL board support
@@ -9121,7 +9183,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wrt160nl.c linux-2.6.39/arch/m
+ wrt160nl_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wrt400n.c linux-2.6.39/arch/mips/ar71xx/mach-wrt400n.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-wrt400n.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-wrt400n.c 2011-08-24 02:41:55.617990333 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-wrt400n.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,164 @@
+/*
+ * Linksys WRT400N board support
@@ -9289,7 +9351,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wrt400n.c linux-2.6.39/arch/mi
+MIPS_MACHINE(AR71XX_MACH_WRT400N, "WRT400N", "Linksys WRT400N", wrt400n_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wzr-hp-ag300h.c linux-2.6.39/arch/mips/ar71xx/mach-wzr-hp-ag300h.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-wzr-hp-ag300h.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-wzr-hp-ag300h.c 2011-08-24 02:41:55.628193451 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-wzr-hp-ag300h.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,231 @@
+/*
+ * Buffalo WZR-HP-AG300H board support
@@ -9524,7 +9586,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wzr-hp-ag300h.c linux-2.6.39/a
+
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wzr-hp-g300nh.c linux-2.6.39/arch/mips/ar71xx/mach-wzr-hp-g300nh.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-wzr-hp-g300nh.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-wzr-hp-g300nh.c 2011-08-24 02:41:55.649418561 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-wzr-hp-g300nh.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,292 @@
+/*
+ * Buffalo WZR-HP-G300NH board support
@@ -9820,7 +9882,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-wzr-hp-g300nh.c linux-2.6.39/a
+ "Buffalo WZR-HP-G300NH", wzrhpg300nh_setup);
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-zcn-1523h.c linux-2.6.39/arch/mips/ar71xx/mach-zcn-1523h.c
--- linux-2.6.39.orig/arch/mips/ar71xx/mach-zcn-1523h.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/mach-zcn-1523h.c 2011-08-24 02:41:55.649418561 +0200
++++ linux-2.6.39/arch/mips/ar71xx/mach-zcn-1523h.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,214 @@
+/*
+ * Zcomax ZCN-1523H-2-8/5-16 board support
@@ -10036,80 +10098,88 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/mach-zcn-1523h.c linux-2.6.39/arch/
+
+MIPS_MACHINE(AR71XX_MACH_ZCN_1523H_5, "ZCN-1523H-5", "Zcomax ZCN-1523H-5",
+ zcn_1523h_5_setup);
-diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/Makefile linux-2.6.39/arch/mips/ar71xx/Makefile
---- linux-2.6.39.orig/arch/mips/ar71xx/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/Makefile 2011-08-24 02:41:55.677990354 +0200
-@@ -0,0 +1,67 @@
-+#
-+# Makefile for the Atheros AR71xx SoC specific parts of the kernel
-+#
-+# Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
-+# Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+#
-+# 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.
-+
-+obj-y := prom.o irq.o setup.o devices.o gpio.o ar71xx.o
+diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/machtype.h linux-2.6.39/arch/mips/ar71xx/machtype.h
+--- linux-2.6.39.orig/arch/mips/ar71xx/machtype.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/arch/mips/ar71xx/machtype.h 2011-08-24 18:17:23.000000000 +0200
+@@ -0,0 +1,75 @@
++/*
++ * Atheros AR71xx machine type definitions
++ *
++ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * 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.
++ */
+
-+obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-+obj-$(CONFIG_PCI) += pci.o
++#ifndef _AR71XX_MACHTYPE_H
++#define _AR71XX_MACHTYPE_H
+
-+obj-$(CONFIG_AR71XX_DEV_AP91_PCI) += dev-ap91-pci.o
-+obj-$(CONFIG_AR71XX_DEV_AP94_PCI) += dev-ap94-pci.o
-+obj-$(CONFIG_AR71XX_DEV_AR9XXX_WMAC) += dev-ar9xxx-wmac.o
-+obj-$(CONFIG_AR71XX_DEV_DB120_PCI) += dev-db120-pci.o
-+obj-$(CONFIG_AR71XX_DEV_DSA) += dev-dsa.o
-+obj-$(CONFIG_AR71XX_DEV_GPIO_BUTTONS) += dev-gpio-buttons.o
-+obj-$(CONFIG_AR71XX_DEV_LEDS_GPIO) += dev-leds-gpio.o
-+obj-$(CONFIG_AR71XX_DEV_M25P80) += dev-m25p80.o
-+obj-$(CONFIG_AR71XX_DEV_PB42_PCI) += dev-pb42-pci.o
-+obj-$(CONFIG_AR71XX_DEV_PB9X_PCI) += dev-pb9x-pci.o
-+obj-$(CONFIG_AR71XX_DEV_USB) += dev-usb.o
++#include <asm/mips_machine.h>
+
-+obj-$(CONFIG_AR71XX_NVRAM) += nvram.o
-+obj-$(CONFIG_AR71XX_PCI_ATH9K_FIXUP) += pci-ath9k-fixup.o
++enum ar71xx_mach_type {
++ AR71XX_MACH_GENERIC = 0,
++ AR71XX_MACH_AP121, /* Atheros AP121 */
++ AR71XX_MACH_AP121_MINI, /* Atheros AP121-MINI */
++ AR71XX_MACH_AP81, /* Atheros AP81 */
++ AR71XX_MACH_AP83, /* Atheros AP83 */
++ AR71XX_MACH_AW_NR580, /* AzureWave AW-NR580 */
++ AR71XX_MACH_DIR_600_A1, /* D-Link DIR-600 rev. A1 */
++ AR71XX_MACH_DIR_615_C1, /* D-Link DIR-615 rev. C1 */
++ AR71XX_MACH_DIR_825_B1, /* D-Link DIR-825 rev. B1 */
++ AR71XX_MACH_JA76PF, /* jjPlus JA76PF */
++ AR71XX_MACH_JWAP003, /* jjPlus JWAP003 */
++ AR71XX_MACH_RB_411, /* MikroTik RouterBOARD 411/411A/411AH */
++ AR71XX_MACH_RB_411U, /* MikroTik RouterBOARD 411U */
++ AR71XX_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */
++ AR71XX_MACH_RB_433U, /* MikroTik RouterBOARD 433UAH */
++ AR71XX_MACH_RB_450, /* MikroTik RouterBOARD 450 */
++ AR71XX_MACH_RB_450G, /* MikroTik RouterBOARD 450G */
++ AR71XX_MACH_RB_493, /* Mikrotik RouterBOARD 493/493AH */
++ AR71XX_MACH_RB_750, /* MikroTik RouterBOARD 750 */
++ AR71XX_MACH_PB42, /* Atheros PB42 */
++ AR71XX_MACH_PB44, /* Atheros PB44 */
++ AR71XX_MACH_PB92, /* Atheros PB92 */
++ AR71XX_MACH_MZK_W04NU, /* Planex MZK-W04NU */
++ AR71XX_MACH_MZK_W300NH, /* Planex MZK-W300NH */
++ AR71XX_MACH_NBG460N, /* Zyxel NBG460N/550N/550NH */
++ AR71XX_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
++ AR71XX_MACH_TL_MR3220, /* TP-LINK TL-MR3220 */
++ AR71XX_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */
++ AR71XX_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
++ AR71XX_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
++ AR71XX_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */
++ AR71XX_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
++ AR71XX_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
++ AR71XX_MACH_TL_WR1043ND, /* TP-LINK TL-WR1041ND */
++ AR71XX_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
++ AR71XX_MACH_UBNT_LSX, /* Ubiquiti LSX */
++ AR71XX_MACH_UBNT_RS, /* Ubiquiti RouterStation */
++ AR71XX_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
++ AR71XX_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
++ AR71XX_MACH_UBNT_ROCKET_M, /* Ubiquiti Rocket M */
++ AR71XX_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */
++ AR71XX_MACH_WNDR3700, /* NETGEAR WNDR3700 */
++ AR71XX_MACH_WNDR3700V2, /* NETGEAR WNDR3700v2 */
++ AR71XX_MACH_WNR2000, /* NETGEAR WNR2000 */
++ AR71XX_MACH_WP543, /* Compex WP543 */
++ AR71XX_MACH_WRT160NL, /* Linksys WRT160NL */
++ AR71XX_MACH_WRT400N, /* Linksys WRT400N */
++ AR71XX_MACH_WZR_HP_AG300H, /* Buffalo WZR-HP-AG300H */
++ AR71XX_MACH_WZR_HP_G300NH, /* Buffalo WZR-HP-G300NH */
++ AR71XX_MACH_EAP7660D, /* Senao EAP7660D */
++ AR71XX_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */
++ AR71XX_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */
++ AR71XX_MACH_AP96, /* Atheros AP96 */
++ AR71XX_MACH_UBNT_UNIFI, /* Unifi */
++ AR71XX_MACH_DB120, /* Atheros DB120 (AR934x based) */
++};
+
-+obj-$(CONFIG_AR71XX_MACH_AP121) += mach-ap121.o
-+obj-$(CONFIG_AR71XX_MACH_AP81) += mach-ap81.o
-+obj-$(CONFIG_AR71XX_MACH_AP83) += mach-ap83.o
-+obj-$(CONFIG_AR71XX_MACH_AP96) += mach-ap96.o
-+obj-$(CONFIG_AR71XX_MACH_AW_NR580) += mach-aw-nr580.o
-+obj-$(CONFIG_AR71XX_MACH_DB120) += mach-db120.o
-+obj-$(CONFIG_AR71XX_MACH_DIR_600_A1) += mach-dir-600-a1.o
-+obj-$(CONFIG_AR71XX_MACH_DIR_615_C1) += mach-dir-615-c1.o
-+obj-$(CONFIG_AR71XX_MACH_DIR_825_B1) += mach-dir-825-b1.o
-+obj-$(CONFIG_AR71XX_MACH_EAP7660D) += mach-eap7660d.o
-+obj-$(CONFIG_AR71XX_MACH_JA76PF) += mach-ja76pf.o
-+obj-$(CONFIG_AR71XX_MACH_JWAP003) += mach-jwap003.o
-+obj-$(CONFIG_AR71XX_MACH_MZK_W04NU) += mach-mzk-w04nu.o
-+obj-$(CONFIG_AR71XX_MACH_MZK_W300NH) += mach-mzk-w300nh.o
-+obj-$(CONFIG_AR71XX_MACH_NBG460N) += mach-nbg460n.o
-+obj-$(CONFIG_AR71XX_MACH_PB42) += mach-pb42.o
-+obj-$(CONFIG_AR71XX_MACH_PB44) += mach-pb44.o
-+obj-$(CONFIG_AR71XX_MACH_PB92) += mach-pb92.o
-+obj-$(CONFIG_AR71XX_MACH_RB4XX) += mach-rb4xx.o
-+obj-$(CONFIG_AR71XX_MACH_RB750) += mach-rb750.o
-+obj-$(CONFIG_AR71XX_MACH_TEW_632BRP) += mach-tew-632brp.o
-+obj-$(CONFIG_AR71XX_MACH_TL_MR3X20) += mach-tl-mr3x20.o
-+obj-$(CONFIG_AR71XX_MACH_TL_WA901ND) += mach-tl-wa901nd.o
-+obj-$(CONFIG_AR71XX_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
-+obj-$(CONFIG_AR71XX_MACH_TL_WR741ND) += mach-tl-wr741nd.o
-+obj-$(CONFIG_AR71XX_MACH_TL_WR841N_V1) += mach-tl-wr841n.o
-+obj-$(CONFIG_AR71XX_MACH_TL_WR941ND) += mach-tl-wr941nd.o
-+obj-$(CONFIG_AR71XX_MACH_TL_WR1043ND) += mach-tl-wr1043nd.o
-+obj-$(CONFIG_AR71XX_MACH_UBNT) += mach-ubnt.o
-+obj-$(CONFIG_AR71XX_MACH_WNDR3700) += mach-wndr3700.o
-+obj-$(CONFIG_AR71XX_MACH_WNR2000) += mach-wnr2000.o
-+obj-$(CONFIG_AR71XX_MACH_WP543) += mach-wp543.o
-+obj-$(CONFIG_AR71XX_MACH_WRT160NL) += mach-wrt160nl.o
-+obj-$(CONFIG_AR71XX_MACH_WRT400N) += mach-wrt400n.o
-+obj-$(CONFIG_AR71XX_MACH_WZR_HP_G300NH) += mach-wzr-hp-g300nh.o
-+obj-$(CONFIG_AR71XX_MACH_WZR_HP_AG300H) += mach-wzr-hp-ag300h.o
-+obj-$(CONFIG_AR71XX_MACH_ZCN_1523H) += mach-zcn-1523h.o
++#endif /* _AR71XX_MACHTYPE_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/nvram.c linux-2.6.39/arch/mips/ar71xx/nvram.c
--- linux-2.6.39.orig/arch/mips/ar71xx/nvram.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/nvram.c 2011-08-24 02:41:55.677990354 +0200
++++ linux-2.6.39/arch/mips/ar71xx/nvram.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,75 @@
+/*
+ * Atheros AR71xx minimal nvram support
@@ -10188,7 +10258,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/nvram.c linux-2.6.39/arch/mips/ar71
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/nvram.h linux-2.6.39/arch/mips/ar71xx/nvram.h
--- linux-2.6.39.orig/arch/mips/ar71xx/nvram.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/nvram.h 2011-08-24 02:41:55.687991145 +0200
++++ linux-2.6.39/arch/mips/ar71xx/nvram.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,19 @@
+/*
+ * Atheros AR71xx minimal nvram support
@@ -10211,7 +10281,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/nvram.h linux-2.6.39/arch/mips/ar71
+#endif /* _AR71XX_NVRAM_H */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/pci-ath9k-fixup.c linux-2.6.39/arch/mips/ar71xx/pci-ath9k-fixup.c
--- linux-2.6.39.orig/arch/mips/ar71xx/pci-ath9k-fixup.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/pci-ath9k-fixup.c 2011-08-24 02:41:55.697990606 +0200
++++ linux-2.6.39/arch/mips/ar71xx/pci-ath9k-fixup.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,123 @@
+/*
+ * Atheros AP94 reference board PCI initialization
@@ -10338,7 +10408,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/pci-ath9k-fixup.c linux-2.6.39/arch
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/pci-ath9k-fixup.h linux-2.6.39/arch/mips/ar71xx/pci-ath9k-fixup.h
--- linux-2.6.39.orig/arch/mips/ar71xx/pci-ath9k-fixup.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/pci-ath9k-fixup.h 2011-08-24 02:41:55.697990606 +0200
++++ linux-2.6.39/arch/mips/ar71xx/pci-ath9k-fixup.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,6 @@
+#ifndef _PCI_ATH9K_FIXUP
+#define _PCI_ATH9K_FIXUP
@@ -10348,7 +10418,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/pci-ath9k-fixup.h linux-2.6.39/arch
+#endif /* _PCI_ATH9K_FIXUP */
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/pci.c linux-2.6.39/arch/mips/ar71xx/pci.c
--- linux-2.6.39.orig/arch/mips/ar71xx/pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/pci.c 2011-08-24 02:41:55.697990606 +0200
++++ linux-2.6.39/arch/mips/ar71xx/pci.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,97 @@
+/*
+ * Atheros AR71xx PCI setup code
@@ -10449,7 +10519,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/pci.c linux-2.6.39/arch/mips/ar71xx
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/prom.c linux-2.6.39/arch/mips/ar71xx/prom.c
--- linux-2.6.39.orig/arch/mips/ar71xx/prom.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/prom.c 2011-08-24 02:41:55.737990425 +0200
++++ linux-2.6.39/arch/mips/ar71xx/prom.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,189 @@
+/*
+ * Atheros AR71xx SoC specific prom routines
@@ -10642,7 +10712,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/prom.c linux-2.6.39/arch/mips/ar71x
+}
diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/setup.c linux-2.6.39/arch/mips/ar71xx/setup.c
--- linux-2.6.39.orig/arch/mips/ar71xx/setup.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/ar71xx/setup.c 2011-08-24 02:41:55.737990425 +0200
++++ linux-2.6.39/arch/mips/ar71xx/setup.c 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,446 @@
+/*
+ * Atheros AR71xx SoC specific setup
@@ -11092,7 +11162,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/ar71xx/setup.c linux-2.6.39/arch/mips/ar71
+ ar71xx_generic_init);
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/checksum.h linux-2.6.39/arch/mips/include/asm/checksum.h
--- linux-2.6.39.orig/arch/mips/include/asm/checksum.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/arch/mips/include/asm/checksum.h 2011-08-24 05:53:21.109231561 +0200
++++ linux-2.6.39/arch/mips/include/asm/checksum.h 2011-08-24 18:17:23.000000000 +0200
@@ -12,6 +12,7 @@
#define _ASM_CHECKSUM_H
@@ -11145,7 +11215,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/checksum.h linux-2.6.39/arch/m
return csum_fold(csum);
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/fw/myloader/myloader.h linux-2.6.39/arch/mips/include/asm/fw/myloader/myloader.h
--- linux-2.6.39.orig/arch/mips/include/asm/fw/myloader/myloader.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/fw/myloader/myloader.h 2011-04-27 12:19:21.887662064 +0200
++++ linux-2.6.39/arch/mips/include/asm/fw/myloader/myloader.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,34 @@
+/*
+ * Compex's MyLoader specific definitions
@@ -11183,7 +11253,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/fw/myloader/myloader.h linux-2
+#endif /* _ASM_MIPS_FW_MYLOADER_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar71xx.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar71xx.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar71xx.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar71xx.h 2011-08-06 09:32:36.758018150 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar71xx.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,769 @@
+/*
+ * Atheros AR71xx SoC specific definitions
@@ -11956,7 +12026,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar71xx.h linux-2.6
+#endif /* __ASM_MACH_AR71XX_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar91xx_flash.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar91xx_flash.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar91xx_flash.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar91xx_flash.h 2011-04-27 12:19:21.867661560 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar91xx_flash.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,26 @@
+/*
+ * AR91xx parallel flash driver platform data definitions
@@ -11986,7 +12056,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar91xx_flash.h lin
+#endif /* __AR91XX_FLASH_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar933x_uart.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar933x_uart.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar933x_uart.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar933x_uart.h 2011-08-06 09:32:36.758018150 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar933x_uart.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,67 @@
+/*
+ * Atheros AR933X UART defines
@@ -12057,7 +12127,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar933x_uart.h linu
+#endif /* __AR933X_UART_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar933x_uart_platform.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar933x_uart_platform.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar933x_uart_platform.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar933x_uart_platform.h 2011-08-06 09:32:36.758018150 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/ar933x_uart_platform.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,18 @@
+/*
+ * Platform data definition for Atheros AR933X UART
@@ -12079,7 +12149,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/ar933x_uart_platfo
+#endif /* _AR933X_UART_PLATFORM_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/cpu-feature-overrides.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/cpu-feature-overrides.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/cpu-feature-overrides.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/cpu-feature-overrides.h 2011-04-27 12:19:21.877661867 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/cpu-feature-overrides.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,56 @@
+/*
+ * Atheros AR71xx specific CPU feature overrides
@@ -12139,7 +12209,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/cpu-feature-overri
+#endif /* __ASM_MACH_AR71XX_CPU_FEATURE_OVERRIDES_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/gpio.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/gpio.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/gpio.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/gpio.h 2011-04-27 12:19:21.877661867 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/gpio.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,53 @@
+/*
+ * Atheros AR71xx GPIO API definitions
@@ -12196,7 +12266,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/gpio.h linux-2.6.3
+#endif /* __ASM_MACH_AR71XX_GPIO_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/irq.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/irq.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/irq.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/irq.h 2011-04-27 12:19:21.877661867 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/irq.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
@@ -12217,7 +12287,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/irq.h linux-2.6.39
+#endif /* __ASM_MACH_AR71XX_IRQ_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/kernel-entry-init.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/kernel-entry-init.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/kernel-entry-init.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/kernel-entry-init.h 2011-04-27 12:19:21.877661867 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/kernel-entry-init.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,32 @@
+/*
+ * Atheros AR71xx specific kernel entry setup
@@ -12253,7 +12323,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/kernel-entry-init.
+#endif /* __ASM_MACH_AR71XX_KERNEL_ENTRY_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/mach-rb750.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/mach-rb750.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/mach-rb750.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/mach-rb750.h 2011-04-27 12:19:21.877661867 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/mach-rb750.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,66 @@
+/*
+ * MikroTik RouterBOARD 750 definitions
@@ -12324,7 +12394,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/mach-rb750.h linux
\ No newline at end of file
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/mangle-port.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/mangle-port.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/mangle-port.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/mangle-port.h 2011-04-27 12:19:21.877661867 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/mangle-port.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
@@ -12373,7 +12443,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/mangle-port.h linu
+#endif /* __ASM_MACH_AR71XX_MANGLE_PORT_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/pci.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/pci.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/pci.h 2011-04-27 12:19:21.877661867 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/pci.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,46 @@
+/*
+ * Atheros AR71xx SoC specific PCI definitions
@@ -12423,7 +12493,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/pci.h linux-2.6.39
+#endif /* __ASM_MACH_AR71XX_PCI_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/platform.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/platform.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/platform.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/platform.h 2011-08-22 07:40:11.890481646 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/platform.h 2011-08-24 18:17:23.000000000 +0200
@@ -0,0 +1,63 @@
+/*
+ * Atheros AR71xx SoC specific platform data definitions
@@ -12490,7 +12560,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/platform.h linux-2
+#endif /* __ASM_MACH_AR71XX_PLATFORM_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/rb4xx_cpld.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/rb4xx_cpld.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/rb4xx_cpld.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/rb4xx_cpld.h 2011-04-27 12:19:21.867661560 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/rb4xx_cpld.h 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,48 @@
+/*
+ * SPI driver definitions for the CPLD chip on the Mikrotik RB4xx boards
@@ -12542,7 +12612,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/rb4xx_cpld.h linux
+extern int rb4xx_cpld_write(const unsigned char *buf, unsigned count);
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/war.h linux-2.6.39/arch/mips/include/asm/mach-ar71xx/war.h
--- linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/war.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/war.h 2011-04-27 12:19:21.867661560 +0200
++++ linux-2.6.39/arch/mips/include/asm/mach-ar71xx/war.h 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,25 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
@@ -12571,7 +12641,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/mach-ar71xx/war.h linux-2.6.39
+#endif /* __ASM_MACH_AR71XX_WAR_H */
diff -Nur linux-2.6.39.orig/arch/mips/include/asm/time.h linux-2.6.39/arch/mips/include/asm/time.h
--- linux-2.6.39.orig/arch/mips/include/asm/time.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/arch/mips/include/asm/time.h 2011-08-24 05:53:05.239228886 +0200
++++ linux-2.6.39/arch/mips/include/asm/time.h 2011-08-24 18:17:24.000000000 +0200
@@ -52,6 +52,7 @@
*/
#ifdef CONFIG_CEVT_R4K_LIB
@@ -12580,2530 +12650,9 @@ diff -Nur linux-2.6.39.orig/arch/mips/include/asm/time.h linux-2.6.39/arch/mips/
extern int r4k_clockevent_init(void);
#endif
-diff -Nur linux-2.6.39.orig/arch/mips/Kconfig linux-2.6.39/arch/mips/Kconfig
---- linux-2.6.39.orig/arch/mips/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/arch/mips/Kconfig 2011-08-24 02:42:39.969240338 +0200
-@@ -84,6 +84,23 @@
- help
- Support for the Atheros AR71XX/AR724X/AR913X SoCs.
-
-+config ATHEROS_AR71XX
-+ bool "Atheros AR71xx based boards"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select ARCH_REQUIRE_GPIOLIB
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_HAS_EARLY_PRINTK
-+ select MIPS_MACHINE
-+ help
-+ Support for Atheros AR71xx based boards.
-+
- config BCM47XX
- bool "Broadcom BCM47XX based boards"
- select CEVT_R4K
-@@ -739,6 +756,7 @@
- endchoice
-
- source "arch/mips/alchemy/Kconfig"
-+source "arch/mips/ar71xx/Kconfig"
- source "arch/mips/ath79/Kconfig"
- source "arch/mips/bcm63xx/Kconfig"
- source "arch/mips/jazz/Kconfig"
-@@ -907,6 +925,9 @@
- config MIPS_DISABLE_OBSOLETE_IDE
- bool
-
-+config MYLOADER
-+ bool
-+
- config SYNC_R4K
- bool
-
-diff -Nur linux-2.6.39.orig/arch/mips/Kconfig.orig linux-2.6.39/arch/mips/Kconfig.orig
---- linux-2.6.39.orig/arch/mips/Kconfig.orig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/Kconfig.orig 2011-08-22 16:21:32.077979816 +0200
-@@ -0,0 +1,2472 @@
-+config MIPS
-+ bool
-+ default y
-+ select HAVE_GENERIC_DMA_COHERENT
-+ select HAVE_IDE
-+ select HAVE_OPROFILE
-+ select HAVE_IRQ_WORK
-+ select HAVE_PERF_EVENTS
-+ select PERF_USE_VMALLOC
-+ select HAVE_ARCH_KGDB
-+ select HAVE_FUNCTION_TRACER
-+ select HAVE_FUNCTION_TRACE_MCOUNT_TEST
-+ select HAVE_DYNAMIC_FTRACE
-+ select HAVE_FTRACE_MCOUNT_RECORD
-+ select HAVE_C_RECORDMCOUNT
-+ select HAVE_FUNCTION_GRAPH_TRACER
-+ select HAVE_KPROBES
-+ select HAVE_KRETPROBES
-+ select RTC_LIB if !MACH_LOONGSON
-+ select GENERIC_ATOMIC64 if !64BIT
-+ select HAVE_DMA_ATTRS
-+ select HAVE_DMA_API_DEBUG
-+ select HAVE_GENERIC_HARDIRQS
-+ select GENERIC_IRQ_PROBE
-+ select GENERIC_IRQ_SHOW
-+ select HAVE_ARCH_JUMP_LABEL
-+
-+menu "Machine selection"
-+
-+config ZONE_DMA
-+ bool
-+
-+choice
-+ prompt "System type"
-+ default SGI_IP22
-+
-+config MIPS_ALCHEMY
-+ bool "Alchemy processor based machines"
-+ select 64BIT_PHYS_ADDR
-+ select CEVT_R4K_LIB
-+ select CSRC_R4K_LIB
-+ select IRQ_CPU
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_APM_EMULATION
-+ select GENERIC_GPIO
-+ select ARCH_WANT_OPTIONAL_GPIOLIB
-+ select SYS_SUPPORTS_ZBOOT
-+
-+config AR7
-+ bool "Texas Instruments AR7"
-+ select BOOT_ELF32
-+ select DMA_NONCOHERENT
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select IRQ_CPU
-+ select NO_EXCEPT_FILL
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_ZBOOT_UART16550
-+ select ARCH_REQUIRE_GPIOLIB
-+ select GCD
-+ select VLYNQ
-+ help
-+ Support for the Texas Instruments AR7 System-on-a-Chip
-+ family: TNETD7100, 7200 and 7300.
-+
-+config ATH79
-+ bool "Atheros AR71XX/AR724X/AR913X based boards"
-+ select ARCH_REQUIRE_GPIOLIB
-+ select BOOT_RAW
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select MIPS_MACHINE
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ help
-+ Support for the Atheros AR71XX/AR724X/AR913X SoCs.
-+
-+config ATHEROS_AR71XX
-+ bool "Atheros AR71xx based boards"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select ARCH_REQUIRE_GPIOLIB
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_HAS_EARLY_PRINTK
-+ select MIPS_MACHINE
-+ help
-+ Support for Atheros AR71xx based boards.
-+
-+config BCM47XX
-+ bool "Broadcom BCM47XX based boards"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SSB
-+ select SSB_DRIVER_MIPS
-+ select SSB_DRIVER_EXTIF
-+ select SSB_EMBEDDED
-+ select SSB_B43_PCI_BRIDGE if PCI
-+ select SSB_PCICORE_HOSTMODE if PCI
-+ select GENERIC_GPIO
-+ select SYS_HAS_EARLY_PRINTK
-+ select CFE
-+ help
-+ Support for BCM47XX based boards
-+
-+config BCM63XX
-+ bool "Broadcom BCM63XX based boards"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_HAS_EARLY_PRINTK
-+ select SWAP_IO_SPACE
-+ select ARCH_REQUIRE_GPIOLIB
-+ help
-+ Support for BCM63XX based boards
-+
-+config MIPS_COBALT
-+ bool "Cobalt Server"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select CEVT_GT641XX
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select I8253
-+ select I8259
-+ select IRQ_CPU
-+ select IRQ_GT641XX
-+ select PCI_GT64XXX_PCI0
-+ select PCI
-+ select SYS_HAS_CPU_NEVADA
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config MACH_DECSTATION
-+ bool "DECstations"
-+ select BOOT_ELF32
-+ select CEVT_DS1287
-+ select CEVT_R4K
-+ select CSRC_IOASIC
-+ select CSRC_R4K
-+ select CPU_DADDI_WORKAROUNDS if 64BIT
-+ select CPU_R4000_WORKAROUNDS if 64BIT
-+ select CPU_R4400_WORKAROUNDS if 64BIT
-+ select DMA_NONCOHERENT
-+ select NO_IOPORT
-+ select IRQ_CPU
-+ select SYS_HAS_CPU_R3000
-+ select SYS_HAS_CPU_R4X00
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_128HZ
-+ select SYS_SUPPORTS_256HZ
-+ select SYS_SUPPORTS_1024HZ
-+ help
-+ This enables support for DEC's MIPS based workstations. For details
-+ see the Linux/MIPS FAQ on <http://www.linux-mips.org/> and the
-+ DECstation porting pages on <http://decstation.unix-ag.org/>.
-+
-+ If you have one of the following DECstation Models you definitely
-+ want to choose R4xx0 for the CPU Type:
-+
-+ DECstation 5000/50
-+ DECstation 5000/150
-+ DECstation 5000/260
-+ DECsystem 5900/260
-+
-+ otherwise choose R3000.
-+
-+config MACH_JAZZ
-+ bool "Jazz family of machines"
-+ select ARC
-+ select ARC32
-+ select ARCH_MAY_HAVE_PC_FDC
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN
-+ select GENERIC_ISA_DMA
-+ select IRQ_CPU
-+ select I8253
-+ select I8259
-+ select ISA
-+ select SYS_HAS_CPU_R4X00
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
-+ select SYS_SUPPORTS_100HZ
-+ help
-+ This a family of machines based on the MIPS R4030 chipset which was
-+ used by several vendors to build RISC/os and Windows NT workstations.
-+ Members include the Acer PICA, MIPS Magnum 4000, MIPS Millennium and
-+ Olivetti M700-10 workstations.
-+
-+config MACH_JZ4740
-+ bool "Ingenic JZ4740 based machines"
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select GENERIC_GPIO
-+ select ARCH_REQUIRE_GPIOLIB
-+ select SYS_HAS_EARLY_PRINTK
-+ select HAVE_PWM
-+ select HAVE_CLK
-+
-+config LASAT
-+ bool "LASAT Networks platforms"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select SYS_HAS_EARLY_PRINTK
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select PCI_GT64XXX_PCI0
-+ select MIPS_NILE4
-+ select R5000_CPU_SCACHE
-+ select SYS_HAS_CPU_R5000
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config MACH_LOONGSON
-+ bool "Loongson family of machines"
-+ select SYS_SUPPORTS_ZBOOT
-+ help
-+ This enables the support of Loongson family of machines.
-+
-+ Loongson is a family of general-purpose MIPS-compatible CPUs.
-+ developed at Institute of Computing Technology (ICT),
-+ Chinese Academy of Sciences (CAS) in the People's Republic
-+ of China. The chief architect is Professor Weiwu Hu.
-+
-+config MIPS_MALTA
-+ bool "MIPS Malta board"
-+ select ARCH_MAY_HAVE_PC_FDC
-+ select BOOT_ELF32
-+ select BOOT_RAW
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select GENERIC_ISA_DMA
-+ select IRQ_CPU
-+ select IRQ_GIC
-+ select HW_HAS_PCI
-+ select I8253
-+ select I8259
-+ select MIPS_BOARDS_GEN
-+ select MIPS_BONITO64
-+ select MIPS_CPU_SCACHE
-+ select PCI_GT64XXX_PCI0
-+ select MIPS_MSC
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_HAS_CPU_MIPS64_R1
-+ select SYS_HAS_CPU_NEVADA
-+ select SYS_HAS_CPU_RM7000
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_MIPS_CMP
-+ select SYS_SUPPORTS_MULTITHREADING
-+ select SYS_SUPPORTS_SMARTMIPS
-+ select SYS_SUPPORTS_ZBOOT
-+ help
-+ This enables support for the MIPS Technologies Malta evaluation
-+ board.
-+
-+config MIPS_SIM
-+ bool 'MIPS simulator (MIPSsim)'
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select SYS_HAS_EARLY_PRINTK
-+ select IRQ_CPU
-+ select BOOT_RAW
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_MULTITHREADING
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ help
-+ This option enables support for MIPS Technologies MIPSsim software
-+ emulator.
-+
-+config NEC_MARKEINS
-+ bool "NEC EMMA2RH Mark-eins board"
-+ select SOC_EMMA2RH
-+ select HW_HAS_PCI
-+ help
-+ This enables support for the NEC Electronics Mark-eins boards.
-+
-+config MACH_VR41XX
-+ bool "NEC VR4100 series based machines"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select SYS_HAS_CPU_VR41XX
-+ select ARCH_REQUIRE_GPIOLIB
-+
-+config NXP_STB220
-+ bool "NXP STB220 board"
-+ select SOC_PNX833X
-+ help
-+ Support for NXP Semiconductors STB220 Development Board.
-+
-+config NXP_STB225
-+ bool "NXP 225 board"
-+ select SOC_PNX833X
-+ select SOC_PNX8335
-+ help
-+ Support for NXP Semiconductors STB225 Development Board.
-+
-+config PNX8550_JBS
-+ bool "NXP PNX8550 based JBS board"
-+ select PNX8550
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config PNX8550_STB810
-+ bool "NXP PNX8550 based STB810 board"
-+ select PNX8550
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config PMC_MSP
-+ bool "PMC-Sierra MSP chipsets"
-+ depends on EXPERIMENTAL
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select SWAP_IO_SPACE
-+ select NO_EXCEPT_FILL
-+ select BOOT_RAW
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select IRQ_CPU
-+ select SERIAL_8250
-+ select SERIAL_8250_CONSOLE
-+ help
-+ This adds support for the PMC-Sierra family of Multi-Service
-+ Processor System-On-A-Chips. These parts include a number
-+ of integrated peripherals, interfaces and DSPs in addition to
-+ a variety of MIPS cores.
-+
-+config PMC_YOSEMITE
-+ bool "PMC-Sierra Yosemite eval board"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_COHERENT
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select IRQ_CPU_RM7K
-+ select IRQ_CPU_RM9K
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_RM9000
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_SMP
-+ help
-+ Yosemite is an evaluation board for the RM9000x2 processor
-+ manufactured by PMC-Sierra.
-+
-+config POWERTV
-+ bool "Cisco PowerTV"
-+ select BOOT_ELF32
-+ select CEVT_R4K
-+ select CPU_MIPSR2_IRQ_VI
-+ select CPU_MIPSR2_IRQ_EI
-+ select CSRC_POWERTV
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select USB_OHCI_LITTLE_ENDIAN
-+ help
-+ This enables support for the Cisco PowerTV Platform.
-+
-+config SGI_IP22
-+ bool "SGI IP22 (Indy/Indigo2)"
-+ select ARC
-+ select ARC32
-+ select BOOT_ELF32
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DEFAULT_SGI_PARTITION
-+ select DMA_NONCOHERENT
-+ select HW_HAS_EISA
-+ select I8253
-+ select I8259
-+ select IP22_CPU_SCACHE
-+ select IRQ_CPU
-+ select GENERIC_ISA_DMA_SUPPORT_BROKEN
-+ select SGI_HAS_I8042
-+ select SGI_HAS_INDYDOG
-+ select SGI_HAS_HAL2
-+ select SGI_HAS_SEEQ
-+ select SGI_HAS_WD93
-+ select SGI_HAS_ZILOG
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_R4X00
-+ select SYS_HAS_CPU_R5000
-+ #
-+ # Disable EARLY_PRINTK for now since it leads to overwritten prom
-+ # memory during early boot on some machines.
-+ #
-+ # See http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20091119164009.GA15038%40deprecation.cyrius.com
-+ # for a more details discussion
-+ #
-+ # select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ help
-+ This are the SGI Indy, Challenge S and Indigo2, as well as certain
-+ OEM variants like the Tandem CMN B006S. To compile a Linux kernel
-+ that runs on these, say Y here.
-+
-+config SGI_IP27
-+ bool "SGI IP27 (Origin200/2000)"
-+ select ARC
-+ select ARC64
-+ select BOOT_ELF64
-+ select DEFAULT_SGI_PARTITION
-+ select DMA_COHERENT
-+ select SYS_HAS_EARLY_PRINTK
-+ select HW_HAS_PCI
-+ select NR_CPUS_DEFAULT_64
-+ select SYS_HAS_CPU_R10000
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_NUMA
-+ select SYS_SUPPORTS_SMP
-+ help
-+ This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
-+ workstations. To compile a Linux kernel that runs on these, say Y
-+ here.
-+
-+config SGI_IP28
-+ bool "SGI IP28 (Indigo2 R10k) (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ select ARC
-+ select ARC64
-+ select BOOT_ELF64
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DEFAULT_SGI_PARTITION
-+ select DMA_NONCOHERENT
-+ select GENERIC_ISA_DMA_SUPPORT_BROKEN
-+ select IRQ_CPU
-+ select HW_HAS_EISA
-+ select I8253
-+ select I8259
-+ select SGI_HAS_I8042
-+ select SGI_HAS_INDYDOG
-+ select SGI_HAS_HAL2
-+ select SGI_HAS_SEEQ
-+ select SGI_HAS_WD93
-+ select SGI_HAS_ZILOG
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_R10000
-+ #
-+ # Disable EARLY_PRINTK for now since it leads to overwritten prom
-+ # memory during early boot on some machines.
-+ #
-+ # See http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20091119164009.GA15038%40deprecation.cyrius.com
-+ # for a more details discussion
-+ #
-+ # select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ help
-+ This is the SGI Indigo2 with R10000 processor. To compile a Linux
-+ kernel that runs on these, say Y here.
-+
-+config SGI_IP32
-+ bool "SGI IP32 (O2)"
-+ select ARC
-+ select ARC32
-+ select BOOT_ELF32
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select R5000_CPU_SCACHE
-+ select RM7000_CPU_SCACHE
-+ select SYS_HAS_CPU_R5000
-+ select SYS_HAS_CPU_R10000 if BROKEN
-+ select SYS_HAS_CPU_RM7000
-+ select SYS_HAS_CPU_NEVADA
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ help
-+ If you want this kernel to run on SGI O2 workstation, say Y here.
-+
-+config SIBYTE_CRHINE
-+ bool "Sibyte BCM91120C-CRhine"
-+ depends on EXPERIMENTAL
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select SIBYTE_BCM1120
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config SIBYTE_CARMEL
-+ bool "Sibyte BCM91120x-Carmel"
-+ depends on EXPERIMENTAL
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select SIBYTE_BCM1120
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config SIBYTE_CRHONE
-+ bool "Sibyte BCM91125C-CRhone"
-+ depends on EXPERIMENTAL
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select SIBYTE_BCM1125
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config SIBYTE_RHONE
-+ bool "Sibyte BCM91125E-Rhone"
-+ depends on EXPERIMENTAL
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select SIBYTE_BCM1125H
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config SIBYTE_SWARM
-+ bool "Sibyte BCM91250A-SWARM"
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select HAVE_PATA_PLATFORM
-+ select NR_CPUS_DEFAULT_2
-+ select SIBYTE_SB1250
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select ZONE_DMA32 if 64BIT
-+
-+config SIBYTE_LITTLESUR
-+ bool "Sibyte BCM91250C2-LittleSur"
-+ depends on EXPERIMENTAL
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select HAVE_PATA_PLATFORM
-+ select NR_CPUS_DEFAULT_2
-+ select SIBYTE_SB1250
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config SIBYTE_SENTOSA
-+ bool "Sibyte BCM91250E-Sentosa"
-+ depends on EXPERIMENTAL
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select NR_CPUS_DEFAULT_2
-+ select SIBYTE_SB1250
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+
-+config SIBYTE_BIGSUR
-+ bool "Sibyte BCM91480B-BigSur"
-+ select BOOT_ELF32
-+ select DMA_COHERENT
-+ select NR_CPUS_DEFAULT_4
-+ select SIBYTE_BCM1x80
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_SB1
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select ZONE_DMA32 if 64BIT
-+
-+config SNI_RM
-+ bool "SNI RM200/300/400"
-+ select ARC if CPU_LITTLE_ENDIAN
-+ select ARC32 if CPU_LITTLE_ENDIAN
-+ select SNIPROM if CPU_BIG_ENDIAN
-+ select ARCH_MAY_HAVE_PC_FDC
-+ select BOOT_ELF32
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN
-+ select DMA_NONCOHERENT
-+ select GENERIC_ISA_DMA
-+ select HW_HAS_EISA
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select I8253
-+ select I8259
-+ select ISA
-+ select SWAP_IO_SPACE if CPU_BIG_ENDIAN
-+ select SYS_HAS_CPU_R4X00
-+ select SYS_HAS_CPU_R5000
-+ select SYS_HAS_CPU_R10000
-+ select R5000_CPU_SCACHE
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ help
-+ The SNI RM200/300/400 are MIPS-based machines manufactured by
-+ Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid
-+ Technology and now in turn merged with Fujitsu. Say Y here to
-+ support this machine type.
-+
-+config MACH_TX39XX
-+ bool "Toshiba TX39 series based machines"
-+
-+config MACH_TX49XX
-+ bool "Toshiba TX49 series based machines"
-+
-+config MIKROTIK_RB532
-+ bool "Mikrotik RB532 boards"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SWAP_IO_SPACE
-+ select BOOT_RAW
-+ select ARCH_REQUIRE_GPIOLIB
-+ help
-+ Support the Mikrotik(tm) RouterBoard 532 series,
-+ based on the IDT RC32434 SoC.
-+
-+config WR_PPMC
-+ bool "Wind River PPMC board"
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select IRQ_CPU
-+ select BOOT_ELF32
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select PCI_GT64XXX_PCI0
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_HAS_CPU_MIPS64_R1
-+ select SYS_HAS_CPU_NEVADA
-+ select SYS_HAS_CPU_RM7000
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ help
-+ This enables support for the Wind River MIPS32 4KC PPMC evaluation
-+ board, which is based on GT64120 bridge chip.
-+
-+config CAVIUM_OCTEON_SIMULATOR
-+ bool "Cavium Networks Octeon Simulator"
-+ select CEVT_R4K
-+ select 64BIT_PHYS_ADDR
-+ select DMA_COHERENT
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_HOTPLUG_CPU
-+ select SYS_HAS_CPU_CAVIUM_OCTEON
-+ help
-+ The Octeon simulator is software performance model of the Cavium
-+ Octeon Processor. It supports simulating Octeon processors on x86
-+ hardware.
-+
-+config CAVIUM_OCTEON_REFERENCE_BOARD
-+ bool "Cavium Networks Octeon reference board"
-+ select CEVT_R4K
-+ select 64BIT_PHYS_ADDR
-+ select DMA_COHERENT
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_HIGHMEM
-+ select SYS_SUPPORTS_HOTPLUG_CPU
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_HAS_CPU_CAVIUM_OCTEON
-+ select SWAP_IO_SPACE
-+ select HW_HAS_PCI
-+ select ARCH_SUPPORTS_MSI
-+ select ZONE_DMA32
-+ select USB_ARCH_HAS_OHCI
-+ select USB_ARCH_HAS_EHCI
-+ help
-+ This option supports all of the Octeon reference boards from Cavium
-+ Networks. It builds a kernel that dynamically determines the Octeon
-+ CPU type and supports all known board reference implementations.
-+ Some of the supported boards are:
-+ EBT3000
-+ EBH3000
-+ EBH3100
-+ Thunder
-+ Kodama
-+ Hikari
-+ Say Y here for most Octeon reference boards.
-+
-+endchoice
-+
-+source "arch/mips/alchemy/Kconfig"
-+source "arch/mips/ar71xx/Kconfig"
-+source "arch/mips/ath79/Kconfig"
-+source "arch/mips/bcm63xx/Kconfig"
-+source "arch/mips/jazz/Kconfig"
-+source "arch/mips/jz4740/Kconfig"
-+source "arch/mips/lasat/Kconfig"
-+source "arch/mips/pmc-sierra/Kconfig"
-+source "arch/mips/powertv/Kconfig"
-+source "arch/mips/sgi-ip27/Kconfig"
-+source "arch/mips/sibyte/Kconfig"
-+source "arch/mips/txx9/Kconfig"
-+source "arch/mips/vr41xx/Kconfig"
-+source "arch/mips/cavium-octeon/Kconfig"
-+source "arch/mips/loongson/Kconfig"
-+
-+endmenu
-+
-+config RWSEM_GENERIC_SPINLOCK
-+ bool
-+ default y
-+
-+config RWSEM_XCHGADD_ALGORITHM
-+ bool
-+
-+config ARCH_HAS_ILOG2_U32
-+ bool
-+ default n
-+
-+config ARCH_HAS_ILOG2_U64
-+ bool
-+ default n
-+
-+config ARCH_SUPPORTS_OPROFILE
-+ bool
-+ default y if !MIPS_MT_SMTC
-+
-+config GENERIC_FIND_NEXT_BIT
-+ bool
-+ default y
-+
-+config GENERIC_FIND_BIT_LE
-+ bool
-+ default y
-+
-+config GENERIC_HWEIGHT
-+ bool
-+ default y
-+
-+config GENERIC_CALIBRATE_DELAY
-+ bool
-+ default y
-+
-+config GENERIC_CLOCKEVENTS
-+ bool
-+ default y
-+
-+config GENERIC_CMOS_UPDATE
-+ bool
-+ default y
-+
-+config SCHED_OMIT_FRAME_POINTER
-+ bool
-+ default y
-+
-+#
-+# Select some configuration options automatically based on user selections.
-+#
-+config ARC
-+ bool
-+
-+config ARCH_MAY_HAVE_PC_FDC
-+ bool
-+
-+config BOOT_RAW
-+ bool
-+
-+config CEVT_BCM1480
-+ bool
-+
-+config CEVT_DS1287
-+ bool
-+
-+config CEVT_GT641XX
-+ bool
-+
-+config CEVT_R4K_LIB
-+ bool
-+
-+config CEVT_R4K
-+ select CEVT_R4K_LIB
-+ bool
-+
-+config CEVT_SB1250
-+ bool
-+
-+config CEVT_TXX9
-+ bool
-+
-+config CSRC_BCM1480
-+ bool
-+
-+config CSRC_IOASIC
-+ bool
-+
-+config CSRC_POWERTV
-+ bool
-+
-+config CSRC_R4K_LIB
-+ bool
-+
-+config CSRC_R4K
-+ select CSRC_R4K_LIB
-+ bool
-+
-+config CSRC_SB1250
-+ bool
-+
-+config GPIO_TXX9
-+ select GENERIC_GPIO
-+ select ARCH_REQUIRE_GPIOLIB
-+ bool
-+
-+config CFE
-+ bool
-+
-+config ARCH_DMA_ADDR_T_64BIT
-+ def_bool (HIGHMEM && 64BIT_PHYS_ADDR) || 64BIT
-+
-+config DMA_COHERENT
-+ bool
-+
-+config DMA_NONCOHERENT
-+ bool
-+ select NEED_DMA_MAP_STATE
-+
-+config NEED_DMA_MAP_STATE
-+ bool
-+
-+config SYS_HAS_EARLY_PRINTK
-+ bool
-+
-+config HOTPLUG_CPU
-+ bool "Support for hot-pluggable CPUs"
-+ depends on SMP && HOTPLUG && SYS_SUPPORTS_HOTPLUG_CPU
-+ help
-+ Say Y here to allow turning CPUs off and on. CPUs can be
-+ controlled through /sys/devices/system/cpu.
-+ (Note: power management support will enable this option
-+ automatically on SMP systems. )
-+ Say N if you want to disable CPU hotplug.
-+
-+config SYS_SUPPORTS_HOTPLUG_CPU
-+ bool
-+
-+config I8259
-+ bool
-+
-+config MIPS_BONITO64
-+ bool
-+
-+config MIPS_MSC
-+ bool
-+
-+config MIPS_NILE4
-+ bool
-+
-+config MIPS_DISABLE_OBSOLETE_IDE
-+ bool
-+
-+config SYNC_R4K
-+ bool
-+
-+config MIPS_MACHINE
-+ def_bool n
-+
-+config NO_IOPORT
-+ def_bool n
-+
-+config GENERIC_ISA_DMA
-+ bool
-+ select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
-+ select ISA_DMA_API
-+
-+config GENERIC_ISA_DMA_SUPPORT_BROKEN
-+ bool
-+ select GENERIC_ISA_DMA
-+
-+config ISA_DMA_API
-+ bool
-+
-+config GENERIC_GPIO
-+ bool
-+
-+#
-+# Endianess selection. Sufficiently obscure so many users don't know what to
-+# answer,so we try hard to limit the available choices. Also the use of a
-+# choice statement should be more obvious to the user.
-+#
-+choice
-+ prompt "Endianess selection"
-+ help
-+ Some MIPS machines can be configured for either little or big endian
-+ byte order. These modes require different kernels and a different
-+ Linux distribution. In general there is one preferred byteorder for a
-+ particular system but some systems are just as commonly used in the
-+ one or the other endianness.
-+
-+config CPU_BIG_ENDIAN
-+ bool "Big endian"
-+ depends on SYS_SUPPORTS_BIG_ENDIAN
-+
-+config CPU_LITTLE_ENDIAN
-+ bool "Little endian"
-+ depends on SYS_SUPPORTS_LITTLE_ENDIAN
-+ help
-+
-+endchoice
-+
-+config EXPORT_UASM
-+ bool
-+
-+config SYS_SUPPORTS_APM_EMULATION
-+ bool
-+
-+config SYS_SUPPORTS_BIG_ENDIAN
-+ bool
-+
-+config SYS_SUPPORTS_LITTLE_ENDIAN
-+ bool
-+
-+config SYS_SUPPORTS_HUGETLBFS
-+ bool
-+ depends on CPU_SUPPORTS_HUGEPAGES && 64BIT
-+ default y
-+
-+config IRQ_CPU
-+ bool
-+
-+config IRQ_CPU_RM7K
-+ bool
-+
-+config IRQ_CPU_RM9K
-+ bool
-+
-+config IRQ_MSP_SLP
-+ bool
-+
-+config IRQ_MSP_CIC
-+ bool
-+
-+config IRQ_TXX9
-+ bool
-+
-+config IRQ_GT641XX
-+ bool
-+
-+config IRQ_GIC
-+ bool
-+
-+config MIPS_BOARDS_GEN
-+ bool
-+
-+config PCI_GT64XXX_PCI0
-+ bool
-+
-+config NO_EXCEPT_FILL
-+ bool
-+
-+config MIPS_RM9122
-+ bool
-+ select SERIAL_RM9000
-+
-+config SOC_EMMA2RH
-+ bool
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_R5500
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+
-+config SOC_PNX833X
-+ bool
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select IRQ_CPU
-+ select DMA_NONCOHERENT
-+ select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select GENERIC_GPIO
-+ select CPU_MIPSR2_IRQ_VI
-+
-+config SOC_PNX8335
-+ bool
-+ select SOC_PNX833X
-+
-+config PNX8550
-+ bool
-+ select SOC_PNX8550
-+
-+config SOC_PNX8550
-+ bool
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select GENERIC_GPIO
-+
-+config SWAP_IO_SPACE
-+ bool
-+
-+config SERIAL_RM9000
-+ bool
-+
-+config SGI_HAS_INDYDOG
-+ bool
-+
-+config SGI_HAS_HAL2
-+ bool
-+
-+config SGI_HAS_SEEQ
-+ bool
-+
-+config SGI_HAS_WD93
-+ bool
-+
-+config SGI_HAS_ZILOG
-+ bool
-+
-+config SGI_HAS_I8042
-+ bool
-+
-+config DEFAULT_SGI_PARTITION
-+ bool
-+
-+config ARC32
-+ bool
-+
-+config SNIPROM
-+ bool
-+
-+config BOOT_ELF32
-+ bool
-+
-+config MIPS_L1_CACHE_SHIFT
-+ int
-+ default "4" if MACH_DECSTATION || MIKROTIK_RB532 || PMC_MSP4200_EVAL
-+ default "6" if MIPS_CPU_SCACHE
-+ default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM || CPU_CAVIUM_OCTEON
-+ default "5"
-+
-+config HAVE_STD_PC_SERIAL_PORT
-+ bool
-+
-+config ARC_CONSOLE
-+ bool "ARC console support"
-+ depends on SGI_IP22 || SGI_IP28 || (SNI_RM && CPU_LITTLE_ENDIAN)
-+
-+config ARC_MEMORY
-+ bool
-+ depends on MACH_JAZZ || SNI_RM || SGI_IP32
-+ default y
-+
-+config ARC_PROMLIB
-+ bool
-+ depends on MACH_JAZZ || SNI_RM || SGI_IP22 || SGI_IP28 || SGI_IP32
-+ default y
-+
-+config ARC64
-+ bool
-+
-+config BOOT_ELF64
-+ bool
-+
-+menu "CPU selection"
-+
-+choice
-+ prompt "CPU type"
-+ default CPU_R4X00
-+
-+config CPU_LOONGSON2E
-+ bool "Loongson 2E"
-+ depends on SYS_HAS_CPU_LOONGSON2E
-+ select CPU_LOONGSON2
-+ help
-+ The Loongson 2E processor implements the MIPS III instruction set
-+ with many extensions.
-+
-+ It has an internal FPGA northbridge, which is compatible to
-+ bonito64.
-+
-+config CPU_LOONGSON2F
-+ bool "Loongson 2F"
-+ depends on SYS_HAS_CPU_LOONGSON2F
-+ select CPU_LOONGSON2
-+ select GENERIC_GPIO
-+ select ARCH_REQUIRE_GPIOLIB
-+ help
-+ The Loongson 2F processor implements the MIPS III instruction set
-+ with many extensions.
-+
-+ Loongson2F have built-in DDR2 and PCIX controller. The PCIX controller
-+ have a similar programming interface with FPGA northbridge used in
-+ Loongson2E.
-+
-+config CPU_MIPS32_R1
-+ bool "MIPS32 Release 1"
-+ depends on SYS_HAS_CPU_MIPS32_R1
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ help
-+ Choose this option to build a kernel for release 1 or later of the
-+ MIPS32 architecture. Most modern embedded systems with a 32-bit
-+ MIPS processor are based on a MIPS32 processor. If you know the
-+ specific type of processor in your system, choose those that one
-+ otherwise CPU_MIPS32_R1 is a safe bet for any MIPS32 system.
-+ Release 2 of the MIPS32 architecture is available since several
-+ years so chances are you even have a MIPS32 Release 2 processor
-+ in which case you should choose CPU_MIPS32_R2 instead for better
-+ performance.
-+
-+config CPU_MIPS32_R2
-+ bool "MIPS32 Release 2"
-+ depends on SYS_HAS_CPU_MIPS32_R2
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ help
-+ Choose this option to build a kernel for release 2 or later of the
-+ MIPS32 architecture. Most modern embedded systems with a 32-bit
-+ MIPS processor are based on a MIPS32 processor. If you know the
-+ specific type of processor in your system, choose those that one
-+ otherwise CPU_MIPS32_R1 is a safe bet for any MIPS32 system.
-+
-+config CPU_MIPS64_R1
-+ bool "MIPS64 Release 1"
-+ depends on SYS_HAS_CPU_MIPS64_R1
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ select CPU_SUPPORTS_HUGEPAGES
-+ help
-+ Choose this option to build a kernel for release 1 or later of the
-+ MIPS64 architecture. Many modern embedded systems with a 64-bit
-+ MIPS processor are based on a MIPS64 processor. If you know the
-+ specific type of processor in your system, choose those that one
-+ otherwise CPU_MIPS64_R1 is a safe bet for any MIPS64 system.
-+ Release 2 of the MIPS64 architecture is available since several
-+ years so chances are you even have a MIPS64 Release 2 processor
-+ in which case you should choose CPU_MIPS64_R2 instead for better
-+ performance.
-+
-+config CPU_MIPS64_R2
-+ bool "MIPS64 Release 2"
-+ depends on SYS_HAS_CPU_MIPS64_R2
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ select CPU_SUPPORTS_HUGEPAGES
-+ help
-+ Choose this option to build a kernel for release 2 or later of the
-+ MIPS64 architecture. Many modern embedded systems with a 64-bit
-+ MIPS processor are based on a MIPS64 processor. If you know the
-+ specific type of processor in your system, choose those that one
-+ otherwise CPU_MIPS64_R1 is a safe bet for any MIPS64 system.
-+
-+config CPU_R3000
-+ bool "R3000"
-+ depends on SYS_HAS_CPU_R3000
-+ select CPU_HAS_WB
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ help
-+ Please make sure to pick the right CPU type. Linux/MIPS is not
-+ designed to be generic, i.e. Kernels compiled for R3000 CPUs will
-+ *not* work on R4000 machines and vice versa. However, since most
-+ of the supported machines have an R4000 (or similar) CPU, R4x00
-+ might be a safe bet. If the resulting kernel does not work,
-+ try to recompile with R3000.
-+
-+config CPU_TX39XX
-+ bool "R39XX"
-+ depends on SYS_HAS_CPU_TX39XX
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+
-+config CPU_VR41XX
-+ bool "R41xx"
-+ depends on SYS_HAS_CPU_VR41XX
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ help
-+ The options selects support for the NEC VR4100 series of processors.
-+ Only choose this option if you have one of these processors as a
-+ kernel built with this option will not run on any other type of
-+ processor or vice versa.
-+
-+config CPU_R4300
-+ bool "R4300"
-+ depends on SYS_HAS_CPU_R4300
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ help
-+ MIPS Technologies R4300-series processors.
-+
-+config CPU_R4X00
-+ bool "R4x00"
-+ depends on SYS_HAS_CPU_R4X00
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ help
-+ MIPS Technologies R4000-series processors other than 4300, including
-+ the R4000, R4400, R4600, and 4700.
-+
-+config CPU_TX49XX
-+ bool "R49XX"
-+ depends on SYS_HAS_CPU_TX49XX
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+
-+config CPU_R5000
-+ bool "R5000"
-+ depends on SYS_HAS_CPU_R5000
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ help
-+ MIPS Technologies R5000-series processors other than the Nevada.
-+
-+config CPU_R5432
-+ bool "R5432"
-+ depends on SYS_HAS_CPU_R5432
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+
-+config CPU_R5500
-+ bool "R5500"
-+ depends on SYS_HAS_CPU_R5500
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HUGEPAGES
-+ help
-+ NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV
-+ instruction set.
-+
-+config CPU_R6000
-+ bool "R6000"
-+ depends on EXPERIMENTAL
-+ depends on SYS_HAS_CPU_R6000
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ help
-+ MIPS Technologies R6000 and R6000A series processors. Note these
-+ processors are extremely rare and the support for them is incomplete.
-+
-+config CPU_NEVADA
-+ bool "RM52xx"
-+ depends on SYS_HAS_CPU_NEVADA
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ help
-+ QED / PMC-Sierra RM52xx-series ("Nevada") processors.
-+
-+config CPU_R8000
-+ bool "R8000"
-+ depends on EXPERIMENTAL
-+ depends on SYS_HAS_CPU_R8000
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ help
-+ MIPS Technologies R8000 processors. Note these processors are
-+ uncommon and the support for them is incomplete.
-+
-+config CPU_R10000
-+ bool "R10000"
-+ depends on SYS_HAS_CPU_R10000
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ help
-+ MIPS Technologies R10000-series processors.
-+
-+config CPU_RM7000
-+ bool "RM7000"
-+ depends on SYS_HAS_CPU_RM7000
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+
-+config CPU_RM9000
-+ bool "RM9000"
-+ depends on SYS_HAS_CPU_RM9000
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ select WEAK_ORDERING
-+
-+config CPU_SB1
-+ bool "SB1"
-+ depends on SYS_HAS_CPU_SB1
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ select WEAK_ORDERING
-+
-+config CPU_CAVIUM_OCTEON
-+ bool "Cavium Octeon processor"
-+ depends on SYS_HAS_CPU_CAVIUM_OCTEON
-+ select CPU_HAS_PREFETCH
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select SYS_SUPPORTS_SMP
-+ select NR_CPUS_DEFAULT_16
-+ select WEAK_ORDERING
-+ select CPU_SUPPORTS_HIGHMEM
-+ select CPU_SUPPORTS_HUGEPAGES
-+ help
-+ The Cavium Octeon processor is a highly integrated chip containing
-+ many ethernet hardware widgets for networking tasks. The processor
-+ can have up to 16 Mips64v2 cores and 8 integrated gigabit ethernets.
-+ Full details can be found at http://www.caviumnetworks.com.
-+
-+config CPU_BMIPS3300
-+ bool "BMIPS3300"
-+ depends on SYS_HAS_CPU_BMIPS3300
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select SWAP_IO_SPACE
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select WEAK_ORDERING
-+ help
-+ Broadcom BMIPS3300 processors.
-+
-+config CPU_BMIPS4350
-+ bool "BMIPS4350"
-+ depends on SYS_HAS_CPU_BMIPS4350
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select SWAP_IO_SPACE
-+ select SYS_SUPPORTS_SMP
-+ select SYS_SUPPORTS_HOTPLUG_CPU
-+ select WEAK_ORDERING
-+ help
-+ Broadcom BMIPS4350 ("VIPER") processors.
-+
-+config CPU_BMIPS4380
-+ bool "BMIPS4380"
-+ depends on SYS_HAS_CPU_BMIPS4380
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select SWAP_IO_SPACE
-+ select SYS_SUPPORTS_SMP
-+ select SYS_SUPPORTS_HOTPLUG_CPU
-+ select WEAK_ORDERING
-+ help
-+ Broadcom BMIPS4380 processors.
-+
-+config CPU_BMIPS5000
-+ bool "BMIPS5000"
-+ depends on SYS_HAS_CPU_BMIPS5000
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select SWAP_IO_SPACE
-+ select SYS_SUPPORTS_SMP
-+ select SYS_SUPPORTS_HOTPLUG_CPU
-+ select WEAK_ORDERING
-+ help
-+ Broadcom BMIPS5000 processors.
-+
-+endchoice
-+
-+if CPU_LOONGSON2F
-+config CPU_NOP_WORKAROUNDS
-+ bool
-+
-+config CPU_JUMP_WORKAROUNDS
-+ bool
-+
-+config CPU_LOONGSON2F_WORKAROUNDS
-+ bool "Loongson 2F Workarounds"
-+ default y
-+ select CPU_NOP_WORKAROUNDS
-+ select CPU_JUMP_WORKAROUNDS
-+ help
-+ Loongson 2F01 / 2F02 processors have the NOP & JUMP issues which
-+ require workarounds. Without workarounds the system may hang
-+ unexpectedly. For more information please refer to the gas
-+ -mfix-loongson2f-nop and -mfix-loongson2f-jump options.
-+
-+ Loongson 2F03 and later have fixed these issues and no workarounds
-+ are needed. The workarounds have no significant side effect on them
-+ but may decrease the performance of the system so this option should
-+ be disabled unless the kernel is intended to be run on 2F01 or 2F02
-+ systems.
-+
-+ If unsure, please say Y.
-+endif # CPU_LOONGSON2F
-+
-+config SYS_SUPPORTS_ZBOOT
-+ bool
-+ select HAVE_KERNEL_GZIP
-+ select HAVE_KERNEL_BZIP2
-+ select HAVE_KERNEL_LZMA
-+ select HAVE_KERNEL_LZO
-+
-+config SYS_SUPPORTS_ZBOOT_UART16550
-+ bool
-+ select SYS_SUPPORTS_ZBOOT
-+
-+config CPU_LOONGSON2
-+ bool
-+ select CPU_SUPPORTS_32BIT_KERNEL
-+ select CPU_SUPPORTS_64BIT_KERNEL
-+ select CPU_SUPPORTS_HIGHMEM
-+
-+config SYS_HAS_CPU_LOONGSON2E
-+ bool
-+
-+config SYS_HAS_CPU_LOONGSON2F
-+ bool
-+ select CPU_SUPPORTS_CPUFREQ
-+ select CPU_SUPPORTS_ADDRWINCFG if 64BIT
-+ select CPU_SUPPORTS_UNCACHED_ACCELERATED
-+
-+config SYS_HAS_CPU_MIPS32_R1
-+ bool
-+
-+config SYS_HAS_CPU_MIPS32_R2
-+ bool
-+
-+config SYS_HAS_CPU_MIPS64_R1
-+ bool
-+
-+config SYS_HAS_CPU_MIPS64_R2
-+ bool
-+
-+config SYS_HAS_CPU_R3000
-+ bool
-+
-+config SYS_HAS_CPU_TX39XX
-+ bool
-+
-+config SYS_HAS_CPU_VR41XX
-+ bool
-+
-+config SYS_HAS_CPU_R4300
-+ bool
-+
-+config SYS_HAS_CPU_R4X00
-+ bool
-+
-+config SYS_HAS_CPU_TX49XX
-+ bool
-+
-+config SYS_HAS_CPU_R5000
-+ bool
-+
-+config SYS_HAS_CPU_R5432
-+ bool
-+
-+config SYS_HAS_CPU_R5500
-+ bool
-+
-+config SYS_HAS_CPU_R6000
-+ bool
-+
-+config SYS_HAS_CPU_NEVADA
-+ bool
-+
-+config SYS_HAS_CPU_R8000
-+ bool
-+
-+config SYS_HAS_CPU_R10000
-+ bool
-+
-+config SYS_HAS_CPU_RM7000
-+ bool
-+
-+config SYS_HAS_CPU_RM9000
-+ bool
-+
-+config SYS_HAS_CPU_SB1
-+ bool
-+
-+config SYS_HAS_CPU_CAVIUM_OCTEON
-+ bool
-+
-+config SYS_HAS_CPU_BMIPS3300
-+ bool
-+
-+config SYS_HAS_CPU_BMIPS4350
-+ bool
-+
-+config SYS_HAS_CPU_BMIPS4380
-+ bool
-+
-+config SYS_HAS_CPU_BMIPS5000
-+ bool
-+
-+#
-+# CPU may reorder R->R, R->W, W->R, W->W
-+# Reordering beyond LL and SC is handled in WEAK_REORDERING_BEYOND_LLSC
-+#
-+config WEAK_ORDERING
-+ bool
-+
-+#
-+# CPU may reorder reads and writes beyond LL/SC
-+# CPU may reorder R->LL, R->LL, W->LL, W->LL, R->SC, R->SC, W->SC, W->SC
-+#
-+config WEAK_REORDERING_BEYOND_LLSC
-+ bool
-+endmenu
-+
-+#
-+# These two indicate any level of the MIPS32 and MIPS64 architecture
-+#
-+config CPU_MIPS32
-+ bool
-+ default y if CPU_MIPS32_R1 || CPU_MIPS32_R2
-+
-+config CPU_MIPS64
-+ bool
-+ default y if CPU_MIPS64_R1 || CPU_MIPS64_R2
-+
-+#
-+# These two indicate the revision of the architecture, either Release 1 or Release 2
-+#
-+config CPU_MIPSR1
-+ bool
-+ default y if CPU_MIPS32_R1 || CPU_MIPS64_R1
-+
-+config CPU_MIPSR2
-+ bool
-+ default y if CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_CAVIUM_OCTEON
-+
-+config SYS_SUPPORTS_32BIT_KERNEL
-+ bool
-+config SYS_SUPPORTS_64BIT_KERNEL
-+ bool
-+config CPU_SUPPORTS_32BIT_KERNEL
-+ bool
-+config CPU_SUPPORTS_64BIT_KERNEL
-+ bool
-+config CPU_SUPPORTS_CPUFREQ
-+ bool
-+config CPU_SUPPORTS_ADDRWINCFG
-+ bool
-+config CPU_SUPPORTS_HUGEPAGES
-+ bool
-+config CPU_SUPPORTS_UNCACHED_ACCELERATED
-+ bool
-+config MIPS_PGD_C0_CONTEXT
-+ bool
-+ default y if 64BIT && CPU_MIPSR2
-+
-+#
-+# Set to y for ptrace access to watch registers.
-+#
-+config HARDWARE_WATCHPOINTS
-+ bool
-+ default y if CPU_MIPSR1 || CPU_MIPSR2
-+
-+menu "Kernel type"
-+
-+choice
-+
-+ prompt "Kernel code model"
-+ help
-+ You should only select this option if you have a workload that
-+ actually benefits from 64-bit processing or if your machine has
-+ large memory. You will only be presented a single option in this
-+ menu if your system does not support both 32-bit and 64-bit kernels.
-+
-+config 32BIT
-+ bool "32-bit kernel"
-+ depends on CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL
-+ select TRAD_SIGNALS
-+ help
-+ Select this option if you want to build a 32-bit kernel.
-+config 64BIT
-+ bool "64-bit kernel"
-+ depends on CPU_SUPPORTS_64BIT_KERNEL && SYS_SUPPORTS_64BIT_KERNEL
-+ select HAVE_SYSCALL_WRAPPERS
-+ help
-+ Select this option if you want to build a 64-bit kernel.
-+
-+endchoice
-+
-+choice
-+ prompt "Kernel page size"
-+ default PAGE_SIZE_4KB
-+
-+config PAGE_SIZE_4KB
-+ bool "4kB"
-+ depends on !CPU_LOONGSON2
-+ help
-+ This option select the standard 4kB Linux page size. On some
-+ R3000-family processors this is the only available page size. Using
-+ 4kB page size will minimize memory consumption and is therefore
-+ recommended for low memory systems.
-+
-+config PAGE_SIZE_8KB
-+ bool "8kB"
-+ depends on (EXPERIMENTAL && CPU_R8000) || CPU_CAVIUM_OCTEON
-+ help
-+ Using 8kB page size will result in higher performance kernel at
-+ the price of higher memory consumption. This option is available
-+ only on R8000 and cnMIPS processors. Note that you will need a
-+ suitable Linux distribution to support this.
-+
-+config PAGE_SIZE_16KB
-+ bool "16kB"
-+ depends on !CPU_R3000 && !CPU_TX39XX
-+ help
-+ Using 16kB page size will result in higher performance kernel at
-+ the price of higher memory consumption. This option is available on
-+ all non-R3000 family processors. Note that you will need a suitable
-+ Linux distribution to support this.
-+
-+config PAGE_SIZE_32KB
-+ bool "32kB"
-+ depends on CPU_CAVIUM_OCTEON
-+ help
-+ Using 32kB page size will result in higher performance kernel at
-+ the price of higher memory consumption. This option is available
-+ only on cnMIPS cores. Note that you will need a suitable Linux
-+ distribution to support this.
-+
-+config PAGE_SIZE_64KB
-+ bool "64kB"
-+ depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX
-+ help
-+ Using 64kB page size will result in higher performance kernel at
-+ the price of higher memory consumption. This option is available on
-+ all non-R3000 family processor. Not that at the time of this
-+ writing this option is still high experimental.
-+
-+endchoice
-+
-+config FORCE_MAX_ZONEORDER
-+ int "Maximum zone order"
-+ range 13 64 if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_32KB
-+ default "13" if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_32KB
-+ range 12 64 if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_16KB
-+ default "12" if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_16KB
-+ range 11 64
-+ default "11"
-+ help
-+ The kernel memory allocator divides physically contiguous memory
-+ blocks into "zones", where each zone is a power of two number of
-+ pages. This option selects the largest power of two that the kernel
-+ keeps in the memory allocator. If you need to allocate very large
-+ blocks of physically contiguous memory, then you may need to
-+ increase this value.
-+
-+ This config option is actually maximum order plus one. For example,
-+ a value of 11 means that the largest free memory block is 2^10 pages.
-+
-+ The page size is not necessarily 4KB. Keep this in mind
-+ when choosing a value for this option.
-+
-+config BOARD_SCACHE
-+ bool
-+
-+config IP22_CPU_SCACHE
-+ bool
-+ select BOARD_SCACHE
-+
-+#
-+# Support for a MIPS32 / MIPS64 style S-caches
-+#
-+config MIPS_CPU_SCACHE
-+ bool
-+ select BOARD_SCACHE
-+
-+config R5000_CPU_SCACHE
-+ bool
-+ select BOARD_SCACHE
-+
-+config RM7000_CPU_SCACHE
-+ bool
-+ select BOARD_SCACHE
-+
-+config SIBYTE_DMA_PAGEOPS
-+ bool "Use DMA to clear/copy pages"
-+ depends on CPU_SB1
-+ help
-+ Instead of using the CPU to zero and copy pages, use a Data Mover
-+ channel. These DMA channels are otherwise unused by the standard
-+ SiByte Linux port. Seems to give a small performance benefit.
-+
-+config CPU_HAS_PREFETCH
-+ bool
-+
-+choice
-+ prompt "MIPS MT options"
-+
-+config MIPS_MT_DISABLED
-+ bool "Disable multithreading support."
-+ help
-+ Use this option if your workload can't take advantage of
-+ MIPS hardware multithreading support. On systems that don't have
-+ the option of an MT-enabled processor this option will be the only
-+ option in this menu.
-+
-+config MIPS_MT_SMP
-+ bool "Use 1 TC on each available VPE for SMP"
-+ depends on SYS_SUPPORTS_MULTITHREADING
-+ select CPU_MIPSR2_IRQ_VI
-+ select CPU_MIPSR2_IRQ_EI
-+ select MIPS_MT
-+ select NR_CPUS_DEFAULT_2
-+ select SMP
-+ select SYS_SUPPORTS_SCHED_SMT if SMP
-+ select SYS_SUPPORTS_SMP
-+ select SMP_UP
-+ help
-+ This is a kernel model which is known a VSMP but lately has been
-+ marketesed into SMVP.
-+ Virtual SMP uses the processor's VPEs to implement virtual
-+ processors. In currently available configuration of the 34K processor
-+ this allows for a dual processor. Both processors will share the same
-+ primary caches; each will obtain the half of the TLB for it's own
-+ exclusive use. For a layman this model can be described as similar to
-+ what Intel calls Hyperthreading.
-+
-+ For further information see http://www.linux-mips.org/wiki/34K#VSMP
-+
-+config MIPS_MT_SMTC
-+ bool "SMTC: Use all TCs on all VPEs for SMP"
-+ depends on CPU_MIPS32_R2
-+ #depends on CPU_MIPS64_R2 # once there is hardware ...
-+ depends on SYS_SUPPORTS_MULTITHREADING
-+ select CPU_MIPSR2_IRQ_VI
-+ select CPU_MIPSR2_IRQ_EI
-+ select MIPS_MT
-+ select NR_CPUS_DEFAULT_8
-+ select SMP
-+ select SYS_SUPPORTS_SMP
-+ select SMP_UP
-+ help
-+ This is a kernel model which is known a SMTC or lately has been
-+ marketesed into SMVP.
-+ is presenting the available TC's of the core as processors to Linux.
-+ On currently available 34K processors this means a Linux system will
-+ see up to 5 processors. The implementation of the SMTC kernel differs
-+ significantly from VSMP and cannot efficiently coexist in the same
-+ kernel binary so the choice between VSMP and SMTC is a compile time
-+ decision.
-+
-+ For further information see http://www.linux-mips.org/wiki/34K#SMTC
-+
-+endchoice
-+
-+config MIPS_MT
-+ bool
-+
-+config SCHED_SMT
-+ bool "SMT (multithreading) scheduler support"
-+ depends on SYS_SUPPORTS_SCHED_SMT
-+ default n
-+ help
-+ SMT scheduler support improves the CPU scheduler's decision making
-+ when dealing with MIPS MT enabled cores at a cost of slightly
-+ increased overhead in some places. If unsure say N here.
-+
-+config SYS_SUPPORTS_SCHED_SMT
-+ bool
-+
-+
-+config SYS_SUPPORTS_MULTITHREADING
-+ bool
-+
-+config MIPS_MT_FPAFF
-+ bool "Dynamic FPU affinity for FP-intensive threads"
-+ default y
-+ depends on MIPS_MT_SMP || MIPS_MT_SMTC
-+
-+config MIPS_VPE_LOADER
-+ bool "VPE loader support."
-+ depends on SYS_SUPPORTS_MULTITHREADING
-+ select CPU_MIPSR2_IRQ_VI
-+ select CPU_MIPSR2_IRQ_EI
-+ select MIPS_MT
-+ help
-+ Includes a loader for loading an elf relocatable object
-+ onto another VPE and running it.
-+
-+config MIPS_MT_SMTC_IM_BACKSTOP
-+ bool "Use per-TC register bits as backstop for inhibited IM bits"
-+ depends on MIPS_MT_SMTC
-+ default n
-+ help
-+ To support multiple TC microthreads acting as "CPUs" within
-+ a VPE, VPE-wide interrupt mask bits must be specially manipulated
-+ during interrupt handling. To support legacy drivers and interrupt
-+ controller management code, SMTC has a "backstop" to track and
-+ if necessary restore the interrupt mask. This has some performance
-+ impact on interrupt service overhead.
-+
-+config MIPS_MT_SMTC_IRQAFF
-+ bool "Support IRQ affinity API"
-+ depends on MIPS_MT_SMTC
-+ default n
-+ help
-+ Enables SMP IRQ affinity API (/proc/irq/*/smp_affinity, etc.)
-+ for SMTC Linux kernel. Requires platform support, of which
-+ an example can be found in the MIPS kernel i8259 and Malta
-+ platform code. Adds some overhead to interrupt dispatch, and
-+ should be used only if you know what you are doing.
-+
-+config MIPS_VPE_LOADER_TOM
-+ bool "Load VPE program into memory hidden from linux"
-+ depends on MIPS_VPE_LOADER
-+ default y
-+ help
-+ The loader can use memory that is present but has been hidden from
-+ Linux using the kernel command line option "mem=xxMB". It's up to
-+ you to ensure the amount you put in the option and the space your
-+ program requires is less or equal to the amount physically present.
-+
-+# this should possibly be in drivers/char, but it is rather cpu related. Hmmm
-+config MIPS_VPE_APSP_API
-+ bool "Enable support for AP/SP API (RTLX)"
-+ depends on MIPS_VPE_LOADER
-+ help
-+
-+config MIPS_APSP_KSPD
-+ bool "Enable KSPD"
-+ depends on MIPS_VPE_APSP_API
-+ default y
-+ help
-+ KSPD is a kernel daemon that accepts syscall requests from the SP
-+ side, actions them and returns the results. It also handles the
-+ "exit" syscall notifying other kernel modules the SP program is
-+ exiting. You probably want to say yes here.
-+
-+config MIPS_CMP
-+ bool "MIPS CMP framework support"
-+ depends on SYS_SUPPORTS_MIPS_CMP
-+ select SYNC_R4K
-+ select SYS_SUPPORTS_SMP
-+ select SYS_SUPPORTS_SCHED_SMT if SMP
-+ select WEAK_ORDERING
-+ default n
-+ help
-+ This is a placeholder option for the GCMP work. It will need to
-+ be handled differently...
-+
-+config SB1_PASS_1_WORKAROUNDS
-+ bool
-+ depends on CPU_SB1_PASS_1
-+ default y
-+
-+config SB1_PASS_2_WORKAROUNDS
-+ bool
-+ depends on CPU_SB1 && (CPU_SB1_PASS_2_2 || CPU_SB1_PASS_2)
-+ default y
-+
-+config SB1_PASS_2_1_WORKAROUNDS
-+ bool
-+ depends on CPU_SB1 && CPU_SB1_PASS_2
-+ default y
-+
-+config 64BIT_PHYS_ADDR
-+ bool
-+
-+config ARCH_PHYS_ADDR_T_64BIT
-+ def_bool 64BIT_PHYS_ADDR
-+
-+config CPU_HAS_SMARTMIPS
-+ depends on SYS_SUPPORTS_SMARTMIPS
-+ bool "Support for the SmartMIPS ASE"
-+ help
-+ SmartMIPS is a extension of the MIPS32 architecture aimed at
-+ increased security at both hardware and software level for
-+ smartcards. Enabling this option will allow proper use of the
-+ SmartMIPS instructions by Linux applications. However a kernel with
-+ this option will not work on a MIPS core without SmartMIPS core. If
-+ you don't know you probably don't have SmartMIPS and should say N
-+ here.
-+
-+config CPU_HAS_WB
-+ bool
-+
-+#
-+# Vectored interrupt mode is an R2 feature
-+#
-+config CPU_MIPSR2_IRQ_VI
-+ bool
-+
-+#
-+# Extended interrupt mode is an R2 feature
-+#
-+config CPU_MIPSR2_IRQ_EI
-+ bool
-+
-+config CPU_HAS_SYNC
-+ bool
-+ depends on !CPU_R3000
-+ default y
-+
-+config GENERIC_CLOCKEVENTS_BROADCAST
-+ bool
-+
-+#
-+# CPU non-features
-+#
-+config CPU_DADDI_WORKAROUNDS
-+ bool
-+
-+config CPU_R4000_WORKAROUNDS
-+ bool
-+ select CPU_R4400_WORKAROUNDS
-+
-+config CPU_R4400_WORKAROUNDS
-+ bool
-+
-+#
-+# - Highmem only makes sense for the 32-bit kernel.
-+# - The current highmem code will only work properly on physically indexed
-+# caches such as R3000, SB1, R7000 or those that look like they're virtually
-+# indexed such as R4000/R4400 SC and MC versions or R10000. So for the
-+# moment we protect the user and offer the highmem option only on machines
-+# where it's known to be safe. This will not offer highmem on a few systems
-+# such as MIPS32 and MIPS64 CPUs which may have virtual and physically
-+# indexed CPUs but we're playing safe.
-+# - We use SYS_SUPPORTS_HIGHMEM to offer highmem only for systems where we
-+# know they might have memory configurations that could make use of highmem
-+# support.
-+#
-+config HIGHMEM
-+ bool "High Memory Support"
-+ depends on 32BIT && CPU_SUPPORTS_HIGHMEM && SYS_SUPPORTS_HIGHMEM
-+
-+config CPU_SUPPORTS_HIGHMEM
-+ bool
-+
-+config SYS_SUPPORTS_HIGHMEM
-+ bool
-+
-+config SYS_SUPPORTS_SMARTMIPS
-+ bool
-+
-+config ARCH_FLATMEM_ENABLE
-+ def_bool y
-+ depends on !NUMA && !CPU_LOONGSON2
-+
-+config ARCH_DISCONTIGMEM_ENABLE
-+ bool
-+ default y if SGI_IP27
-+ help
-+ Say Y to support efficient handling of discontiguous physical memory,
-+ for architectures which are either NUMA (Non-Uniform Memory Access)
-+ or have huge holes in the physical address space for other reasons.
-+ See <file:Documentation/vm/numa> for more.
-+
-+config ARCH_POPULATES_NODE_MAP
-+ def_bool y
-+
-+config ARCH_SPARSEMEM_ENABLE
-+ bool
-+ select SPARSEMEM_STATIC
-+
-+config NUMA
-+ bool "NUMA Support"
-+ depends on SYS_SUPPORTS_NUMA
-+ help
-+ Say Y to compile the kernel to support NUMA (Non-Uniform Memory
-+ Access). This option improves performance on systems with more
-+ than two nodes; on two node systems it is generally better to
-+ leave it disabled; on single node systems disable this option
-+ disabled.
-+
-+config SYS_SUPPORTS_NUMA
-+ bool
-+
-+config NODES_SHIFT
-+ int
-+ default "6"
-+ depends on NEED_MULTIPLE_NODES
-+
-+config HW_PERF_EVENTS
-+ bool "Enable hardware performance counter support for perf events"
-+ depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n && CPU_MIPS32
-+ default y
-+ help
-+ Enable hardware performance counter support for perf events. If
-+ disabled, perf events will use software events only.
-+
-+source "mm/Kconfig"
-+
-+config SMP
-+ bool "Multi-Processing support"
-+ depends on SYS_SUPPORTS_SMP
-+ select IRQ_PER_CPU
-+ select USE_GENERIC_SMP_HELPERS
-+ help
-+ This enables support for systems with more than one CPU. If you have
-+ a system with only one CPU, like most personal computers, say N. If
-+ you have a system with more than one CPU, say Y.
-+
-+ If you say N here, the kernel will run on single and multiprocessor
-+ machines, but will use only one CPU of a multiprocessor machine. If
-+ you say Y here, the kernel will run on many, but not all,
-+ singleprocessor machines. On a singleprocessor machine, the kernel
-+ will run faster if you say N here.
-+
-+ People using multiprocessor machines who say Y here should also say
-+ Y to "Enhanced Real Time Clock Support", below.
-+
-+ See also the SMP-HOWTO available at
-+ <http://www.tldp.org/docs.html#howto>.
-+
-+ If you don't know what to do here, say N.
-+
-+config SMP_UP
-+ bool
-+
-+config SYS_SUPPORTS_MIPS_CMP
-+ bool
-+
-+config SYS_SUPPORTS_SMP
-+ bool
-+
-+config NR_CPUS_DEFAULT_1
-+ bool
-+
-+config NR_CPUS_DEFAULT_2
-+ bool
-+
-+config NR_CPUS_DEFAULT_4
-+ bool
-+
-+config NR_CPUS_DEFAULT_8
-+ bool
-+
-+config NR_CPUS_DEFAULT_16
-+ bool
-+
-+config NR_CPUS_DEFAULT_32
-+ bool
-+
-+config NR_CPUS_DEFAULT_64
-+ bool
-+
-+config NR_CPUS
-+ int "Maximum number of CPUs (2-64)"
-+ range 1 64 if NR_CPUS_DEFAULT_1
-+ depends on SMP
-+ default "1" if NR_CPUS_DEFAULT_1
-+ default "2" if NR_CPUS_DEFAULT_2
-+ default "4" if NR_CPUS_DEFAULT_4
-+ default "8" if NR_CPUS_DEFAULT_8
-+ default "16" if NR_CPUS_DEFAULT_16
-+ default "32" if NR_CPUS_DEFAULT_32
-+ default "64" if NR_CPUS_DEFAULT_64
-+ help
-+ This allows you to specify the maximum number of CPUs which this
-+ kernel will support. The maximum supported value is 32 for 32-bit
-+ kernel and 64 for 64-bit kernels; the minimum value which makes
-+ sense is 1 for Qemu (useful only for kernel debugging purposes)
-+ and 2 for all others.
-+
-+ This is purely to save memory - each supported CPU adds
-+ approximately eight kilobytes to the kernel image. For best
-+ performance should round up your number of processors to the next
-+ power of two.
-+
-+source "kernel/time/Kconfig"
-+
-+#
-+# Timer Interrupt Frequency Configuration
-+#
-+
-+choice
-+ prompt "Timer frequency"
-+ default HZ_250
-+ help
-+ Allows the configuration of the timer frequency.
-+
-+ config HZ_48
-+ bool "48 HZ" if SYS_SUPPORTS_48HZ || SYS_SUPPORTS_ARBIT_HZ
-+
-+ config HZ_100
-+ bool "100 HZ" if SYS_SUPPORTS_100HZ || SYS_SUPPORTS_ARBIT_HZ
-+
-+ config HZ_128
-+ bool "128 HZ" if SYS_SUPPORTS_128HZ || SYS_SUPPORTS_ARBIT_HZ
-+
-+ config HZ_250
-+ bool "250 HZ" if SYS_SUPPORTS_250HZ || SYS_SUPPORTS_ARBIT_HZ
-+
-+ config HZ_256
-+ bool "256 HZ" if SYS_SUPPORTS_256HZ || SYS_SUPPORTS_ARBIT_HZ
-+
-+ config HZ_1000
-+ bool "1000 HZ" if SYS_SUPPORTS_1000HZ || SYS_SUPPORTS_ARBIT_HZ
-+
-+ config HZ_1024
-+ bool "1024 HZ" if SYS_SUPPORTS_1024HZ || SYS_SUPPORTS_ARBIT_HZ
-+
-+endchoice
-+
-+config SYS_SUPPORTS_48HZ
-+ bool
-+
-+config SYS_SUPPORTS_100HZ
-+ bool
-+
-+config SYS_SUPPORTS_128HZ
-+ bool
-+
-+config SYS_SUPPORTS_250HZ
-+ bool
-+
-+config SYS_SUPPORTS_256HZ
-+ bool
-+
-+config SYS_SUPPORTS_1000HZ
-+ bool
-+
-+config SYS_SUPPORTS_1024HZ
-+ bool
-+
-+config SYS_SUPPORTS_ARBIT_HZ
-+ bool
-+ default y if !SYS_SUPPORTS_48HZ && !SYS_SUPPORTS_100HZ && \
-+ !SYS_SUPPORTS_128HZ && !SYS_SUPPORTS_250HZ && \
-+ !SYS_SUPPORTS_256HZ && !SYS_SUPPORTS_1000HZ && \
-+ !SYS_SUPPORTS_1024HZ
-+
-+config HZ
-+ int
-+ default 48 if HZ_48
-+ default 100 if HZ_100
-+ default 128 if HZ_128
-+ default 250 if HZ_250
-+ default 256 if HZ_256
-+ default 1000 if HZ_1000
-+ default 1024 if HZ_1024
-+
-+source "kernel/Kconfig.preempt"
-+
-+config MIPS_INSANE_LARGE
-+ bool "Support for large 64-bit configurations"
-+ depends on CPU_R10000 && 64BIT
-+ help
-+ MIPS R10000 does support a 44 bit / 16TB address space as opposed to
-+ previous 64-bit processors which only supported 40 bit / 1TB. If you
-+ need processes of more than 1TB virtual address space, say Y here.
-+ This will result in additional memory usage, so it is not
-+ recommended for normal users.
-+
-+config KEXEC
-+ bool "Kexec system call (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ kexec is a system call that implements the ability to shutdown your
-+ current kernel, and to start another kernel. It is like a reboot
-+ but it is independent of the system firmware. And like a reboot
-+ you can start any kernel with it, not just Linux.
-+
-+ The name comes from the similarity to the exec system call.
-+
-+ It is an ongoing process to be certain the hardware in a machine
-+ is properly shutdown, so do not be surprised if this code does not
-+ initially work for you. It may help to enable device hotplugging
-+ support. As of this writing the exact hardware interface is
-+ strongly in flux, so no good recommendation can be made.
-+
-+config SECCOMP
-+ bool "Enable seccomp to safely compute untrusted bytecode"
-+ depends on PROC_FS
-+ default y
-+ help
-+ This kernel feature is useful for number crunching applications
-+ that may need to compute untrusted bytecode during their
-+ execution. By using pipes or other transports made available to
-+ the process as file descriptors supporting the read/write
-+ syscalls, it's possible to isolate those applications in
-+ their own address space using seccomp. Once seccomp is
-+ enabled via /proc/<pid>/seccomp, it cannot be disabled
-+ and the task is only allowed to execute a few safe syscalls
-+ defined by each seccomp mode.
-+
-+ If unsure, say Y. Only embedded should say N here.
-+
-+config USE_OF
-+ bool "Flattened Device Tree support"
-+ select OF
-+ select OF_EARLY_FLATTREE
-+ help
-+ Include support for flattened device tree machine descriptions.
-+
-+endmenu
-+
-+config LOCKDEP_SUPPORT
-+ bool
-+ default y
-+
-+config STACKTRACE_SUPPORT
-+ bool
-+ default y
-+
-+source "init/Kconfig"
-+
-+source "kernel/Kconfig.freezer"
-+
-+menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
-+
-+config HW_HAS_EISA
-+ bool
-+config HW_HAS_PCI
-+ bool
-+
-+config PCI
-+ bool "Support for PCI controller"
-+ depends on HW_HAS_PCI
-+ select PCI_DOMAINS
-+ help
-+ Find out whether you have a PCI motherboard. PCI is the name of a
-+ bus system, i.e. the way the CPU talks to the other stuff inside
-+ your box. Other bus systems are ISA, EISA, or VESA. If you have PCI,
-+ say Y, otherwise N.
-+
-+config PCI_DOMAINS
-+ bool
-+
-+source "drivers/pci/Kconfig"
-+
-+#
-+# ISA support is now enabled via select. Too many systems still have the one
-+# or other ISA chip on the board that users don't know about so don't expect
-+# users to choose the right thing ...
-+#
-+config ISA
-+ bool
-+
-+config EISA
-+ bool "EISA support"
-+ depends on HW_HAS_EISA
-+ select ISA
-+ select GENERIC_ISA_DMA
-+ ---help---
-+ The Extended Industry Standard Architecture (EISA) bus was
-+ developed as an open alternative to the IBM MicroChannel bus.
-+
-+ The EISA bus provided some of the features of the IBM MicroChannel
-+ bus while maintaining backward compatibility with cards made for
-+ the older ISA bus. The EISA bus saw limited use between 1988 and
-+ 1995 when it was made obsolete by the PCI bus.
-+
-+ Say Y here if you are building a kernel for an EISA-based machine.
-+
-+ Otherwise, say N.
-+
-+source "drivers/eisa/Kconfig"
-+
-+config TC
-+ bool "TURBOchannel support"
-+ depends on MACH_DECSTATION
-+ help
-+ TURBOchannel is a DEC (now Compaq (now HP)) bus for Alpha and MIPS
-+ processors. TURBOchannel programming specifications are available
-+ at:
-+ <ftp://ftp.hp.com/pub/alphaserver/archive/triadd/>
-+ and:
-+ <http://www.computer-refuge.org/classiccmp/ftp.digital.com/pub/DEC/TriAdd/>
-+ Linux driver support status is documented at:
-+ <http://www.linux-mips.org/wiki/DECstation>
-+
-+#config ACCESSBUS
-+# bool "Access.Bus support"
-+# depends on TC
-+
-+config MMU
-+ bool
-+ default y
-+
-+config I8253
-+ bool
-+ select MIPS_EXTERNAL_TIMER
-+
-+config ZONE_DMA32
-+ bool
-+
-+source "drivers/pcmcia/Kconfig"
-+
-+source "drivers/pci/hotplug/Kconfig"
-+
-+config RAPIDIO
-+ bool "RapidIO support"
-+ depends on PCI
-+ default n
-+ help
-+ If you say Y here, the kernel will include drivers and
-+ infrastructure code to support RapidIO interconnect devices.
-+
-+source "drivers/rapidio/Kconfig"
-+
-+endmenu
-+
-+menu "Executable file formats"
-+
-+source "fs/Kconfig.binfmt"
-+
-+config TRAD_SIGNALS
-+ bool
-+
-+config MIPS32_COMPAT
-+ bool "Kernel support for Linux/MIPS 32-bit binary compatibility"
-+ depends on 64BIT
-+ help
-+ Select this option if you want Linux/MIPS 32-bit binary
-+ compatibility. Since all software available for Linux/MIPS is
-+ currently 32-bit you should say Y here.
-+
-+config COMPAT
-+ bool
-+ depends on MIPS32_COMPAT
-+ default y
-+
-+config SYSVIPC_COMPAT
-+ bool
-+ depends on COMPAT && SYSVIPC
-+ default y
-+
-+config MIPS32_O32
-+ bool "Kernel support for o32 binaries"
-+ depends on MIPS32_COMPAT
-+ help
-+ Select this option if you want to run o32 binaries. These are pure
-+ 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of
-+ existing binaries are in this format.
-+
-+ If unsure, say Y.
-+
-+config MIPS32_N32
-+ bool "Kernel support for n32 binaries"
-+ depends on MIPS32_COMPAT
-+ help
-+ Select this option if you want to run n32 binaries. These are
-+ 64-bit binaries using 32-bit quantities for addressing and certain
-+ data that would normally be 64-bit. They are used in special
-+ cases.
-+
-+ If unsure, say N.
-+
-+config BINFMT_ELF32
-+ bool
-+ default y if MIPS32_O32 || MIPS32_N32
-+
-+endmenu
-+
-+menu "Power management options"
-+
-+config ARCH_HIBERNATION_POSSIBLE
-+ def_bool y
-+ depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP
-+
-+config ARCH_SUSPEND_POSSIBLE
-+ def_bool y
-+ depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP
-+
-+source "kernel/power/Kconfig"
-+
-+endmenu
-+
-+source "arch/mips/kernel/cpufreq/Kconfig"
-+
-+source "net/Kconfig"
-+
-+source "drivers/Kconfig"
-+
-+source "fs/Kconfig"
-+
-+source "arch/mips/Kconfig.debug"
-+
-+source "security/Kconfig"
-+
-+source "crypto/Kconfig"
-+
-+menuconfig VIRTUALIZATION
-+ bool "Virtualization"
-+ default n
-+ ---help---
-+ Say Y here to get to see options for using your Linux host to run other
-+ operating systems inside virtual machines (guests).
-+ This option alone does not add any kernel code.
-+
-+ If you say N, all options in this submenu will be skipped and disabled.
-+
-+if VIRTUALIZATION
-+
-+source drivers/virtio/Kconfig
-+
-+endif # VIRTUALIZATION
-+
-+source "lib/Kconfig"
diff -Nur linux-2.6.39.orig/arch/mips/kernel/traps.c linux-2.6.39/arch/mips/kernel/traps.c
--- linux-2.6.39.orig/arch/mips/kernel/traps.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/arch/mips/kernel/traps.c 2011-08-24 05:53:05.179230891 +0200
++++ linux-2.6.39/arch/mips/kernel/traps.c 2011-08-24 18:17:24.000000000 +0200
@@ -54,6 +54,7 @@
#include <asm/types.h>
#include <asm/stacktrace.h>
@@ -15121,34 +12670,9 @@ diff -Nur linux-2.6.39.orig/arch/mips/kernel/traps.c linux-2.6.39/arch/mips/kern
cp0_perfcount_irq = (read_c0_intctl() >> INTCTLB_IPPCI) & 7;
if (cp0_perfcount_irq == cp0_compare_irq)
cp0_perfcount_irq = -1;
-diff -Nur linux-2.6.39.orig/arch/mips/Makefile linux-2.6.39/arch/mips/Makefile
---- linux-2.6.39.orig/arch/mips/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/arch/mips/Makefile 2011-08-24 02:42:39.917989402 +0200
-@@ -158,6 +158,13 @@
- endif
- cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1
-
-+#
-+# Atheros AR71xx
-+#
-+core-$(CONFIG_ATHEROS_AR71XX) += arch/mips/ar71xx/
-+cflags-$(CONFIG_ATHEROS_AR71XX) += -I$(srctree)/arch/mips/include/asm/mach-ar71xx
-+load-$(CONFIG_ATHEROS_AR71XX) += 0xffffffff80060000
-+
- cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)
- cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(call cc-option,-mfix-r4400,)
- cflags-$(CONFIG_CPU_DADDI_WORKAROUNDS) += $(call cc-option,-mno-daddi,)
-@@ -174,6 +181,7 @@
- #
- libs-$(CONFIG_ARC) += arch/mips/fw/arc/
- libs-$(CONFIG_CFE) += arch/mips/fw/cfe/
-+libs-$(CONFIG_MYLOADER) += arch/mips/fw/myloader/
- libs-$(CONFIG_SNIPROM) += arch/mips/fw/sni/
- libs-y += arch/mips/fw/lib/
-
diff -Nur linux-2.6.39.orig/arch/mips/pci/Makefile linux-2.6.39/arch/mips/pci/Makefile
--- linux-2.6.39.orig/arch/mips/pci/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/arch/mips/pci/Makefile 2011-08-22 16:21:37.437981205 +0200
++++ linux-2.6.39/arch/mips/pci/Makefile 2011-08-24 18:17:24.000000000 +0200
@@ -18,6 +18,7 @@
obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o
obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o fixup-bcm63xx.o \
@@ -15159,7 +12683,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/pci/Makefile linux-2.6.39/arch/mips/pci/Ma
# These are still pretty much in the old state, watch, go blind.
diff -Nur linux-2.6.39.orig/arch/mips/pci/pci-ar71xx.c linux-2.6.39/arch/mips/pci/pci-ar71xx.c
--- linux-2.6.39.orig/arch/mips/pci/pci-ar71xx.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/pci/pci-ar71xx.c 2011-08-06 09:32:37.098016752 +0200
++++ linux-2.6.39/arch/mips/pci/pci-ar71xx.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,415 @@
+/*
+ * Atheros AR71xx PCI host controller driver
@@ -15578,7 +13102,7 @@ diff -Nur linux-2.6.39.orig/arch/mips/pci/pci-ar71xx.c linux-2.6.39/arch/mips/pc
+}
diff -Nur linux-2.6.39.orig/arch/mips/pci/pci-ar724x.c linux-2.6.39/arch/mips/pci/pci-ar724x.c
--- linux-2.6.39.orig/arch/mips/pci/pci-ar724x.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/arch/mips/pci/pci-ar724x.c 2011-08-06 09:32:37.088017079 +0200
++++ linux-2.6.39/arch/mips/pci/pci-ar724x.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,389 @@
+/*
+ * Atheros AR724x PCI host controller driver
@@ -15969,9 +13493,22 @@ diff -Nur linux-2.6.39.orig/arch/mips/pci/pci-ar724x.c linux-2.6.39/arch/mips/pc
+err:
+ return ret;
+}
+diff -Nur linux-2.6.39.orig/drivers/Makefile linux-2.6.39/drivers/Makefile
+--- linux-2.6.39.orig/drivers/Makefile 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/Makefile 2011-08-24 18:17:24.000000000 +0200
+@@ -46,8 +46,8 @@
+ obj-$(CONFIG_SCSI) += scsi/
+ obj-$(CONFIG_ATA) += ata/
+ obj-$(CONFIG_TARGET_CORE) += target/
+-obj-$(CONFIG_MTD) += mtd/
+ obj-$(CONFIG_SPI) += spi/
++obj-$(CONFIG_MTD) += mtd/
+ obj-y += net/
+ obj-$(CONFIG_ATM) += atm/
+ obj-$(CONFIG_FUSION) += message/
diff -Nur linux-2.6.39.orig/drivers/gpio/nxp_74hc153.c linux-2.6.39/drivers/gpio/nxp_74hc153.c
--- linux-2.6.39.orig/drivers/gpio/nxp_74hc153.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/gpio/nxp_74hc153.c 2011-04-27 12:19:22.327664626 +0200
++++ linux-2.6.39/drivers/gpio/nxp_74hc153.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,247 @@
+/*
+ * NXP 74HC153 - Dual 4-input multiplexer GPIO driver
@@ -16222,7 +13759,7 @@ diff -Nur linux-2.6.39.orig/drivers/gpio/nxp_74hc153.c linux-2.6.39/drivers/gpio
+MODULE_ALIAS("platform:" NXP_74HC153_DRIVER_NAME);
diff -Nur linux-2.6.39.orig/drivers/leds/leds-rb750.c linux-2.6.39/drivers/leds/leds-rb750.c
--- linux-2.6.39.orig/drivers/leds/leds-rb750.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/leds/leds-rb750.c 2011-04-27 12:19:22.267661616 +0200
++++ linux-2.6.39/drivers/leds/leds-rb750.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,141 @@
+/*
+ * LED driver for the RouterBOARD 750
@@ -16367,7 +13904,7 @@ diff -Nur linux-2.6.39.orig/drivers/leds/leds-rb750.c linux-2.6.39/drivers/leds/
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/leds/leds-wndr3700-usb.c linux-2.6.39/drivers/leds/leds-wndr3700-usb.c
--- linux-2.6.39.orig/drivers/leds/leds-wndr3700-usb.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/leds/leds-wndr3700-usb.c 2011-04-27 12:19:22.267661616 +0200
++++ linux-2.6.39/drivers/leds/leds-wndr3700-usb.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,75 @@
+/*
+ * USB LED driver for the NETGEAR WNDR3700
@@ -16444,22 +13981,9 @@ diff -Nur linux-2.6.39.orig/drivers/leds/leds-wndr3700-usb.c linux-2.6.39/driver
+MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRIVER_NAME);
-diff -Nur linux-2.6.39.orig/drivers/Makefile linux-2.6.39/drivers/Makefile
---- linux-2.6.39.orig/drivers/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/Makefile 2011-08-23 15:10:42.370478643 +0200
-@@ -46,8 +46,8 @@
- obj-$(CONFIG_SCSI) += scsi/
- obj-$(CONFIG_ATA) += ata/
- obj-$(CONFIG_TARGET_CORE) += target/
--obj-$(CONFIG_MTD) += mtd/
- obj-$(CONFIG_SPI) += spi/
-+obj-$(CONFIG_MTD) += mtd/
- obj-y += net/
- obj-$(CONFIG_ATM) += atm/
- obj-$(CONFIG_FUSION) += message/
diff -Nur linux-2.6.39.orig/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.39/drivers/mtd/chips/cfi_cmdset_0002.c
--- linux-2.6.39.orig/drivers/mtd/chips/cfi_cmdset_0002.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/mtd/chips/cfi_cmdset_0002.c 2011-08-22 16:22:28.477979654 +0200
++++ linux-2.6.39/drivers/mtd/chips/cfi_cmdset_0002.c 2011-08-24 18:17:24.000000000 +0200
@@ -39,7 +39,7 @@
#include <linux/mtd/xip.h>
@@ -16519,9 +14043,37 @@ diff -Nur linux-2.6.39.orig/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.39/dri
/*
+diff -Nur linux-2.6.39.orig/drivers/mtd/maps/Kconfig linux-2.6.39/drivers/mtd/maps/Kconfig
+--- linux-2.6.39.orig/drivers/mtd/maps/Kconfig 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/mtd/maps/Kconfig 2011-08-24 18:17:24.000000000 +0200
+@@ -260,6 +260,13 @@
+ Support for parsing CFE image tag and creating MTD partitions on
+ Broadcom BCM63xx boards.
+
++config MTD_AR91XX_FLASH
++ tristate "Atheros AR91xx parallel flash support"
++ depends on ATHEROS_AR71XX
++ select MTD_COMPLEX_MAPPINGS
++ help
++ Parallel flash driver for the Atheros AR91xx based boards.
++
+ config MTD_DILNETPC
+ tristate "CFI Flash device mapped on DIL/Net PC"
+ depends on X86 && MTD_PARTITIONS && MTD_CFI_INTELEXT && BROKEN
+diff -Nur linux-2.6.39.orig/drivers/mtd/maps/Makefile linux-2.6.39/drivers/mtd/maps/Makefile
+--- linux-2.6.39.orig/drivers/mtd/maps/Makefile 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/mtd/maps/Makefile 2011-08-24 18:17:24.000000000 +0200
+@@ -40,6 +40,7 @@
+ obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o
+ obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
+ obj-$(CONFIG_MTD_PCI) += pci.o
++obj-$(CONFIG_MTD_AR91XX_FLASH) += ar91xx_flash.o
+ obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o
+ obj-$(CONFIG_MTD_EDB7312) += edb7312.o
+ obj-$(CONFIG_MTD_IMPA7) += impa7.o
diff -Nur linux-2.6.39.orig/drivers/mtd/maps/ar91xx_flash.c linux-2.6.39/drivers/mtd/maps/ar91xx_flash.c
--- linux-2.6.39.orig/drivers/mtd/maps/ar91xx_flash.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/mtd/maps/ar91xx_flash.c 2011-04-27 12:19:22.177661504 +0200
++++ linux-2.6.39/drivers/mtd/maps/ar91xx_flash.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,310 @@
+/*
+ * Parallel flash driver for the Atheros AR91xx SoC
@@ -16833,37 +14385,9 @@ diff -Nur linux-2.6.39.orig/drivers/mtd/maps/ar91xx_flash.c linux-2.6.39/drivers
+MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
+MODULE_DESCRIPTION("Parallel flash driver for the Atheros AR91xx SoC");
+MODULE_ALIAS("platform:" DRV_NAME);
-diff -Nur linux-2.6.39.orig/drivers/mtd/maps/Kconfig linux-2.6.39/drivers/mtd/maps/Kconfig
---- linux-2.6.39.orig/drivers/mtd/maps/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/mtd/maps/Kconfig 2011-08-22 16:22:06.367979538 +0200
-@@ -260,6 +260,13 @@
- Support for parsing CFE image tag and creating MTD partitions on
- Broadcom BCM63xx boards.
-
-+config MTD_AR91XX_FLASH
-+ tristate "Atheros AR91xx parallel flash support"
-+ depends on ATHEROS_AR71XX
-+ select MTD_COMPLEX_MAPPINGS
-+ help
-+ Parallel flash driver for the Atheros AR91xx based boards.
-+
- config MTD_DILNETPC
- tristate "CFI Flash device mapped on DIL/Net PC"
- depends on X86 && MTD_PARTITIONS && MTD_CFI_INTELEXT && BROKEN
-diff -Nur linux-2.6.39.orig/drivers/mtd/maps/Makefile linux-2.6.39/drivers/mtd/maps/Makefile
---- linux-2.6.39.orig/drivers/mtd/maps/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/mtd/maps/Makefile 2011-08-22 16:22:06.387979567 +0200
-@@ -40,6 +40,7 @@
- obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o
- obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
- obj-$(CONFIG_MTD_PCI) += pci.o
-+obj-$(CONFIG_MTD_AR91XX_FLASH) += ar91xx_flash.o
- obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o
- obj-$(CONFIG_MTD_EDB7312) += edb7312.o
- obj-$(CONFIG_MTD_IMPA7) += impa7.o
diff -Nur linux-2.6.39.orig/drivers/mtd/nand/Kconfig linux-2.6.39/drivers/mtd/nand/Kconfig
--- linux-2.6.39.orig/drivers/mtd/nand/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/mtd/nand/Kconfig 2011-08-23 14:22:33.407989933 +0200
++++ linux-2.6.39/drivers/mtd/nand/Kconfig 2011-08-24 18:17:24.000000000 +0200
@@ -531,4 +531,9 @@
Enables support for NAND Flash chips on the ST Microelectronics
Flexible Static Memory Controller (FSMC)
@@ -16876,7 +14400,7 @@ diff -Nur linux-2.6.39.orig/drivers/mtd/nand/Kconfig linux-2.6.39/drivers/mtd/na
endif # MTD_NAND
diff -Nur linux-2.6.39.orig/drivers/mtd/nand/Makefile linux-2.6.39/drivers/mtd/nand/Makefile
--- linux-2.6.39.orig/drivers/mtd/nand/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/mtd/nand/Makefile 2011-08-22 16:22:41.217981942 +0200
++++ linux-2.6.39/drivers/mtd/nand/Makefile 2011-08-24 18:17:24.000000000 +0200
@@ -34,6 +34,7 @@
obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o
obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
@@ -16887,7 +14411,7 @@ diff -Nur linux-2.6.39.orig/drivers/mtd/nand/Makefile linux-2.6.39/drivers/mtd/n
obj-$(CONFIG_MTD_NAND_ORION) += orion_nand.o
diff -Nur linux-2.6.39.orig/drivers/mtd/nand/rb4xx_nand.c linux-2.6.39/drivers/mtd/nand/rb4xx_nand.c
--- linux-2.6.39.orig/drivers/mtd/nand/rb4xx_nand.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/mtd/nand/rb4xx_nand.c 2011-08-23 11:36:58.637983055 +0200
++++ linux-2.6.39/drivers/mtd/nand/rb4xx_nand.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,311 @@
+/*
+ * NAND flash driver for the MikroTik RouterBoard 4xx series
@@ -17202,7 +14726,7 @@ diff -Nur linux-2.6.39.orig/drivers/mtd/nand/rb4xx_nand.c linux-2.6.39/drivers/m
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/mtd/nand/rb750_nand.c linux-2.6.39/drivers/mtd/nand/rb750_nand.c
--- linux-2.6.39.orig/drivers/mtd/nand/rb750_nand.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/mtd/nand/rb750_nand.c 2011-04-27 12:19:22.177661504 +0200
++++ linux-2.6.39/drivers/mtd/nand/rb750_nand.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,361 @@
+/*
+ * NAND flash driver for the MikroTik RouterBOARD 750
@@ -17567,7 +15091,7 @@ diff -Nur linux-2.6.39.orig/drivers/mtd/nand/rb750_nand.c linux-2.6.39/drivers/m
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/mtd/wrt160nl_part.c linux-2.6.39/drivers/mtd/wrt160nl_part.c
--- linux-2.6.39.orig/drivers/mtd/wrt160nl_part.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/mtd/wrt160nl_part.c 2011-08-06 09:32:37.138017083 +0200
++++ linux-2.6.39/drivers/mtd/wrt160nl_part.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,190 @@
+/*
+ * Copyright (C) 2009 Christian Daniel <cd@maintech.de>
@@ -17759,9 +15283,610 @@ diff -Nur linux-2.6.39.orig/drivers/mtd/wrt160nl_part.c linux-2.6.39/drivers/mtd
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Christian Daniel <cd@maintech.de>");
+diff -Nur linux-2.6.39.orig/drivers/net/Kconfig linux-2.6.39/drivers/net/Kconfig
+--- linux-2.6.39.orig/drivers/net/Kconfig 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/net/Kconfig 2011-08-24 18:17:24.000000000 +0200
+@@ -2071,6 +2071,8 @@
+
+ The safe and default value for this is N.
+
++source drivers/net/ag71xx/Kconfig
++
+ config DL2K
+ tristate "DL2000/TC902x-based Gigabit Ethernet support"
+ depends on PCI
+diff -Nur linux-2.6.39.orig/drivers/net/Makefile linux-2.6.39/drivers/net/Makefile
+--- linux-2.6.39.orig/drivers/net/Makefile 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/net/Makefile 2011-08-24 18:17:24.000000000 +0200
+@@ -112,6 +112,7 @@
+ # end link order section
+ #
+
++obj-$(CONFIG_AG71XX) += ag71xx/
+ obj-$(CONFIG_SUNDANCE) += sundance.o
+ obj-$(CONFIG_HAMACHI) += hamachi.o
+ obj-$(CONFIG_NET) += Space.o loopback.o
+diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/Kconfig linux-2.6.39/drivers/net/ag71xx/Kconfig
+--- linux-2.6.39.orig/drivers/net/ag71xx/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/drivers/net/ag71xx/Kconfig 2011-08-24 18:17:24.000000000 +0200
+@@ -0,0 +1,33 @@
++config AG71XX
++ tristate "Atheros AR71xx built-in ethernet mac support"
++ depends on ATHEROS_AR71XX
++ select PHYLIB
++ help
++ If you wish to compile a kernel for AR71xx/91xx and enable
++ ethernet support, then you should always answer Y to this.
++
++if AG71XX
++
++config AG71XX_DEBUG
++ bool "Atheros AR71xx built-in ethernet driver debugging"
++ default n
++ help
++ Atheros AR71xx built-in ethernet driver debugging messages.
++
++config AG71XX_DEBUG_FS
++ bool "Atheros AR71xx built-in ethernet driver debugfs support"
++ depends on DEBUG_FS
++ default n
++ help
++ Say Y, if you need access to various statistics provided by
++ the ag71xx driver.
++
++config AG71XX_AR8216_SUPPORT
++ bool "special support for the Atheros AR8216 switch"
++ default n
++ default y if AR71XX_MACH_WNR2000 || AR71XX_MACH_MZK_W04NU
++ help
++ Say 'y' here if you want to enable special support for the
++ Atheros AR8216 switch found on some boards.
++
++endif
+diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/Makefile linux-2.6.39/drivers/net/ag71xx/Makefile
+--- linux-2.6.39.orig/drivers/net/ag71xx/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/drivers/net/ag71xx/Makefile 2011-08-24 18:17:24.000000000 +0200
+@@ -0,0 +1,15 @@
++#
++# Makefile for the Atheros AR71xx built-in ethernet macs
++#
++
++ag71xx-y += ag71xx_main.o
++ag71xx-y += ag71xx_ethtool.o
++ag71xx-y += ag71xx_phy.o
++ag71xx-y += ag71xx_mdio.o
++ag71xx-y += ag71xx_ar7240.o
++
++ag71xx-$(CONFIG_AG71XX_DEBUG_FS) += ag71xx_debugfs.o
++ag71xx-$(CONFIG_AG71XX_AR8216_SUPPORT) += ag71xx_ar8216.o
++
++obj-$(CONFIG_AG71XX) += ag71xx.o
++
+diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx.h linux-2.6.39/drivers/net/ag71xx/ag71xx.h
+--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx.h 2011-08-24 18:17:24.000000000 +0200
+@@ -0,0 +1,518 @@
++/*
++ * Atheros AR71xx built-in ethernet mac driver
++ *
++ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
++ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
++ *
++ * Based on Atheros' AG7100 driver
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation.
++ */
++
++#ifndef __AG71XX_H
++#define __AG71XX_H
++
++#include <linux/kernel.h>
++#include <linux/version.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/types.h>
++#include <linux/random.h>
++#include <linux/spinlock.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/ethtool.h>
++#include <linux/etherdevice.h>
++#include <linux/if_vlan.h>
++#include <linux/phy.h>
++#include <linux/skbuff.h>
++#include <linux/dma-mapping.h>
++#include <linux/workqueue.h>
++
++#include <linux/bitops.h>
++
++#include <asm/mach-ar71xx/ar71xx.h>
++#include <asm/mach-ar71xx/platform.h>
++
++#define AG71XX_DRV_NAME "ag71xx"
++#define AG71XX_DRV_VERSION "0.5.35"
++
++#define AG71XX_NAPI_WEIGHT 64
++#define AG71XX_OOM_REFILL (1 + HZ/10)
++
++#define AG71XX_INT_ERR (AG71XX_INT_RX_BE | AG71XX_INT_TX_BE)
++#define AG71XX_INT_TX (AG71XX_INT_TX_PS)
++#define AG71XX_INT_RX (AG71XX_INT_RX_PR | AG71XX_INT_RX_OF)
++
++#define AG71XX_INT_POLL (AG71XX_INT_RX | AG71XX_INT_TX)
++#define AG71XX_INT_INIT (AG71XX_INT_ERR | AG71XX_INT_POLL)
++
++#define AG71XX_TX_MTU_LEN 1540
++#define AG71XX_RX_PKT_RESERVE 64
++#define AG71XX_RX_PKT_SIZE \
++ (AG71XX_RX_PKT_RESERVE + ETH_FRAME_LEN + ETH_FCS_LEN + VLAN_HLEN)
++
++#define AG71XX_TX_RING_SIZE_DEFAULT 64
++#define AG71XX_RX_RING_SIZE_DEFAULT 128
++
++#define AG71XX_TX_RING_SIZE_MAX 256
++#define AG71XX_RX_RING_SIZE_MAX 256
++
++#ifdef CONFIG_AG71XX_DEBUG
++#define DBG(fmt, args...) printk(KERN_DEBUG fmt, ## args)
++#else
++#define DBG(fmt, args...) do {} while (0)
++#endif
++
++#define ag71xx_assert(_cond) \
++do { \
++ if (_cond) \
++ break; \
++ printk("%s,%d: assertion failed\n", __FILE__, __LINE__); \
++ BUG(); \
++} while (0)
++
++struct ag71xx_desc {
++ u32 data;
++ u32 ctrl;
++#define DESC_EMPTY BIT(31)
++#define DESC_MORE BIT(24)
++#define DESC_PKTLEN_M 0xfff
++ u32 next;
++ u32 pad;
++} __attribute__((aligned(4)));
++
++struct ag71xx_buf {
++ struct sk_buff *skb;
++ struct ag71xx_desc *desc;
++ dma_addr_t dma_addr;
++ unsigned long timestamp;
++};
++
++struct ag71xx_ring {
++ struct ag71xx_buf *buf;
++ u8 *descs_cpu;
++ dma_addr_t descs_dma;
++ unsigned int desc_size;
++ unsigned int curr;
++ unsigned int dirty;
++ unsigned int size;
++};
++
++struct ag71xx_mdio {
++ struct mii_bus *mii_bus;
++ int mii_irq[PHY_MAX_ADDR];
++ void __iomem *mdio_base;
++ struct ag71xx_mdio_platform_data *pdata;
++};
++
++struct ag71xx_int_stats {
++ unsigned long rx_pr;
++ unsigned long rx_be;
++ unsigned long rx_of;
++ unsigned long tx_ps;
++ unsigned long tx_be;
++ unsigned long tx_ur;
++ unsigned long total;
++};
++
++struct ag71xx_napi_stats {
++ unsigned long napi_calls;
++ unsigned long rx_count;
++ unsigned long rx_packets;
++ unsigned long rx_packets_max;
++ unsigned long tx_count;
++ unsigned long tx_packets;
++ unsigned long tx_packets_max;
++
++ unsigned long rx[AG71XX_NAPI_WEIGHT + 1];
++ unsigned long tx[AG71XX_NAPI_WEIGHT + 1];
++};
++
++struct ag71xx_debug {
++ struct dentry *debugfs_dir;
++
++ struct ag71xx_int_stats int_stats;
++ struct ag71xx_napi_stats napi_stats;
++};
++
++struct ag71xx {
++ void __iomem *mac_base;
++ void __iomem *mii_ctrl;
++
++ spinlock_t lock;
++ struct platform_device *pdev;
++ struct net_device *dev;
++ struct napi_struct napi;
++ u32 msg_enable;
++
++ struct ag71xx_desc *stop_desc;
++ dma_addr_t stop_desc_dma;
++
++ struct ag71xx_ring rx_ring;
++ struct ag71xx_ring tx_ring;
++
++ struct mii_bus *mii_bus;
++ struct phy_device *phy_dev;
++ void *phy_priv;
++
++ unsigned int link;
++ unsigned int speed;
++ int duplex;
++
++ struct work_struct restart_work;
++ struct delayed_work link_work;
++ struct timer_list oom_timer;
++
++#ifdef CONFIG_AG71XX_DEBUG_FS
++ struct ag71xx_debug debug;
++#endif
++};
++
++extern struct ethtool_ops ag71xx_ethtool_ops;
++void ag71xx_link_adjust(struct ag71xx *ag);
++
++int ag71xx_mdio_driver_init(void) __init;
++void ag71xx_mdio_driver_exit(void);
++
++int ag71xx_phy_connect(struct ag71xx *ag);
++void ag71xx_phy_disconnect(struct ag71xx *ag);
++void ag71xx_phy_start(struct ag71xx *ag);
++void ag71xx_phy_stop(struct ag71xx *ag);
++
++static inline struct ag71xx_platform_data *ag71xx_get_pdata(struct ag71xx *ag)
++{
++ return ag->pdev->dev.platform_data;
++}
++
++static inline int ag71xx_desc_empty(struct ag71xx_desc *desc)
++{
++ return (desc->ctrl & DESC_EMPTY) != 0;
++}
++
++static inline int ag71xx_desc_pktlen(struct ag71xx_desc *desc)
++{
++ return desc->ctrl & DESC_PKTLEN_M;
++}
++
++/* Register offsets */
++#define AG71XX_REG_MAC_CFG1 0x0000
++#define AG71XX_REG_MAC_CFG2 0x0004
++#define AG71XX_REG_MAC_IPG 0x0008
++#define AG71XX_REG_MAC_HDX 0x000c
++#define AG71XX_REG_MAC_MFL 0x0010
++#define AG71XX_REG_MII_CFG 0x0020
++#define AG71XX_REG_MII_CMD 0x0024
++#define AG71XX_REG_MII_ADDR 0x0028
++#define AG71XX_REG_MII_CTRL 0x002c
++#define AG71XX_REG_MII_STATUS 0x0030
++#define AG71XX_REG_MII_IND 0x0034
++#define AG71XX_REG_MAC_IFCTL 0x0038
++#define AG71XX_REG_MAC_ADDR1 0x0040
++#define AG71XX_REG_MAC_ADDR2 0x0044
++#define AG71XX_REG_FIFO_CFG0 0x0048
++#define AG71XX_REG_FIFO_CFG1 0x004c
++#define AG71XX_REG_FIFO_CFG2 0x0050
++#define AG71XX_REG_FIFO_CFG3 0x0054
++#define AG71XX_REG_FIFO_CFG4 0x0058
++#define AG71XX_REG_FIFO_CFG5 0x005c
++#define AG71XX_REG_FIFO_RAM0 0x0060
++#define AG71XX_REG_FIFO_RAM1 0x0064
++#define AG71XX_REG_FIFO_RAM2 0x0068
++#define AG71XX_REG_FIFO_RAM3 0x006c
++#define AG71XX_REG_FIFO_RAM4 0x0070
++#define AG71XX_REG_FIFO_RAM5 0x0074
++#define AG71XX_REG_FIFO_RAM6 0x0078
++#define AG71XX_REG_FIFO_RAM7 0x007c
++
++#define AG71XX_REG_TX_CTRL 0x0180
++#define AG71XX_REG_TX_DESC 0x0184
++#define AG71XX_REG_TX_STATUS 0x0188
++#define AG71XX_REG_RX_CTRL 0x018c
++#define AG71XX_REG_RX_DESC 0x0190
++#define AG71XX_REG_RX_STATUS 0x0194
++#define AG71XX_REG_INT_ENABLE 0x0198
++#define AG71XX_REG_INT_STATUS 0x019c
++
++#define AG71XX_REG_FIFO_DEPTH 0x01a8
++#define AG71XX_REG_RX_SM 0x01b0
++#define AG71XX_REG_TX_SM 0x01b4
++
++#define MAC_CFG1_TXE BIT(0) /* Tx Enable */
++#define MAC_CFG1_STX BIT(1) /* Synchronize Tx Enable */
++#define MAC_CFG1_RXE BIT(2) /* Rx Enable */
++#define MAC_CFG1_SRX BIT(3) /* Synchronize Rx Enable */
++#define MAC_CFG1_TFC BIT(4) /* Tx Flow Control Enable */
++#define MAC_CFG1_RFC BIT(5) /* Rx Flow Control Enable */
++#define MAC_CFG1_LB BIT(8) /* Loopback mode */
++#define MAC_CFG1_SR BIT(31) /* Soft Reset */
++
++#define MAC_CFG2_FDX BIT(0)
++#define MAC_CFG2_CRC_EN BIT(1)
++#define MAC_CFG2_PAD_CRC_EN BIT(2)
++#define MAC_CFG2_LEN_CHECK BIT(4)
++#define MAC_CFG2_HUGE_FRAME_EN BIT(5)
++#define MAC_CFG2_IF_1000 BIT(9)
++#define MAC_CFG2_IF_10_100 BIT(8)
++
++#define FIFO_CFG0_WTM BIT(0) /* Watermark Module */
++#define FIFO_CFG0_RXS BIT(1) /* Rx System Module */
++#define FIFO_CFG0_RXF BIT(2) /* Rx Fabric Module */
++#define FIFO_CFG0_TXS BIT(3) /* Tx System Module */
++#define FIFO_CFG0_TXF BIT(4) /* Tx Fabric Module */
++#define FIFO_CFG0_ALL (FIFO_CFG0_WTM | FIFO_CFG0_RXS | FIFO_CFG0_RXF \
++ | FIFO_CFG0_TXS | FIFO_CFG0_TXF)
++
++#define FIFO_CFG0_ENABLE_SHIFT 8
++
++#define FIFO_CFG4_DE BIT(0) /* Drop Event */
++#define FIFO_CFG4_DV BIT(1) /* RX_DV Event */
++#define FIFO_CFG4_FC BIT(2) /* False Carrier */
++#define FIFO_CFG4_CE BIT(3) /* Code Error */
++#define FIFO_CFG4_CR BIT(4) /* CRC error */
++#define FIFO_CFG4_LM BIT(5) /* Length Mismatch */
++#define FIFO_CFG4_LO BIT(6) /* Length out of range */
++#define FIFO_CFG4_OK BIT(7) /* Packet is OK */
++#define FIFO_CFG4_MC BIT(8) /* Multicast Packet */
++#define FIFO_CFG4_BC BIT(9) /* Broadcast Packet */
++#define FIFO_CFG4_DR BIT(10) /* Dribble */
++#define FIFO_CFG4_LE BIT(11) /* Long Event */
++#define FIFO_CFG4_CF BIT(12) /* Control Frame */
++#define FIFO_CFG4_PF BIT(13) /* Pause Frame */
++#define FIFO_CFG4_UO BIT(14) /* Unsupported Opcode */
++#define FIFO_CFG4_VT BIT(15) /* VLAN tag detected */
++#define FIFO_CFG4_FT BIT(16) /* Frame Truncated */
++#define FIFO_CFG4_UC BIT(17) /* Unicast Packet */
++
++#define FIFO_CFG5_DE BIT(0) /* Drop Event */
++#define FIFO_CFG5_DV BIT(1) /* RX_DV Event */
++#define FIFO_CFG5_FC BIT(2) /* False Carrier */
++#define FIFO_CFG5_CE BIT(3) /* Code Error */
++#define FIFO_CFG5_LM BIT(4) /* Length Mismatch */
++#define FIFO_CFG5_LO BIT(5) /* Length Out of Range */
++#define FIFO_CFG5_OK BIT(6) /* Packet is OK */
++#define FIFO_CFG5_MC BIT(7) /* Multicast Packet */
++#define FIFO_CFG5_BC BIT(8) /* Broadcast Packet */
++#define FIFO_CFG5_DR BIT(9) /* Dribble */
++#define FIFO_CFG5_CF BIT(10) /* Control Frame */
++#define FIFO_CFG5_PF BIT(11) /* Pause Frame */
++#define FIFO_CFG5_UO BIT(12) /* Unsupported Opcode */
++#define FIFO_CFG5_VT BIT(13) /* VLAN tag detected */
++#define FIFO_CFG5_LE BIT(14) /* Long Event */
++#define FIFO_CFG5_FT BIT(15) /* Frame Truncated */
++#define FIFO_CFG5_16 BIT(16) /* unknown */
++#define FIFO_CFG5_17 BIT(17) /* unknown */
++#define FIFO_CFG5_SF BIT(18) /* Short Frame */
++#define FIFO_CFG5_BM BIT(19) /* Byte Mode */
++
++#define AG71XX_INT_TX_PS BIT(0)
++#define AG71XX_INT_TX_UR BIT(1)
++#define AG71XX_INT_TX_BE BIT(3)
++#define AG71XX_INT_RX_PR BIT(4)
++#define AG71XX_INT_RX_OF BIT(6)
++#define AG71XX_INT_RX_BE BIT(7)
++
++#define MAC_IFCTL_SPEED BIT(16)
++
++#define MII_CFG_CLK_DIV_4 0
++#define MII_CFG_CLK_DIV_6 2
++#define MII_CFG_CLK_DIV_8 3
++#define MII_CFG_CLK_DIV_10 4
++#define MII_CFG_CLK_DIV_14 5
++#define MII_CFG_CLK_DIV_20 6
++#define MII_CFG_CLK_DIV_28 7
++#define MII_CFG_RESET BIT(31)
++
++#define MII_CMD_WRITE 0x0
++#define MII_CMD_READ 0x1
++#define MII_ADDR_SHIFT 8
++#define MII_IND_BUSY BIT(0)
++#define MII_IND_INVALID BIT(2)
++
++#define TX_CTRL_TXE BIT(0) /* Tx Enable */
++
++#define TX_STATUS_PS BIT(0) /* Packet Sent */
++#define TX_STATUS_UR BIT(1) /* Tx Underrun */
++#define TX_STATUS_BE BIT(3) /* Bus Error */
++
++#define RX_CTRL_RXE BIT(0) /* Rx Enable */
++
++#define RX_STATUS_PR BIT(0) /* Packet Received */
++#define RX_STATUS_OF BIT(2) /* Rx Overflow */
++#define RX_STATUS_BE BIT(3) /* Bus Error */
++
++#define MII_CTRL_IF_MASK 3
++#define MII_CTRL_SPEED_SHIFT 4
++#define MII_CTRL_SPEED_MASK 3
++#define MII_CTRL_SPEED_10 0
++#define MII_CTRL_SPEED_100 1
++#define MII_CTRL_SPEED_1000 2
++
++static inline void ag71xx_check_reg_offset(struct ag71xx *ag, unsigned reg)
++{
++ switch (reg) {
++ case AG71XX_REG_MAC_CFG1 ... AG71XX_REG_MAC_MFL:
++ case AG71XX_REG_MAC_IFCTL ... AG71XX_REG_INT_STATUS:
++ case AG71XX_REG_MII_CFG:
++ break;
++
++ default:
++ BUG();
++ }
++}
++
++static inline void ag71xx_wr(struct ag71xx *ag, unsigned reg, u32 value)
++{
++ ag71xx_check_reg_offset(ag, reg);
++
++ __raw_writel(value, ag->mac_base + reg);
++ /* flush write */
++ (void) __raw_readl(ag->mac_base + reg);
++}
++
++static inline u32 ag71xx_rr(struct ag71xx *ag, unsigned reg)
++{
++ ag71xx_check_reg_offset(ag, reg);
++
++ return __raw_readl(ag->mac_base + reg);
++}
++
++static inline void ag71xx_sb(struct ag71xx *ag, unsigned reg, u32 mask)
++{
++ void __iomem *r;
++
++ ag71xx_check_reg_offset(ag, reg);
++
++ r = ag->mac_base + reg;
++ __raw_writel(__raw_readl(r) | mask, r);
++ /* flush write */
++ (void)__raw_readl(r);
++}
++
++static inline void ag71xx_cb(struct ag71xx *ag, unsigned reg, u32 mask)
++{
++ void __iomem *r;
++
++ ag71xx_check_reg_offset(ag, reg);
++
++ r = ag->mac_base + reg;
++ __raw_writel(__raw_readl(r) & ~mask, r);
++ /* flush write */
++ (void) __raw_readl(r);
++}
++
++static inline void ag71xx_int_enable(struct ag71xx *ag, u32 ints)
++{
++ ag71xx_sb(ag, AG71XX_REG_INT_ENABLE, ints);
++}
++
++static inline void ag71xx_int_disable(struct ag71xx *ag, u32 ints)
++{
++ ag71xx_cb(ag, AG71XX_REG_INT_ENABLE, ints);
++}
++
++static inline void ag71xx_mii_ctrl_wr(struct ag71xx *ag, u32 value)
++{
++ struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
++
++ if (pdata->is_ar724x)
++ return;
++
++ __raw_writel(value, ag->mii_ctrl);
++
++ /* flush write */
++ __raw_readl(ag->mii_ctrl);
++}
++
++static inline u32 ag71xx_mii_ctrl_rr(struct ag71xx *ag)
++{
++ struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
++
++ if (pdata->is_ar724x)
++ return 0xffffffff;
++
++ return __raw_readl(ag->mii_ctrl);
++}
++
++static inline void ag71xx_mii_ctrl_set_if(struct ag71xx *ag,
++ unsigned int mii_if)
++{
++ u32 t;
++
++ t = ag71xx_mii_ctrl_rr(ag);
++ t &= ~(MII_CTRL_IF_MASK);
++ t |= (mii_if & MII_CTRL_IF_MASK);
++ ag71xx_mii_ctrl_wr(ag, t);
++}
++
++static inline void ag71xx_mii_ctrl_set_speed(struct ag71xx *ag,
++ unsigned int speed)
++{
++ u32 t;
++
++ t = ag71xx_mii_ctrl_rr(ag);
++ t &= ~(MII_CTRL_SPEED_MASK << MII_CTRL_SPEED_SHIFT);
++ t |= (speed & MII_CTRL_SPEED_MASK) << MII_CTRL_SPEED_SHIFT;
++ ag71xx_mii_ctrl_wr(ag, t);
++}
++
++#ifdef CONFIG_AG71XX_AR8216_SUPPORT
++void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb);
++int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb,
++ int pktlen);
++static inline int ag71xx_has_ar8216(struct ag71xx *ag)
++{
++ return ag71xx_get_pdata(ag)->has_ar8216;
++}
++#else
++static inline void ag71xx_add_ar8216_header(struct ag71xx *ag,
++ struct sk_buff *skb)
++{
++}
++
++static inline int ag71xx_remove_ar8216_header(struct ag71xx *ag,
++ struct sk_buff *skb,
++ int pktlen)
++{
++ return 0;
++}
++static inline int ag71xx_has_ar8216(struct ag71xx *ag)
++{
++ return 0;
++}
++#endif
++
++#ifdef CONFIG_AG71XX_DEBUG_FS
++int ag71xx_debugfs_root_init(void);
++void ag71xx_debugfs_root_exit(void);
++int ag71xx_debugfs_init(struct ag71xx *ag);
++void ag71xx_debugfs_exit(struct ag71xx *ag);
++void ag71xx_debugfs_update_int_stats(struct ag71xx *ag, u32 status);
++void ag71xx_debugfs_update_napi_stats(struct ag71xx *ag, int rx, int tx);
++#else
++static inline int ag71xx_debugfs_root_init(void) { return 0; }
++static inline void ag71xx_debugfs_root_exit(void) {}
++static inline int ag71xx_debugfs_init(struct ag71xx *ag) { return 0; }
++static inline void ag71xx_debugfs_exit(struct ag71xx *ag) {}
++static inline void ag71xx_debugfs_update_int_stats(struct ag71xx *ag,
++ u32 status) {}
++static inline void ag71xx_debugfs_update_napi_stats(struct ag71xx *ag,
++ int rx, int tx) {}
++#endif /* CONFIG_AG71XX_DEBUG_FS */
++
++void ag71xx_ar7240_start(struct ag71xx *ag);
++void ag71xx_ar7240_stop(struct ag71xx *ag);
++int ag71xx_ar7240_init(struct ag71xx *ag);
++void ag71xx_ar7240_cleanup(struct ag71xx *ag);
++
++int ag71xx_mdio_mii_read(struct ag71xx_mdio *am, int addr, int reg);
++void ag71xx_mdio_mii_write(struct ag71xx_mdio *am, int addr, int reg, u16 val);
++
++u16 ar7240sw_phy_read(struct mii_bus *mii, unsigned phy_addr,
++ unsigned reg_addr);
++int ar7240sw_phy_write(struct mii_bus *mii, unsigned phy_addr,
++ unsigned reg_addr, u16 reg_val);
++
++#endif /* _AG71XX_H */
diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ar7240.c linux-2.6.39/drivers/net/ag71xx/ag71xx_ar7240.c
--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ar7240.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx_ar7240.c 2011-08-06 09:32:37.298018216 +0200
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx_ar7240.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,913 @@
+/*
+ * Driver for the built-in ethernet switch of the Atheros AR7240 SoC
@@ -18678,7 +16803,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ar7240.c linux-2.6.39/driv
+}
diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ar8216.c linux-2.6.39/drivers/net/ag71xx/ag71xx_ar8216.c
--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ar8216.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx_ar8216.c 2011-04-27 12:19:22.257663952 +0200
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx_ar8216.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,44 @@
+/*
+ * Atheros AR71xx built-in ethernet mac driver
@@ -18726,7 +16851,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ar8216.c linux-2.6.39/driv
+}
diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_debugfs.c linux-2.6.39/drivers/net/ag71xx/ag71xx_debugfs.c
--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_debugfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx_debugfs.c 2011-08-06 09:32:37.298018216 +0200
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx_debugfs.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,280 @@
+/*
+ * Atheros AR71xx built-in ethernet mac driver
@@ -19010,7 +17135,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_debugfs.c linux-2.6.39/dri
+}
diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ethtool.c linux-2.6.39/drivers/net/ag71xx/ag71xx_ethtool.c
--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ethtool.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx_ethtool.c 2011-08-06 09:32:37.308017908 +0200
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx_ethtool.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,124 @@
+/*
+ * Atheros AR71xx built-in ethernet mac driver
@@ -19136,531 +17261,9 @@ diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_ethtool.c linux-2.6.39/dri
+ .set_ringparam = ag71xx_ethtool_set_ringparam,
+ .get_link = ethtool_op_get_link,
+};
-diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx.h linux-2.6.39/drivers/net/ag71xx/ag71xx.h
---- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx.h 2011-08-22 07:40:12.160480642 +0200
-@@ -0,0 +1,518 @@
-+/*
-+ * Atheros AR71xx built-in ethernet mac driver
-+ *
-+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
-+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
-+ *
-+ * Based on Atheros' AG7100 driver
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ */
-+
-+#ifndef __AG71XX_H
-+#define __AG71XX_H
-+
-+#include <linux/kernel.h>
-+#include <linux/version.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/types.h>
-+#include <linux/random.h>
-+#include <linux/spinlock.h>
-+#include <linux/interrupt.h>
-+#include <linux/platform_device.h>
-+#include <linux/ethtool.h>
-+#include <linux/etherdevice.h>
-+#include <linux/if_vlan.h>
-+#include <linux/phy.h>
-+#include <linux/skbuff.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/workqueue.h>
-+
-+#include <linux/bitops.h>
-+
-+#include <asm/mach-ar71xx/ar71xx.h>
-+#include <asm/mach-ar71xx/platform.h>
-+
-+#define AG71XX_DRV_NAME "ag71xx"
-+#define AG71XX_DRV_VERSION "0.5.35"
-+
-+#define AG71XX_NAPI_WEIGHT 64
-+#define AG71XX_OOM_REFILL (1 + HZ/10)
-+
-+#define AG71XX_INT_ERR (AG71XX_INT_RX_BE | AG71XX_INT_TX_BE)
-+#define AG71XX_INT_TX (AG71XX_INT_TX_PS)
-+#define AG71XX_INT_RX (AG71XX_INT_RX_PR | AG71XX_INT_RX_OF)
-+
-+#define AG71XX_INT_POLL (AG71XX_INT_RX | AG71XX_INT_TX)
-+#define AG71XX_INT_INIT (AG71XX_INT_ERR | AG71XX_INT_POLL)
-+
-+#define AG71XX_TX_MTU_LEN 1540
-+#define AG71XX_RX_PKT_RESERVE 64
-+#define AG71XX_RX_PKT_SIZE \
-+ (AG71XX_RX_PKT_RESERVE + ETH_FRAME_LEN + ETH_FCS_LEN + VLAN_HLEN)
-+
-+#define AG71XX_TX_RING_SIZE_DEFAULT 64
-+#define AG71XX_RX_RING_SIZE_DEFAULT 128
-+
-+#define AG71XX_TX_RING_SIZE_MAX 256
-+#define AG71XX_RX_RING_SIZE_MAX 256
-+
-+#ifdef CONFIG_AG71XX_DEBUG
-+#define DBG(fmt, args...) printk(KERN_DEBUG fmt, ## args)
-+#else
-+#define DBG(fmt, args...) do {} while (0)
-+#endif
-+
-+#define ag71xx_assert(_cond) \
-+do { \
-+ if (_cond) \
-+ break; \
-+ printk("%s,%d: assertion failed\n", __FILE__, __LINE__); \
-+ BUG(); \
-+} while (0)
-+
-+struct ag71xx_desc {
-+ u32 data;
-+ u32 ctrl;
-+#define DESC_EMPTY BIT(31)
-+#define DESC_MORE BIT(24)
-+#define DESC_PKTLEN_M 0xfff
-+ u32 next;
-+ u32 pad;
-+} __attribute__((aligned(4)));
-+
-+struct ag71xx_buf {
-+ struct sk_buff *skb;
-+ struct ag71xx_desc *desc;
-+ dma_addr_t dma_addr;
-+ unsigned long timestamp;
-+};
-+
-+struct ag71xx_ring {
-+ struct ag71xx_buf *buf;
-+ u8 *descs_cpu;
-+ dma_addr_t descs_dma;
-+ unsigned int desc_size;
-+ unsigned int curr;
-+ unsigned int dirty;
-+ unsigned int size;
-+};
-+
-+struct ag71xx_mdio {
-+ struct mii_bus *mii_bus;
-+ int mii_irq[PHY_MAX_ADDR];
-+ void __iomem *mdio_base;
-+ struct ag71xx_mdio_platform_data *pdata;
-+};
-+
-+struct ag71xx_int_stats {
-+ unsigned long rx_pr;
-+ unsigned long rx_be;
-+ unsigned long rx_of;
-+ unsigned long tx_ps;
-+ unsigned long tx_be;
-+ unsigned long tx_ur;
-+ unsigned long total;
-+};
-+
-+struct ag71xx_napi_stats {
-+ unsigned long napi_calls;
-+ unsigned long rx_count;
-+ unsigned long rx_packets;
-+ unsigned long rx_packets_max;
-+ unsigned long tx_count;
-+ unsigned long tx_packets;
-+ unsigned long tx_packets_max;
-+
-+ unsigned long rx[AG71XX_NAPI_WEIGHT + 1];
-+ unsigned long tx[AG71XX_NAPI_WEIGHT + 1];
-+};
-+
-+struct ag71xx_debug {
-+ struct dentry *debugfs_dir;
-+
-+ struct ag71xx_int_stats int_stats;
-+ struct ag71xx_napi_stats napi_stats;
-+};
-+
-+struct ag71xx {
-+ void __iomem *mac_base;
-+ void __iomem *mii_ctrl;
-+
-+ spinlock_t lock;
-+ struct platform_device *pdev;
-+ struct net_device *dev;
-+ struct napi_struct napi;
-+ u32 msg_enable;
-+
-+ struct ag71xx_desc *stop_desc;
-+ dma_addr_t stop_desc_dma;
-+
-+ struct ag71xx_ring rx_ring;
-+ struct ag71xx_ring tx_ring;
-+
-+ struct mii_bus *mii_bus;
-+ struct phy_device *phy_dev;
-+ void *phy_priv;
-+
-+ unsigned int link;
-+ unsigned int speed;
-+ int duplex;
-+
-+ struct work_struct restart_work;
-+ struct delayed_work link_work;
-+ struct timer_list oom_timer;
-+
-+#ifdef CONFIG_AG71XX_DEBUG_FS
-+ struct ag71xx_debug debug;
-+#endif
-+};
-+
-+extern struct ethtool_ops ag71xx_ethtool_ops;
-+void ag71xx_link_adjust(struct ag71xx *ag);
-+
-+int ag71xx_mdio_driver_init(void) __init;
-+void ag71xx_mdio_driver_exit(void);
-+
-+int ag71xx_phy_connect(struct ag71xx *ag);
-+void ag71xx_phy_disconnect(struct ag71xx *ag);
-+void ag71xx_phy_start(struct ag71xx *ag);
-+void ag71xx_phy_stop(struct ag71xx *ag);
-+
-+static inline struct ag71xx_platform_data *ag71xx_get_pdata(struct ag71xx *ag)
-+{
-+ return ag->pdev->dev.platform_data;
-+}
-+
-+static inline int ag71xx_desc_empty(struct ag71xx_desc *desc)
-+{
-+ return (desc->ctrl & DESC_EMPTY) != 0;
-+}
-+
-+static inline int ag71xx_desc_pktlen(struct ag71xx_desc *desc)
-+{
-+ return desc->ctrl & DESC_PKTLEN_M;
-+}
-+
-+/* Register offsets */
-+#define AG71XX_REG_MAC_CFG1 0x0000
-+#define AG71XX_REG_MAC_CFG2 0x0004
-+#define AG71XX_REG_MAC_IPG 0x0008
-+#define AG71XX_REG_MAC_HDX 0x000c
-+#define AG71XX_REG_MAC_MFL 0x0010
-+#define AG71XX_REG_MII_CFG 0x0020
-+#define AG71XX_REG_MII_CMD 0x0024
-+#define AG71XX_REG_MII_ADDR 0x0028
-+#define AG71XX_REG_MII_CTRL 0x002c
-+#define AG71XX_REG_MII_STATUS 0x0030
-+#define AG71XX_REG_MII_IND 0x0034
-+#define AG71XX_REG_MAC_IFCTL 0x0038
-+#define AG71XX_REG_MAC_ADDR1 0x0040
-+#define AG71XX_REG_MAC_ADDR2 0x0044
-+#define AG71XX_REG_FIFO_CFG0 0x0048
-+#define AG71XX_REG_FIFO_CFG1 0x004c
-+#define AG71XX_REG_FIFO_CFG2 0x0050
-+#define AG71XX_REG_FIFO_CFG3 0x0054
-+#define AG71XX_REG_FIFO_CFG4 0x0058
-+#define AG71XX_REG_FIFO_CFG5 0x005c
-+#define AG71XX_REG_FIFO_RAM0 0x0060
-+#define AG71XX_REG_FIFO_RAM1 0x0064
-+#define AG71XX_REG_FIFO_RAM2 0x0068
-+#define AG71XX_REG_FIFO_RAM3 0x006c
-+#define AG71XX_REG_FIFO_RAM4 0x0070
-+#define AG71XX_REG_FIFO_RAM5 0x0074
-+#define AG71XX_REG_FIFO_RAM6 0x0078
-+#define AG71XX_REG_FIFO_RAM7 0x007c
-+
-+#define AG71XX_REG_TX_CTRL 0x0180
-+#define AG71XX_REG_TX_DESC 0x0184
-+#define AG71XX_REG_TX_STATUS 0x0188
-+#define AG71XX_REG_RX_CTRL 0x018c
-+#define AG71XX_REG_RX_DESC 0x0190
-+#define AG71XX_REG_RX_STATUS 0x0194
-+#define AG71XX_REG_INT_ENABLE 0x0198
-+#define AG71XX_REG_INT_STATUS 0x019c
-+
-+#define AG71XX_REG_FIFO_DEPTH 0x01a8
-+#define AG71XX_REG_RX_SM 0x01b0
-+#define AG71XX_REG_TX_SM 0x01b4
-+
-+#define MAC_CFG1_TXE BIT(0) /* Tx Enable */
-+#define MAC_CFG1_STX BIT(1) /* Synchronize Tx Enable */
-+#define MAC_CFG1_RXE BIT(2) /* Rx Enable */
-+#define MAC_CFG1_SRX BIT(3) /* Synchronize Rx Enable */
-+#define MAC_CFG1_TFC BIT(4) /* Tx Flow Control Enable */
-+#define MAC_CFG1_RFC BIT(5) /* Rx Flow Control Enable */
-+#define MAC_CFG1_LB BIT(8) /* Loopback mode */
-+#define MAC_CFG1_SR BIT(31) /* Soft Reset */
-+
-+#define MAC_CFG2_FDX BIT(0)
-+#define MAC_CFG2_CRC_EN BIT(1)
-+#define MAC_CFG2_PAD_CRC_EN BIT(2)
-+#define MAC_CFG2_LEN_CHECK BIT(4)
-+#define MAC_CFG2_HUGE_FRAME_EN BIT(5)
-+#define MAC_CFG2_IF_1000 BIT(9)
-+#define MAC_CFG2_IF_10_100 BIT(8)
-+
-+#define FIFO_CFG0_WTM BIT(0) /* Watermark Module */
-+#define FIFO_CFG0_RXS BIT(1) /* Rx System Module */
-+#define FIFO_CFG0_RXF BIT(2) /* Rx Fabric Module */
-+#define FIFO_CFG0_TXS BIT(3) /* Tx System Module */
-+#define FIFO_CFG0_TXF BIT(4) /* Tx Fabric Module */
-+#define FIFO_CFG0_ALL (FIFO_CFG0_WTM | FIFO_CFG0_RXS | FIFO_CFG0_RXF \
-+ | FIFO_CFG0_TXS | FIFO_CFG0_TXF)
-+
-+#define FIFO_CFG0_ENABLE_SHIFT 8
-+
-+#define FIFO_CFG4_DE BIT(0) /* Drop Event */
-+#define FIFO_CFG4_DV BIT(1) /* RX_DV Event */
-+#define FIFO_CFG4_FC BIT(2) /* False Carrier */
-+#define FIFO_CFG4_CE BIT(3) /* Code Error */
-+#define FIFO_CFG4_CR BIT(4) /* CRC error */
-+#define FIFO_CFG4_LM BIT(5) /* Length Mismatch */
-+#define FIFO_CFG4_LO BIT(6) /* Length out of range */
-+#define FIFO_CFG4_OK BIT(7) /* Packet is OK */
-+#define FIFO_CFG4_MC BIT(8) /* Multicast Packet */
-+#define FIFO_CFG4_BC BIT(9) /* Broadcast Packet */
-+#define FIFO_CFG4_DR BIT(10) /* Dribble */
-+#define FIFO_CFG4_LE BIT(11) /* Long Event */
-+#define FIFO_CFG4_CF BIT(12) /* Control Frame */
-+#define FIFO_CFG4_PF BIT(13) /* Pause Frame */
-+#define FIFO_CFG4_UO BIT(14) /* Unsupported Opcode */
-+#define FIFO_CFG4_VT BIT(15) /* VLAN tag detected */
-+#define FIFO_CFG4_FT BIT(16) /* Frame Truncated */
-+#define FIFO_CFG4_UC BIT(17) /* Unicast Packet */
-+
-+#define FIFO_CFG5_DE BIT(0) /* Drop Event */
-+#define FIFO_CFG5_DV BIT(1) /* RX_DV Event */
-+#define FIFO_CFG5_FC BIT(2) /* False Carrier */
-+#define FIFO_CFG5_CE BIT(3) /* Code Error */
-+#define FIFO_CFG5_LM BIT(4) /* Length Mismatch */
-+#define FIFO_CFG5_LO BIT(5) /* Length Out of Range */
-+#define FIFO_CFG5_OK BIT(6) /* Packet is OK */
-+#define FIFO_CFG5_MC BIT(7) /* Multicast Packet */
-+#define FIFO_CFG5_BC BIT(8) /* Broadcast Packet */
-+#define FIFO_CFG5_DR BIT(9) /* Dribble */
-+#define FIFO_CFG5_CF BIT(10) /* Control Frame */
-+#define FIFO_CFG5_PF BIT(11) /* Pause Frame */
-+#define FIFO_CFG5_UO BIT(12) /* Unsupported Opcode */
-+#define FIFO_CFG5_VT BIT(13) /* VLAN tag detected */
-+#define FIFO_CFG5_LE BIT(14) /* Long Event */
-+#define FIFO_CFG5_FT BIT(15) /* Frame Truncated */
-+#define FIFO_CFG5_16 BIT(16) /* unknown */
-+#define FIFO_CFG5_17 BIT(17) /* unknown */
-+#define FIFO_CFG5_SF BIT(18) /* Short Frame */
-+#define FIFO_CFG5_BM BIT(19) /* Byte Mode */
-+
-+#define AG71XX_INT_TX_PS BIT(0)
-+#define AG71XX_INT_TX_UR BIT(1)
-+#define AG71XX_INT_TX_BE BIT(3)
-+#define AG71XX_INT_RX_PR BIT(4)
-+#define AG71XX_INT_RX_OF BIT(6)
-+#define AG71XX_INT_RX_BE BIT(7)
-+
-+#define MAC_IFCTL_SPEED BIT(16)
-+
-+#define MII_CFG_CLK_DIV_4 0
-+#define MII_CFG_CLK_DIV_6 2
-+#define MII_CFG_CLK_DIV_8 3
-+#define MII_CFG_CLK_DIV_10 4
-+#define MII_CFG_CLK_DIV_14 5
-+#define MII_CFG_CLK_DIV_20 6
-+#define MII_CFG_CLK_DIV_28 7
-+#define MII_CFG_RESET BIT(31)
-+
-+#define MII_CMD_WRITE 0x0
-+#define MII_CMD_READ 0x1
-+#define MII_ADDR_SHIFT 8
-+#define MII_IND_BUSY BIT(0)
-+#define MII_IND_INVALID BIT(2)
-+
-+#define TX_CTRL_TXE BIT(0) /* Tx Enable */
-+
-+#define TX_STATUS_PS BIT(0) /* Packet Sent */
-+#define TX_STATUS_UR BIT(1) /* Tx Underrun */
-+#define TX_STATUS_BE BIT(3) /* Bus Error */
-+
-+#define RX_CTRL_RXE BIT(0) /* Rx Enable */
-+
-+#define RX_STATUS_PR BIT(0) /* Packet Received */
-+#define RX_STATUS_OF BIT(2) /* Rx Overflow */
-+#define RX_STATUS_BE BIT(3) /* Bus Error */
-+
-+#define MII_CTRL_IF_MASK 3
-+#define MII_CTRL_SPEED_SHIFT 4
-+#define MII_CTRL_SPEED_MASK 3
-+#define MII_CTRL_SPEED_10 0
-+#define MII_CTRL_SPEED_100 1
-+#define MII_CTRL_SPEED_1000 2
-+
-+static inline void ag71xx_check_reg_offset(struct ag71xx *ag, unsigned reg)
-+{
-+ switch (reg) {
-+ case AG71XX_REG_MAC_CFG1 ... AG71XX_REG_MAC_MFL:
-+ case AG71XX_REG_MAC_IFCTL ... AG71XX_REG_INT_STATUS:
-+ case AG71XX_REG_MII_CFG:
-+ break;
-+
-+ default:
-+ BUG();
-+ }
-+}
-+
-+static inline void ag71xx_wr(struct ag71xx *ag, unsigned reg, u32 value)
-+{
-+ ag71xx_check_reg_offset(ag, reg);
-+
-+ __raw_writel(value, ag->mac_base + reg);
-+ /* flush write */
-+ (void) __raw_readl(ag->mac_base + reg);
-+}
-+
-+static inline u32 ag71xx_rr(struct ag71xx *ag, unsigned reg)
-+{
-+ ag71xx_check_reg_offset(ag, reg);
-+
-+ return __raw_readl(ag->mac_base + reg);
-+}
-+
-+static inline void ag71xx_sb(struct ag71xx *ag, unsigned reg, u32 mask)
-+{
-+ void __iomem *r;
-+
-+ ag71xx_check_reg_offset(ag, reg);
-+
-+ r = ag->mac_base + reg;
-+ __raw_writel(__raw_readl(r) | mask, r);
-+ /* flush write */
-+ (void)__raw_readl(r);
-+}
-+
-+static inline void ag71xx_cb(struct ag71xx *ag, unsigned reg, u32 mask)
-+{
-+ void __iomem *r;
-+
-+ ag71xx_check_reg_offset(ag, reg);
-+
-+ r = ag->mac_base + reg;
-+ __raw_writel(__raw_readl(r) & ~mask, r);
-+ /* flush write */
-+ (void) __raw_readl(r);
-+}
-+
-+static inline void ag71xx_int_enable(struct ag71xx *ag, u32 ints)
-+{
-+ ag71xx_sb(ag, AG71XX_REG_INT_ENABLE, ints);
-+}
-+
-+static inline void ag71xx_int_disable(struct ag71xx *ag, u32 ints)
-+{
-+ ag71xx_cb(ag, AG71XX_REG_INT_ENABLE, ints);
-+}
-+
-+static inline void ag71xx_mii_ctrl_wr(struct ag71xx *ag, u32 value)
-+{
-+ struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
-+
-+ if (pdata->is_ar724x)
-+ return;
-+
-+ __raw_writel(value, ag->mii_ctrl);
-+
-+ /* flush write */
-+ __raw_readl(ag->mii_ctrl);
-+}
-+
-+static inline u32 ag71xx_mii_ctrl_rr(struct ag71xx *ag)
-+{
-+ struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
-+
-+ if (pdata->is_ar724x)
-+ return 0xffffffff;
-+
-+ return __raw_readl(ag->mii_ctrl);
-+}
-+
-+static inline void ag71xx_mii_ctrl_set_if(struct ag71xx *ag,
-+ unsigned int mii_if)
-+{
-+ u32 t;
-+
-+ t = ag71xx_mii_ctrl_rr(ag);
-+ t &= ~(MII_CTRL_IF_MASK);
-+ t |= (mii_if & MII_CTRL_IF_MASK);
-+ ag71xx_mii_ctrl_wr(ag, t);
-+}
-+
-+static inline void ag71xx_mii_ctrl_set_speed(struct ag71xx *ag,
-+ unsigned int speed)
-+{
-+ u32 t;
-+
-+ t = ag71xx_mii_ctrl_rr(ag);
-+ t &= ~(MII_CTRL_SPEED_MASK << MII_CTRL_SPEED_SHIFT);
-+ t |= (speed & MII_CTRL_SPEED_MASK) << MII_CTRL_SPEED_SHIFT;
-+ ag71xx_mii_ctrl_wr(ag, t);
-+}
-+
-+#ifdef CONFIG_AG71XX_AR8216_SUPPORT
-+void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb);
-+int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb,
-+ int pktlen);
-+static inline int ag71xx_has_ar8216(struct ag71xx *ag)
-+{
-+ return ag71xx_get_pdata(ag)->has_ar8216;
-+}
-+#else
-+static inline void ag71xx_add_ar8216_header(struct ag71xx *ag,
-+ struct sk_buff *skb)
-+{
-+}
-+
-+static inline int ag71xx_remove_ar8216_header(struct ag71xx *ag,
-+ struct sk_buff *skb,
-+ int pktlen)
-+{
-+ return 0;
-+}
-+static inline int ag71xx_has_ar8216(struct ag71xx *ag)
-+{
-+ return 0;
-+}
-+#endif
-+
-+#ifdef CONFIG_AG71XX_DEBUG_FS
-+int ag71xx_debugfs_root_init(void);
-+void ag71xx_debugfs_root_exit(void);
-+int ag71xx_debugfs_init(struct ag71xx *ag);
-+void ag71xx_debugfs_exit(struct ag71xx *ag);
-+void ag71xx_debugfs_update_int_stats(struct ag71xx *ag, u32 status);
-+void ag71xx_debugfs_update_napi_stats(struct ag71xx *ag, int rx, int tx);
-+#else
-+static inline int ag71xx_debugfs_root_init(void) { return 0; }
-+static inline void ag71xx_debugfs_root_exit(void) {}
-+static inline int ag71xx_debugfs_init(struct ag71xx *ag) { return 0; }
-+static inline void ag71xx_debugfs_exit(struct ag71xx *ag) {}
-+static inline void ag71xx_debugfs_update_int_stats(struct ag71xx *ag,
-+ u32 status) {}
-+static inline void ag71xx_debugfs_update_napi_stats(struct ag71xx *ag,
-+ int rx, int tx) {}
-+#endif /* CONFIG_AG71XX_DEBUG_FS */
-+
-+void ag71xx_ar7240_start(struct ag71xx *ag);
-+void ag71xx_ar7240_stop(struct ag71xx *ag);
-+int ag71xx_ar7240_init(struct ag71xx *ag);
-+void ag71xx_ar7240_cleanup(struct ag71xx *ag);
-+
-+int ag71xx_mdio_mii_read(struct ag71xx_mdio *am, int addr, int reg);
-+void ag71xx_mdio_mii_write(struct ag71xx_mdio *am, int addr, int reg, u16 val);
-+
-+u16 ar7240sw_phy_read(struct mii_bus *mii, unsigned phy_addr,
-+ unsigned reg_addr);
-+int ar7240sw_phy_write(struct mii_bus *mii, unsigned phy_addr,
-+ unsigned reg_addr, u16 reg_val);
-+
-+#endif /* _AG71XX_H */
diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_main.c linux-2.6.39/drivers/net/ag71xx/ag71xx_main.c
--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_main.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx_main.c 2011-08-22 07:40:12.160480642 +0200
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx_main.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,1291 @@
+/*
+ * Atheros AR71xx built-in ethernet mac driver
@@ -20955,7 +18558,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_main.c linux-2.6.39/driver
+MODULE_ALIAS("platform:" AG71XX_DRV_NAME);
diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_mdio.c linux-2.6.39/drivers/net/ag71xx/ag71xx_mdio.c
--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_mdio.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx_mdio.c 2011-04-27 12:19:22.257663952 +0200
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx_mdio.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,248 @@
+/*
+ * Atheros AR71xx built-in ethernet mac driver
@@ -21207,7 +18810,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_mdio.c linux-2.6.39/driver
+}
diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_phy.c linux-2.6.39/drivers/net/ag71xx/ag71xx_phy.c
--- linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_phy.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/ag71xx_phy.c 2011-08-06 09:32:37.298018216 +0200
++++ linux-2.6.39/drivers/net/ag71xx/ag71xx_phy.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,228 @@
+/*
+ * Atheros AR71xx built-in ethernet mac driver
@@ -21437,88 +19040,9 @@ diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/ag71xx_phy.c linux-2.6.39/drivers
+ else if (ag->phy_dev)
+ phy_disconnect(ag->phy_dev);
+}
-diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/Kconfig linux-2.6.39/drivers/net/ag71xx/Kconfig
---- linux-2.6.39.orig/drivers/net/ag71xx/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/Kconfig 2011-04-27 12:19:22.247664026 +0200
-@@ -0,0 +1,33 @@
-+config AG71XX
-+ tristate "Atheros AR71xx built-in ethernet mac support"
-+ depends on ATHEROS_AR71XX
-+ select PHYLIB
-+ help
-+ If you wish to compile a kernel for AR71xx/91xx and enable
-+ ethernet support, then you should always answer Y to this.
-+
-+if AG71XX
-+
-+config AG71XX_DEBUG
-+ bool "Atheros AR71xx built-in ethernet driver debugging"
-+ default n
-+ help
-+ Atheros AR71xx built-in ethernet driver debugging messages.
-+
-+config AG71XX_DEBUG_FS
-+ bool "Atheros AR71xx built-in ethernet driver debugfs support"
-+ depends on DEBUG_FS
-+ default n
-+ help
-+ Say Y, if you need access to various statistics provided by
-+ the ag71xx driver.
-+
-+config AG71XX_AR8216_SUPPORT
-+ bool "special support for the Atheros AR8216 switch"
-+ default n
-+ default y if AR71XX_MACH_WNR2000 || AR71XX_MACH_MZK_W04NU
-+ help
-+ Say 'y' here if you want to enable special support for the
-+ Atheros AR8216 switch found on some boards.
-+
-+endif
-diff -Nur linux-2.6.39.orig/drivers/net/ag71xx/Makefile linux-2.6.39/drivers/net/ag71xx/Makefile
---- linux-2.6.39.orig/drivers/net/ag71xx/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/ag71xx/Makefile 2011-04-27 12:19:22.257663952 +0200
-@@ -0,0 +1,15 @@
-+#
-+# Makefile for the Atheros AR71xx built-in ethernet macs
-+#
-+
-+ag71xx-y += ag71xx_main.o
-+ag71xx-y += ag71xx_ethtool.o
-+ag71xx-y += ag71xx_phy.o
-+ag71xx-y += ag71xx_mdio.o
-+ag71xx-y += ag71xx_ar7240.o
-+
-+ag71xx-$(CONFIG_AG71XX_DEBUG_FS) += ag71xx_debugfs.o
-+ag71xx-$(CONFIG_AG71XX_AR8216_SUPPORT) += ag71xx_ar8216.o
-+
-+obj-$(CONFIG_AG71XX) += ag71xx.o
-+
-diff -Nur linux-2.6.39.orig/drivers/net/Kconfig linux-2.6.39/drivers/net/Kconfig
---- linux-2.6.39.orig/drivers/net/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/net/Kconfig 2011-08-22 16:21:54.787979739 +0200
-@@ -2071,6 +2071,8 @@
-
- The safe and default value for this is N.
-
-+source drivers/net/ag71xx/Kconfig
-+
- config DL2K
- tristate "DL2000/TC902x-based Gigabit Ethernet support"
- depends on PCI
-diff -Nur linux-2.6.39.orig/drivers/net/Makefile linux-2.6.39/drivers/net/Makefile
---- linux-2.6.39.orig/drivers/net/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/net/Makefile 2011-08-22 16:21:54.797980120 +0200
-@@ -112,6 +112,7 @@
- # end link order section
- #
-
-+obj-$(CONFIG_AG71XX) += ag71xx/
- obj-$(CONFIG_SUNDANCE) += sundance.o
- obj-$(CONFIG_HAMACHI) += hamachi.o
- obj-$(CONFIG_NET) += Space.o loopback.o
diff -Nur linux-2.6.39.orig/drivers/net/phy/Kconfig linux-2.6.39/drivers/net/phy/Kconfig
--- linux-2.6.39.orig/drivers/net/phy/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/net/phy/Kconfig 2011-08-22 22:19:34.339230055 +0200
++++ linux-2.6.39/drivers/net/phy/Kconfig 2011-08-24 18:17:24.000000000 +0200
@@ -13,6 +13,12 @@
if PHYLIB
@@ -21534,7 +19058,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/phy/Kconfig linux-2.6.39/drivers/net/phy
config MARVELL_PHY
diff -Nur linux-2.6.39.orig/drivers/net/phy/Makefile linux-2.6.39/drivers/net/phy/Makefile
--- linux-2.6.39.orig/drivers/net/phy/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/net/phy/Makefile 2011-08-22 22:19:34.339230055 +0200
++++ linux-2.6.39/drivers/net/phy/Makefile 2011-08-24 18:17:24.000000000 +0200
@@ -3,6 +3,7 @@
libphy-objs := phy.o phy_device.o mdio_bus.o
@@ -21545,7 +19069,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/phy/Makefile linux-2.6.39/drivers/net/ph
obj-$(CONFIG_CICADA_PHY) += cicada.o
diff -Nur linux-2.6.39.orig/drivers/net/phy/micrel.c linux-2.6.39/drivers/net/phy/micrel.c
--- linux-2.6.39.orig/drivers/net/phy/micrel.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/net/phy/micrel.c 2011-04-27 12:19:22.257663952 +0200
++++ linux-2.6.39/drivers/net/phy/micrel.c 2011-08-24 18:17:24.000000000 +0200
@@ -1,251 +1,82 @@
/*
- * drivers/net/phy/micrel.c
@@ -21850,7 +19374,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/phy/micrel.c linux-2.6.39/drivers/net/ph
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/net/phy/phy.c linux-2.6.39/drivers/net/phy/phy.c
--- linux-2.6.39.orig/drivers/net/phy/phy.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/net/phy/phy.c 2011-08-22 22:00:02.067980292 +0200
++++ linux-2.6.39/drivers/net/phy/phy.c 2011-08-24 18:17:24.000000000 +0200
@@ -297,6 +297,50 @@
}
EXPORT_SYMBOL(phy_ethtool_gset);
@@ -21913,7 +19437,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/phy/phy.c linux-2.6.39/drivers/net/phy/p
idx = phy_find_valid(idx, phydev->supported);
diff -Nur linux-2.6.39.orig/drivers/net/phy/phy_device.c linux-2.6.39/drivers/net/phy/phy_device.c
--- linux-2.6.39.orig/drivers/net/phy/phy_device.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/net/phy/phy_device.c 2011-08-22 22:00:06.817981347 +0200
++++ linux-2.6.39/drivers/net/phy/phy_device.c 2011-08-24 18:17:24.000000000 +0200
@@ -149,6 +149,18 @@
}
EXPORT_SYMBOL(phy_scan_fixups);
@@ -21944,7 +19468,7 @@ diff -Nur linux-2.6.39.orig/drivers/net/phy/phy_device.c linux-2.6.39/drivers/ne
INIT_DELAYED_WORK(&dev->state_queue, phy_state_machine);
diff -Nur linux-2.6.39.orig/drivers/net/phy/swconfig.c linux-2.6.39/drivers/net/phy/swconfig.c
--- linux-2.6.39.orig/drivers/net/phy/swconfig.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/net/phy/swconfig.c 2011-08-22 22:18:58.887990974 +0200
++++ linux-2.6.39/drivers/net/phy/swconfig.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,954 @@
+/*
+ * swconfig.c: Switch configuration API
@@ -22900,9 +20424,80 @@ diff -Nur linux-2.6.39.orig/drivers/net/phy/swconfig.c linux-2.6.39/drivers/net/
+module_init(swconfig_init);
+module_exit(swconfig_exit);
+
+diff -Nur linux-2.6.39.orig/drivers/spi/Kconfig linux-2.6.39/drivers/spi/Kconfig
+--- linux-2.6.39.orig/drivers/spi/Kconfig 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/spi/Kconfig 2011-08-24 18:17:24.000000000 +0200
+@@ -67,6 +67,13 @@
+ This enables support for the SPI controller present on the
+ Atheros AR71XX/AR724X/AR913X SoCs.
+
++config SPI_AR71XX
++ tristate "Atheros AR71xx SPI Controller"
++ depends on SPI_MASTER && ATHEROS_AR71XX
++ select SPI_BITBANG
++ help
++ This is the SPI contoller driver for Atheros AR71xx.
++
+ config SPI_ATMEL
+ tristate "Atmel SPI Controller"
+ depends on (ARCH_AT91 || AVR32)
+@@ -301,6 +308,12 @@
+ config SPI_PXA2XX_PCI
+ def_bool SPI_PXA2XX && X86_32 && PCI
+
++config SPI_RB4XX
++ tristate "Mikrotik RB4XX SPI master"
++ depends on SPI_MASTER && AR71XX_MACH_RB4XX
++ help
++ SPI controller driver for the Mikrotik RB4xx series boards.
++
+ config SPI_S3C24XX
+ tristate "Samsung S3C24XX series SPI"
+ depends on ARCH_S3C2410 && EXPERIMENTAL
+@@ -457,6 +470,13 @@
+ sysfs interface, with each line presented as a kind of GPIO
+ exposing both switch control and diagnostic feedback.
+
++config SPI_RB4XX_CPLD
++ tristate "MikroTik RB4XX CPLD driver"
++ depends on AR71XX_MACH_RB4XX
++ help
++ SPI driver for the Xilinx CPLD chip present on the
++ MikroTik RB4xx boards.
++
+ #
+ # Add new SPI protocol masters in alphabetical order above this line
+ #
+diff -Nur linux-2.6.39.orig/drivers/spi/Makefile linux-2.6.39/drivers/spi/Makefile
+--- linux-2.6.39.orig/drivers/spi/Makefile 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/spi/Makefile 2011-08-24 18:17:24.000000000 +0200
+@@ -10,6 +10,7 @@
+
+ # SPI master controller drivers (bus)
+ obj-$(CONFIG_SPI_ALTERA) += spi_altera.o
++obj-$(CONFIG_SPI_AR71XX) += ar71xx_spi.o
+ obj-$(CONFIG_SPI_ATMEL) += atmel_spi.o
+ obj-$(CONFIG_SPI_ATH79) += ath79_spi.o
+ obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.o
+@@ -54,6 +55,7 @@
+ obj-$(CONFIG_SPI_SH_MSIOF) += spi_sh_msiof.o
+ obj-$(CONFIG_SPI_STMP3XXX) += spi_stmp.o
+ obj-$(CONFIG_SPI_NUC900) += spi_nuc900.o
++obj-$(CONFIG_SPI_RB4XX) += rb4xx_spi.o
+
+ # special build for s3c24xx spi driver with fiq support
+ spi_s3c24xx_hw-y := spi_s3c24xx.o
+@@ -62,6 +64,7 @@
+ # ... add above this line ...
+
+ # SPI protocol drivers (device/link on bus)
++obj-$(CONFIG_SPI_RB4XX_CPLD) += spi_rb4xx_cpld.o
+ obj-$(CONFIG_SPI_SPIDEV) += spidev.o
+ obj-$(CONFIG_SPI_TLE62X0) += tle62x0.o
+ # ... add above this line ...
diff -Nur linux-2.6.39.orig/drivers/spi/ap83_spi.c linux-2.6.39/drivers/spi/ap83_spi.c
--- linux-2.6.39.orig/drivers/spi/ap83_spi.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/ap83_spi.c 2011-04-27 12:19:22.317665385 +0200
++++ linux-2.6.39/drivers/spi/ap83_spi.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,283 @@
+/*
+ * Atheros AP83 board specific SPI Controller driver
@@ -23189,7 +20784,7 @@ diff -Nur linux-2.6.39.orig/drivers/spi/ap83_spi.c linux-2.6.39/drivers/spi/ap83
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/spi/ar71xx_spi.c linux-2.6.39/drivers/spi/ar71xx_spi.c
--- linux-2.6.39.orig/drivers/spi/ar71xx_spi.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/ar71xx_spi.c 2011-04-27 12:19:22.317665385 +0200
++++ linux-2.6.39/drivers/spi/ar71xx_spi.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,283 @@
+/*
+ * Atheros AR71xx SPI Controller driver
@@ -23474,645 +21069,9 @@ diff -Nur linux-2.6.39.orig/drivers/spi/ar71xx_spi.c linux-2.6.39/drivers/spi/ar
+MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
+MODULE_AUTHOR("Imre Kaloz <kaloz@openwrt.org>");
+MODULE_LICENSE("GPL v2");
-diff -Nur linux-2.6.39.orig/drivers/spi/Kconfig linux-2.6.39/drivers/spi/Kconfig
---- linux-2.6.39.orig/drivers/spi/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/spi/Kconfig 2011-08-23 15:10:24.167989908 +0200
-@@ -67,6 +67,13 @@
- This enables support for the SPI controller present on the
- Atheros AR71XX/AR724X/AR913X SoCs.
-
-+config SPI_AR71XX
-+ tristate "Atheros AR71xx SPI Controller"
-+ depends on SPI_MASTER && ATHEROS_AR71XX
-+ select SPI_BITBANG
-+ help
-+ This is the SPI contoller driver for Atheros AR71xx.
-+
- config SPI_ATMEL
- tristate "Atmel SPI Controller"
- depends on (ARCH_AT91 || AVR32)
-@@ -301,6 +308,12 @@
- config SPI_PXA2XX_PCI
- def_bool SPI_PXA2XX && X86_32 && PCI
-
-+config SPI_RB4XX
-+ tristate "Mikrotik RB4XX SPI master"
-+ depends on SPI_MASTER && AR71XX_MACH_RB4XX
-+ help
-+ SPI controller driver for the Mikrotik RB4xx series boards.
-+
- config SPI_S3C24XX
- tristate "Samsung S3C24XX series SPI"
- depends on ARCH_S3C2410 && EXPERIMENTAL
-@@ -457,6 +470,13 @@
- sysfs interface, with each line presented as a kind of GPIO
- exposing both switch control and diagnostic feedback.
-
-+config SPI_RB4XX_CPLD
-+ tristate "MikroTik RB4XX CPLD driver"
-+ depends on AR71XX_MACH_RB4XX
-+ help
-+ SPI driver for the Xilinx CPLD chip present on the
-+ MikroTik RB4xx boards.
-+
- #
- # Add new SPI protocol masters in alphabetical order above this line
- #
-diff -Nur linux-2.6.39.orig/drivers/spi/Kconfig.orig linux-2.6.39/drivers/spi/Kconfig.orig
---- linux-2.6.39.orig/drivers/spi/Kconfig.orig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/Kconfig.orig 2011-08-23 15:10:11.277991848 +0200
-@@ -0,0 +1,482 @@
-+#
-+# SPI driver configuration
-+#
-+# NOTE: the reason this doesn't show SPI slave support is mostly that
-+# nobody's needed a slave side API yet. The master-role API is not
-+# fully appropriate there, so it'd need some thought to do well.
-+#
-+menuconfig SPI
-+ bool "SPI support"
-+ depends on HAS_IOMEM
-+ help
-+ The "Serial Peripheral Interface" is a low level synchronous
-+ protocol. Chips that support SPI can have data transfer rates
-+ up to several tens of Mbit/sec. Chips are addressed with a
-+ controller and a chipselect. Most SPI slaves don't support
-+ dynamic device discovery; some are even write-only or read-only.
-+
-+ SPI is widely used by microcontrollers to talk with sensors,
-+ eeprom and flash memory, codecs and various other controller
-+ chips, analog to digital (and d-to-a) converters, and more.
-+ MMC and SD cards can be accessed using SPI protocol; and for
-+ DataFlash cards used in MMC sockets, SPI must always be used.
-+
-+ SPI is one of a family of similar protocols using a four wire
-+ interface (select, clock, data in, data out) including Microwire
-+ (half duplex), SSP, SSI, and PSP. This driver framework should
-+ work with most such devices and controllers.
-+
-+if SPI
-+
-+config SPI_DEBUG
-+ boolean "Debug support for SPI drivers"
-+ depends on DEBUG_KERNEL
-+ help
-+ Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
-+ sysfs, and debugfs support in SPI controller and protocol drivers.
-+
-+#
-+# MASTER side ... talking to discrete SPI slave chips including microcontrollers
-+#
-+
-+config SPI_MASTER
-+# boolean "SPI Master Support"
-+ boolean
-+ default SPI
-+ help
-+ If your system has an master-capable SPI controller (which
-+ provides the clock and chipselect), you can enable that
-+ controller and the protocol drivers for the SPI slave chips
-+ that are connected.
-+
-+if SPI_MASTER
-+
-+comment "SPI Master Controller Drivers"
-+
-+config SPI_ALTERA
-+ tristate "Altera SPI Controller"
-+ select SPI_BITBANG
-+ help
-+ This is the driver for the Altera SPI Controller.
-+
-+config SPI_ATH79
-+ tristate "Atheros AR71XX/AR724X/AR913X SPI controller driver"
-+ depends on ATH79 && GENERIC_GPIO
-+ select SPI_BITBANG
-+ help
-+ This enables support for the SPI controller present on the
-+ Atheros AR71XX/AR724X/AR913X SoCs.
-+
-+config SPI_AR71XX
-+ tristate "Atheros AR71xx SPI Controller"
-+ depends on SPI_MASTER && ATHEROS_AR71XX
-+ select SPI_BITBANG
-+ help
-+ This is the SPI contoller driver for Atheros AR71xx.
-+
-+config SPI_ATMEL
-+ tristate "Atmel SPI Controller"
-+ depends on (ARCH_AT91 || AVR32)
-+ help
-+ This selects a driver for the Atmel SPI Controller, present on
-+ many AT32 (AVR32) and AT91 (ARM) chips.
-+
-+config SPI_BFIN
-+ tristate "SPI controller driver for ADI Blackfin5xx"
-+ depends on BLACKFIN
-+ help
-+ This is the SPI controller master driver for Blackfin 5xx processor.
-+
-+config SPI_AU1550
-+ tristate "Au1550/Au12x0 SPI Controller"
-+ depends on (SOC_AU1550 || SOC_AU1200) && EXPERIMENTAL
-+ select SPI_BITBANG
-+ help
-+ If you say yes to this option, support will be included for the
-+ Au1550 SPI controller (may also work with Au1200,Au1210,Au1250).
-+
-+ This driver can also be built as a module. If so, the module
-+ will be called au1550_spi.
-+
-+config SPI_BITBANG
-+ tristate "Utilities for Bitbanging SPI masters"
-+ help
-+ With a few GPIO pins, your system can bitbang the SPI protocol.
-+ Select this to get SPI support through I/O pins (GPIO, parallel
-+ port, etc). Or, some systems' SPI master controller drivers use
-+ this code to manage the per-word or per-transfer accesses to the
-+ hardware shift registers.
-+
-+ This is library code, and is automatically selected by drivers that
-+ need it. You only need to select this explicitly to support driver
-+ modules that aren't part of this kernel tree.
-+
-+config SPI_BUTTERFLY
-+ tristate "Parallel port adapter for AVR Butterfly (DEVELOPMENT)"
-+ depends on PARPORT
-+ select SPI_BITBANG
-+ help
-+ This uses a custom parallel port cable to connect to an AVR
-+ Butterfly <http://www.atmel.com/products/avr/butterfly>, an
-+ inexpensive battery powered microcontroller evaluation board.
-+ This same cable can be used to flash new firmware.
-+
-+config SPI_COLDFIRE_QSPI
-+ tristate "Freescale Coldfire QSPI controller"
-+ depends on (M520x || M523x || M5249 || M527x || M528x || M532x)
-+ help
-+ This enables support for the Coldfire QSPI controller in master
-+ mode.
-+
-+ This driver can also be built as a module. If so, the module
-+ will be called coldfire_qspi.
-+
-+config SPI_DAVINCI
-+ tristate "Texas Instruments DaVinci/DA8x/OMAP-L/AM1x SoC SPI controller"
-+ depends on SPI_MASTER && ARCH_DAVINCI
-+ select SPI_BITBANG
-+ help
-+ SPI master controller for DaVinci/DA8x/OMAP-L/AM1x SPI modules.
-+
-+ This driver can also be built as a module. The module will be called
-+ davinci_spi.
-+
-+config SPI_EP93XX
-+ tristate "Cirrus Logic EP93xx SPI controller"
-+ depends on ARCH_EP93XX
-+ help
-+ This enables using the Cirrus EP93xx SPI controller in master
-+ mode.
-+
-+ To compile this driver as a module, choose M here. The module will be
-+ called ep93xx_spi.
-+
-+config SPI_GPIO
-+ tristate "GPIO-based bitbanging SPI Master"
-+ depends on GENERIC_GPIO
-+ select SPI_BITBANG
-+ help
-+ This simple GPIO bitbanging SPI master uses the arch-neutral GPIO
-+ interface to manage MOSI, MISO, SCK, and chipselect signals. SPI
-+ slaves connected to a bus using this driver are configured as usual,
-+ except that the spi_board_info.controller_data holds the GPIO number
-+ for the chipselect used by this controller driver.
-+
-+ Note that this driver often won't achieve even 1 Mbit/sec speeds,
-+ making it unusually slow for SPI. If your platform can inline
-+ GPIO operations, you should be able to leverage that for better
-+ speed with a custom version of this driver; see the source code.
-+
-+config SPI_IMX_VER_IMX1
-+ def_bool y if SOC_IMX1
-+
-+config SPI_IMX_VER_0_0
-+ def_bool y if SOC_IMX21 || SOC_IMX27
-+
-+config SPI_IMX_VER_0_4
-+ def_bool y if SOC_IMX31
-+
-+config SPI_IMX_VER_0_7
-+ def_bool y if ARCH_MX25 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
-+
-+config SPI_IMX_VER_2_3
-+ def_bool y if SOC_IMX51 || SOC_IMX53
-+
-+config SPI_IMX
-+ tristate "Freescale i.MX SPI controllers"
-+ depends on ARCH_MXC
-+ select SPI_BITBANG
-+ default m if IMX_HAVE_PLATFORM_SPI_IMX
-+ help
-+ This enables using the Freescale i.MX SPI controllers in master
-+ mode.
-+
-+config SPI_LM70_LLP
-+ tristate "Parallel port adapter for LM70 eval board (DEVELOPMENT)"
-+ depends on PARPORT && EXPERIMENTAL
-+ select SPI_BITBANG
-+ help
-+ This driver supports the NS LM70 LLP Evaluation Board,
-+ which interfaces to an LM70 temperature sensor using
-+ a parallel port.
-+
-+config SPI_MPC52xx
-+ tristate "Freescale MPC52xx SPI (non-PSC) controller support"
-+ depends on PPC_MPC52xx && SPI
-+ select SPI_MASTER_OF
-+ help
-+ This drivers supports the MPC52xx SPI controller in master SPI
-+ mode.
-+
-+config SPI_MPC52xx_PSC
-+ tristate "Freescale MPC52xx PSC SPI controller"
-+ depends on PPC_MPC52xx && EXPERIMENTAL
-+ help
-+ This enables using the Freescale MPC52xx Programmable Serial
-+ Controller in master SPI mode.
-+
-+config SPI_MPC512x_PSC
-+ tristate "Freescale MPC512x PSC SPI controller"
-+ depends on SPI_MASTER && PPC_MPC512x
-+ help
-+ This enables using the Freescale MPC5121 Programmable Serial
-+ Controller in SPI master mode.
-+
-+config SPI_FSL_LIB
-+ tristate
-+ depends on FSL_SOC
-+
-+config SPI_FSL_SPI
-+ tristate "Freescale SPI controller"
-+ depends on FSL_SOC
-+ select SPI_FSL_LIB
-+ help
-+ This enables using the Freescale SPI controllers in master mode.
-+ MPC83xx platform uses the controller in cpu mode or CPM/QE mode.
-+ MPC8569 uses the controller in QE mode, MPC8610 in cpu mode.
-+
-+config SPI_FSL_ESPI
-+ tristate "Freescale eSPI controller"
-+ depends on FSL_SOC
-+ select SPI_FSL_LIB
-+ help
-+ This enables using the Freescale eSPI controllers in master mode.
-+ From MPC8536, 85xx platform uses the controller, and all P10xx,
-+ P20xx, P30xx,P40xx, P50xx uses this controller.
-+
-+config SPI_OC_TINY
-+ tristate "OpenCores tiny SPI"
-+ depends on GENERIC_GPIO
-+ select SPI_BITBANG
-+ help
-+ This is the driver for OpenCores tiny SPI master controller.
-+
-+config SPI_OMAP_UWIRE
-+ tristate "OMAP1 MicroWire"
-+ depends on ARCH_OMAP1
-+ select SPI_BITBANG
-+ help
-+ This hooks up to the MicroWire controller on OMAP1 chips.
-+
-+config SPI_OMAP24XX
-+ tristate "McSPI driver for OMAP"
-+ depends on ARCH_OMAP2PLUS
-+ help
-+ SPI master controller for OMAP24XX and later Multichannel SPI
-+ (McSPI) modules.
-+
-+config SPI_OMAP_100K
-+ tristate "OMAP SPI 100K"
-+ depends on SPI_MASTER && (ARCH_OMAP850 || ARCH_OMAP730)
-+ help
-+ OMAP SPI 100K master controller for omap7xx boards.
-+
-+config SPI_ORION
-+ tristate "Orion SPI master (EXPERIMENTAL)"
-+ depends on PLAT_ORION && EXPERIMENTAL
-+ help
-+ This enables using the SPI master controller on the Orion chips.
-+
-+config SPI_PL022
-+ tristate "ARM AMBA PL022 SSP controller (EXPERIMENTAL)"
-+ depends on ARM_AMBA && EXPERIMENTAL
-+ default y if MACH_U300
-+ default y if ARCH_REALVIEW
-+ default y if INTEGRATOR_IMPD1
-+ default y if ARCH_VERSATILE
-+ help
-+ This selects the ARM(R) AMBA(R) PrimeCell PL022 SSP
-+ controller. If you have an embedded system with an AMBA(R)
-+ bus and a PL022 controller, say Y or M here.
-+
-+config SPI_PPC4xx
-+ tristate "PPC4xx SPI Controller"
-+ depends on PPC32 && 4xx && SPI_MASTER
-+ select SPI_BITBANG
-+ help
-+ This selects a driver for the PPC4xx SPI Controller.
-+
-+config SPI_PXA2XX
-+ tristate "PXA2xx SSP SPI master"
-+ depends on (ARCH_PXA || (X86_32 && PCI)) && EXPERIMENTAL
-+ select PXA_SSP if ARCH_PXA
-+ help
-+ This enables using a PXA2xx or Sodaville SSP port as a SPI master
-+ controller. The driver can be configured to use any SSP port and
-+ additional documentation can be found a Documentation/spi/pxa2xx.
-+
-+config SPI_PXA2XX_PCI
-+ def_bool SPI_PXA2XX && X86_32 && PCI
-+
-+config SPI_S3C24XX
-+ tristate "Samsung S3C24XX series SPI"
-+ depends on ARCH_S3C2410 && EXPERIMENTAL
-+ select SPI_BITBANG
-+ help
-+ SPI driver for Samsung S3C24XX series ARM SoCs
-+
-+config SPI_S3C24XX_FIQ
-+ bool "S3C24XX driver with FIQ pseudo-DMA"
-+ depends on SPI_S3C24XX
-+ select FIQ
-+ help
-+ Enable FIQ support for the S3C24XX SPI driver to provide pseudo
-+ DMA by using the fast-interrupt request framework, This allows
-+ the driver to get DMA-like performance when there are either
-+ no free DMA channels, or when doing transfers that required both
-+ TX and RX data paths.
-+
-+config SPI_S3C24XX_GPIO
-+ tristate "Samsung S3C24XX series SPI by GPIO"
-+ depends on ARCH_S3C2410 && EXPERIMENTAL
-+ select SPI_BITBANG
-+ help
-+ SPI driver for Samsung S3C24XX series ARM SoCs using
-+ GPIO lines to provide the SPI bus. This can be used where
-+ the inbuilt hardware cannot provide the transfer mode, or
-+ where the board is using non hardware connected pins.
-+
-+config SPI_S3C64XX
-+ tristate "Samsung S3C64XX series type SPI"
-+ depends on (ARCH_S3C64XX || ARCH_S5P64X0)
-+ select S3C64XX_DMA if ARCH_S3C64XX
-+ help
-+ SPI driver for Samsung S3C64XX and newer SoCs.
-+
-+config SPI_SH_MSIOF
-+ tristate "SuperH MSIOF SPI controller"
-+ depends on SUPERH && HAVE_CLK
-+ select SPI_BITBANG
-+ help
-+ SPI driver for SuperH MSIOF blocks.
-+
-+config SPI_SH
-+ tristate "SuperH SPI controller"
-+ depends on SUPERH
-+ help
-+ SPI driver for SuperH SPI blocks.
-+
-+config SPI_SH_SCI
-+ tristate "SuperH SCI SPI controller"
-+ depends on SUPERH
-+ select SPI_BITBANG
-+ help
-+ SPI driver for SuperH SCI blocks.
-+
-+config SPI_STMP3XXX
-+ tristate "Freescale STMP37xx/378x SPI/SSP controller"
-+ depends on ARCH_STMP3XXX && SPI_MASTER
-+ help
-+ SPI driver for Freescale STMP37xx/378x SoC SSP interface
-+
-+config SPI_TEGRA
-+ tristate "Nvidia Tegra SPI controller"
-+ depends on ARCH_TEGRA
-+ select TEGRA_SYSTEM_DMA
-+ help
-+ SPI driver for NVidia Tegra SoCs
-+
-+config SPI_TI_SSP
-+ tristate "TI Sequencer Serial Port - SPI Support"
-+ depends on MFD_TI_SSP
-+ help
-+ This selects an SPI master implementation using a TI sequencer
-+ serial port.
-+
-+ To compile this driver as a module, choose M here: the
-+ module will be called ti-ssp-spi.
-+
-+config SPI_TOPCLIFF_PCH
-+ tristate "Topcliff PCH SPI Controller"
-+ depends on PCI
-+ help
-+ SPI driver for the Topcliff PCH (Platform Controller Hub) SPI bus
-+ used in some x86 embedded processors.
-+
-+config SPI_TXX9
-+ tristate "Toshiba TXx9 SPI controller"
-+ depends on GENERIC_GPIO && CPU_TX49XX
-+ help
-+ SPI driver for Toshiba TXx9 MIPS SoCs
-+
-+config SPI_XILINX
-+ tristate "Xilinx SPI controller common module"
-+ depends on HAS_IOMEM && EXPERIMENTAL
-+ select SPI_BITBANG
-+ help
-+ This exposes the SPI controller IP from the Xilinx EDK.
-+
-+ See the "OPB Serial Peripheral Interface (SPI) (v1.00e)"
-+ Product Specification document (DS464) for hardware details.
-+
-+ Or for the DS570, see "XPS Serial Peripheral Interface (SPI) (v2.00b)"
-+
-+config SPI_NUC900
-+ tristate "Nuvoton NUC900 series SPI"
-+ depends on ARCH_W90X900 && EXPERIMENTAL
-+ select SPI_BITBANG
-+ help
-+ SPI driver for Nuvoton NUC900 series ARM SoCs
-+
-+#
-+# Add new SPI master controllers in alphabetical order above this line
-+#
-+
-+config SPI_DESIGNWARE
-+ tristate "DesignWare SPI controller core support"
-+ depends on SPI_MASTER
-+ help
-+ general driver for SPI controller core from DesignWare
-+
-+config SPI_DW_PCI
-+ tristate "PCI interface driver for DW SPI core"
-+ depends on SPI_DESIGNWARE && PCI
-+
-+config SPI_DW_MID_DMA
-+ bool "DMA support for DW SPI controller on Intel Moorestown platform"
-+ depends on SPI_DW_PCI && INTEL_MID_DMAC
-+
-+config SPI_DW_MMIO
-+ tristate "Memory-mapped io interface driver for DW SPI core"
-+ depends on SPI_DESIGNWARE && HAVE_CLK
-+
-+#
-+# There are lots of SPI device types, with sensors and memory
-+# being probably the most widely used ones.
-+#
-+comment "SPI Protocol Masters"
-+
-+config SPI_SPIDEV
-+ tristate "User mode SPI device driver support"
-+ depends on EXPERIMENTAL
-+ help
-+ This supports user mode SPI protocol drivers.
-+
-+ Note that this application programming interface is EXPERIMENTAL
-+ and hence SUBJECT TO CHANGE WITHOUT NOTICE while it stabilizes.
-+
-+config SPI_TLE62X0
-+ tristate "Infineon TLE62X0 (for power switching)"
-+ depends on SYSFS
-+ help
-+ SPI driver for Infineon TLE62X0 series line driver chips,
-+ such as the TLE6220, TLE6230 and TLE6240. This provides a
-+ sysfs interface, with each line presented as a kind of GPIO
-+ exposing both switch control and diagnostic feedback.
-+
-+config SPI_RB4XX_CPLD
-+ tristate "MikroTik RB4XX CPLD driver"
-+ depends on AR71XX_MACH_RB4XX
-+ help
-+ SPI driver for the Xilinx CPLD chip present on the
-+ MikroTik RB4xx boards.
-+
-+#
-+# Add new SPI protocol masters in alphabetical order above this line
-+#
-+
-+endif # SPI_MASTER
-+
-+# (slave support would go here)
-+
-+endif # SPI
-diff -Nur linux-2.6.39.orig/drivers/spi/Makefile linux-2.6.39/drivers/spi/Makefile
---- linux-2.6.39.orig/drivers/spi/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/spi/Makefile 2011-08-23 15:10:24.199233941 +0200
-@@ -10,6 +10,7 @@
-
- # SPI master controller drivers (bus)
- obj-$(CONFIG_SPI_ALTERA) += spi_altera.o
-+obj-$(CONFIG_SPI_AR71XX) += ar71xx_spi.o
- obj-$(CONFIG_SPI_ATMEL) += atmel_spi.o
- obj-$(CONFIG_SPI_ATH79) += ath79_spi.o
- obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.o
-@@ -54,6 +55,7 @@
- obj-$(CONFIG_SPI_SH_MSIOF) += spi_sh_msiof.o
- obj-$(CONFIG_SPI_STMP3XXX) += spi_stmp.o
- obj-$(CONFIG_SPI_NUC900) += spi_nuc900.o
-+obj-$(CONFIG_SPI_RB4XX) += rb4xx_spi.o
-
- # special build for s3c24xx spi driver with fiq support
- spi_s3c24xx_hw-y := spi_s3c24xx.o
-@@ -62,6 +64,7 @@
- # ... add above this line ...
-
- # SPI protocol drivers (device/link on bus)
-+obj-$(CONFIG_SPI_RB4XX_CPLD) += spi_rb4xx_cpld.o
- obj-$(CONFIG_SPI_SPIDEV) += spidev.o
- obj-$(CONFIG_SPI_TLE62X0) += tle62x0.o
- # ... add above this line ...
-diff -Nur linux-2.6.39.orig/drivers/spi/Makefile.orig linux-2.6.39/drivers/spi/Makefile.orig
---- linux-2.6.39.orig/drivers/spi/Makefile.orig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/Makefile.orig 2011-08-23 15:10:11.300479072 +0200
-@@ -0,0 +1,75 @@
-+#
-+# Makefile for kernel SPI drivers.
-+#
-+
-+ccflags-$(CONFIG_SPI_DEBUG) := -DDEBUG
-+
-+# small core, mostly translating board-specific
-+# config declarations into driver model code
-+obj-$(CONFIG_SPI_MASTER) += spi.o
-+
-+# SPI master controller drivers (bus)
-+obj-$(CONFIG_SPI_ALTERA) += spi_altera.o
-+obj-$(CONFIG_SPI_AR71XX) += ar71xx_spi.o
-+obj-$(CONFIG_SPI_ATMEL) += atmel_spi.o
-+obj-$(CONFIG_SPI_ATH79) += ath79_spi.o
-+obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.o
-+obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o
-+obj-$(CONFIG_SPI_AU1550) += au1550_spi.o
-+obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o
-+obj-$(CONFIG_SPI_COLDFIRE_QSPI) += coldfire_qspi.o
-+obj-$(CONFIG_SPI_DAVINCI) += davinci_spi.o
-+obj-$(CONFIG_SPI_DESIGNWARE) += dw_spi.o
-+obj-$(CONFIG_SPI_DW_PCI) += dw_spi_midpci.o
-+dw_spi_midpci-objs := dw_spi_pci.o dw_spi_mid.o
-+obj-$(CONFIG_SPI_DW_MMIO) += dw_spi_mmio.o
-+obj-$(CONFIG_SPI_EP93XX) += ep93xx_spi.o
-+obj-$(CONFIG_SPI_GPIO) += spi_gpio.o
-+obj-$(CONFIG_SPI_IMX) += spi_imx.o
-+obj-$(CONFIG_SPI_LM70_LLP) += spi_lm70llp.o
-+obj-$(CONFIG_SPI_PXA2XX) += pxa2xx_spi.o
-+obj-$(CONFIG_SPI_PXA2XX_PCI) += pxa2xx_spi_pci.o
-+obj-$(CONFIG_SPI_OC_TINY) += spi_oc_tiny.o
-+obj-$(CONFIG_SPI_OMAP_UWIRE) += omap_uwire.o
-+obj-$(CONFIG_SPI_OMAP24XX) += omap2_mcspi.o
-+obj-$(CONFIG_SPI_OMAP_100K) += omap_spi_100k.o
-+obj-$(CONFIG_SPI_ORION) += orion_spi.o
-+obj-$(CONFIG_SPI_PL022) += amba-pl022.o
-+obj-$(CONFIG_SPI_MPC512x_PSC) += mpc512x_psc_spi.o
-+obj-$(CONFIG_SPI_MPC52xx_PSC) += mpc52xx_psc_spi.o
-+obj-$(CONFIG_SPI_MPC52xx) += mpc52xx_spi.o
-+obj-$(CONFIG_SPI_FSL_LIB) += spi_fsl_lib.o
-+obj-$(CONFIG_SPI_FSL_ESPI) += spi_fsl_espi.o
-+obj-$(CONFIG_SPI_FSL_SPI) += spi_fsl_spi.o
-+obj-$(CONFIG_SPI_PPC4xx) += spi_ppc4xx.o
-+obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi_s3c24xx_gpio.o
-+obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx_hw.o
-+obj-$(CONFIG_SPI_S3C64XX) += spi_s3c64xx.o
-+obj-$(CONFIG_SPI_TEGRA) += spi_tegra.o
-+obj-$(CONFIG_SPI_TI_SSP) += ti-ssp-spi.o
-+obj-$(CONFIG_SPI_TOPCLIFF_PCH) += spi_topcliff_pch.o
-+obj-$(CONFIG_SPI_TXX9) += spi_txx9.o
-+obj-$(CONFIG_SPI_XILINX) += xilinx_spi.o
-+obj-$(CONFIG_SPI_SH) += spi_sh.o
-+obj-$(CONFIG_SPI_SH_SCI) += spi_sh_sci.o
-+obj-$(CONFIG_SPI_SH_MSIOF) += spi_sh_msiof.o
-+obj-$(CONFIG_SPI_STMP3XXX) += spi_stmp.o
-+obj-$(CONFIG_SPI_NUC900) += spi_nuc900.o
-+
-+# special build for s3c24xx spi driver with fiq support
-+spi_s3c24xx_hw-y := spi_s3c24xx.o
-+spi_s3c24xx_hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi_s3c24xx_fiq.o
-+
-+# ... add above this line ...
-+
-+# SPI protocol drivers (device/link on bus)
-+obj-$(CONFIG_SPI_RB4XX_CPLD) += spi_rb4xx_cpld.o
-+obj-$(CONFIG_SPI_SPIDEV) += spidev.o
-+obj-$(CONFIG_SPI_TLE62X0) += tle62x0.o
-+# ... add above this line ...
-+
-+# SPI slave controller drivers (upstream link)
-+# ... add above this line ...
-+
-+# SPI slave drivers (protocol for that link)
-+# ... add above this line ...
diff -Nur linux-2.6.39.orig/drivers/spi/pb44_spi.c linux-2.6.39/drivers/spi/pb44_spi.c
--- linux-2.6.39.orig/drivers/spi/pb44_spi.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/pb44_spi.c 2011-04-27 12:19:22.317665385 +0200
++++ linux-2.6.39/drivers/spi/pb44_spi.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,299 @@
+/*
+ * Atheros PB44 board SPI controller driver
@@ -24415,7 +21374,7 @@ diff -Nur linux-2.6.39.orig/drivers/spi/pb44_spi.c linux-2.6.39/drivers/spi/pb44
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/spi/rb4xx_spi.c linux-2.6.39/drivers/spi/rb4xx_spi.c
--- linux-2.6.39.orig/drivers/spi/rb4xx_spi.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/rb4xx_spi.c 2011-04-27 12:19:22.307664943 +0200
++++ linux-2.6.39/drivers/spi/rb4xx_spi.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,474 @@
+/*
+ * SPI controller driver for the Mikrotik RB4xx boards
@@ -24893,7 +21852,7 @@ diff -Nur linux-2.6.39.orig/drivers/spi/rb4xx_spi.c linux-2.6.39/drivers/spi/rb4
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/spi/spi_rb4xx_cpld.c linux-2.6.39/drivers/spi/spi_rb4xx_cpld.c
--- linux-2.6.39.orig/drivers/spi/spi_rb4xx_cpld.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/spi_rb4xx_cpld.c 2011-04-27 12:19:22.317665385 +0200
++++ linux-2.6.39/drivers/spi/spi_rb4xx_cpld.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,440 @@
+/*
+ * SPI driver for the CPLD chip on the Mikrotik RB4xx boards
@@ -25337,7 +22296,7 @@ diff -Nur linux-2.6.39.orig/drivers/spi/spi_rb4xx_cpld.c linux-2.6.39/drivers/sp
+MODULE_LICENSE("GPL v2");
diff -Nur linux-2.6.39.orig/drivers/spi/spi_vsc7385.c linux-2.6.39/drivers/spi/spi_vsc7385.c
--- linux-2.6.39.orig/drivers/spi/spi_vsc7385.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/spi/spi_vsc7385.c 2011-04-27 12:19:22.317665385 +0200
++++ linux-2.6.39/drivers/spi/spi_vsc7385.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,621 @@
+/*
+ * SPI driver for the Vitesse VSC7385 ethernet switch
@@ -25962,7 +22921,7 @@ diff -Nur linux-2.6.39.orig/drivers/spi/spi_vsc7385.c linux-2.6.39/drivers/spi/s
+
diff -Nur linux-2.6.39.orig/drivers/tty/serial/ar933x_uart.c linux-2.6.39/drivers/tty/serial/ar933x_uart.c
--- linux-2.6.39.orig/drivers/tty/serial/ar933x_uart.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/tty/serial/ar933x_uart.c 2011-08-06 09:32:37.098016752 +0200
++++ linux-2.6.39/drivers/tty/serial/ar933x_uart.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,688 @@
+/*
+ * Atheros AR933X SoC built-in UART driver
@@ -26652,9 +23611,40 @@ diff -Nur linux-2.6.39.orig/drivers/tty/serial/ar933x_uart.c linux-2.6.39/driver
+MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRIVER_NAME);
+diff -Nur linux-2.6.39.orig/drivers/usb/host/Kconfig linux-2.6.39/drivers/usb/host/Kconfig
+--- linux-2.6.39.orig/drivers/usb/host/Kconfig 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/usb/host/Kconfig 2011-08-24 18:17:24.000000000 +0200
+@@ -129,6 +129,13 @@
+ config USB_FSL_MPH_DR_OF
+ tristate
+
++config USB_EHCI_AR71XX
++ bool "USB EHCI support for AR71xx"
++ depends on USB_EHCI_HCD && ATHEROS_AR71XX
++ default y
++ help
++ Support for Atheros AR71xx built-in EHCI controller
++
+ config USB_EHCI_FSL
+ bool "Support for Freescale on-chip EHCI USB controller"
+ depends on USB_EHCI_HCD && FSL_SOC
+@@ -287,6 +294,13 @@
+ Enables support for the on-chip OHCI controller on
+ OMAP3 and later chips.
+
++config USB_OHCI_AR71XX
++ bool "USB OHCI support for Atheros AR71xx"
++ depends on USB_OHCI_HCD && ATHEROS_AR71XX
++ default y
++ help
++ Support for Atheros AR71xx built-in OHCI controller
++
+ config USB_OHCI_HCD_PPC_SOC
+ bool "OHCI support for on-chip PPC USB controller"
+ depends on USB_OHCI_HCD && (STB03xxx || PPC_MPC52xx)
diff -Nur linux-2.6.39.orig/drivers/usb/host/ehci-ar71xx.c linux-2.6.39/drivers/usb/host/ehci-ar71xx.c
--- linux-2.6.39.orig/drivers/usb/host/ehci-ar71xx.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/usb/host/ehci-ar71xx.c 2011-04-27 12:19:22.267661616 +0200
++++ linux-2.6.39/drivers/usb/host/ehci-ar71xx.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,242 @@
+/*
+ * Bus Glue for Atheros AR71xx built-in EHCI controller.
@@ -26900,7 +23890,7 @@ diff -Nur linux-2.6.39.orig/drivers/usb/host/ehci-ar71xx.c linux-2.6.39/drivers/
+};
diff -Nur linux-2.6.39.orig/drivers/usb/host/ehci-hcd.c linux-2.6.39/drivers/usb/host/ehci-hcd.c
--- linux-2.6.39.orig/drivers/usb/host/ehci-hcd.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/usb/host/ehci-hcd.c 2011-08-22 16:21:42.807985568 +0200
++++ linux-2.6.39/drivers/usb/host/ehci-hcd.c 2011-08-24 18:17:24.000000000 +0200
@@ -1265,6 +1265,11 @@
#define PLATFORM_DRIVER tegra_ehci_driver
#endif
@@ -26913,40 +23903,9 @@ diff -Nur linux-2.6.39.orig/drivers/usb/host/ehci-hcd.c linux-2.6.39/drivers/usb
#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
!defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
!defined(XILINX_OF_PLATFORM_DRIVER)
-diff -Nur linux-2.6.39.orig/drivers/usb/host/Kconfig linux-2.6.39/drivers/usb/host/Kconfig
---- linux-2.6.39.orig/drivers/usb/host/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/usb/host/Kconfig 2011-08-22 16:21:42.767983341 +0200
-@@ -129,6 +129,13 @@
- config USB_FSL_MPH_DR_OF
- tristate
-
-+config USB_EHCI_AR71XX
-+ bool "USB EHCI support for AR71xx"
-+ depends on USB_EHCI_HCD && ATHEROS_AR71XX
-+ default y
-+ help
-+ Support for Atheros AR71xx built-in EHCI controller
-+
- config USB_EHCI_FSL
- bool "Support for Freescale on-chip EHCI USB controller"
- depends on USB_EHCI_HCD && FSL_SOC
-@@ -287,6 +294,13 @@
- Enables support for the on-chip OHCI controller on
- OMAP3 and later chips.
-
-+config USB_OHCI_AR71XX
-+ bool "USB OHCI support for Atheros AR71xx"
-+ depends on USB_OHCI_HCD && ATHEROS_AR71XX
-+ default y
-+ help
-+ Support for Atheros AR71xx built-in OHCI controller
-+
- config USB_OHCI_HCD_PPC_SOC
- bool "OHCI support for on-chip PPC USB controller"
- depends on USB_OHCI_HCD && (STB03xxx || PPC_MPC52xx)
diff -Nur linux-2.6.39.orig/drivers/usb/host/ohci-ar71xx.c linux-2.6.39/drivers/usb/host/ohci-ar71xx.c
--- linux-2.6.39.orig/drivers/usb/host/ohci-ar71xx.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/usb/host/ohci-ar71xx.c 2011-04-27 12:19:22.267661616 +0200
++++ linux-2.6.39/drivers/usb/host/ohci-ar71xx.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,165 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
@@ -27115,7 +24074,7 @@ diff -Nur linux-2.6.39.orig/drivers/usb/host/ohci-ar71xx.c linux-2.6.39/drivers/
+};
diff -Nur linux-2.6.39.orig/drivers/usb/host/ohci-hcd.c linux-2.6.39/drivers/usb/host/ohci-hcd.c
--- linux-2.6.39.orig/drivers/usb/host/ohci-hcd.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/usb/host/ohci-hcd.c 2011-08-22 16:21:42.847983209 +0200
++++ linux-2.6.39/drivers/usb/host/ohci-hcd.c 2011-08-24 18:17:24.000000000 +0200
@@ -1105,6 +1105,11 @@
#define PLATFORM_DRIVER ohci_hcd_cns3xxx_driver
#endif
@@ -27128,9 +24087,37 @@ diff -Nur linux-2.6.39.orig/drivers/usb/host/ohci-hcd.c linux-2.6.39/drivers/usb
#if !defined(PCI_DRIVER) && \
!defined(PLATFORM_DRIVER) && \
!defined(OMAP1_PLATFORM_DRIVER) && \
+diff -Nur linux-2.6.39.orig/drivers/watchdog/Kconfig linux-2.6.39/drivers/watchdog/Kconfig
+--- linux-2.6.39.orig/drivers/watchdog/Kconfig 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/watchdog/Kconfig 2011-08-24 18:17:24.000000000 +0200
+@@ -990,6 +990,13 @@
+ To compile this driver as a loadable module, choose M here.
+ The module will be called bcm63xx_wdt.
+
++config AR71XX_WDT
++ tristate "Atheros AR71xx Watchdog Timer"
++ depends on ATHEROS_AR71XX
++ help
++ Hardware driver for the built-in watchdog timer on the Atheros
++ AR71xx SoCs.
++
+ # PARISC Architecture
+
+ # POWERPC Architecture
+diff -Nur linux-2.6.39.orig/drivers/watchdog/Makefile linux-2.6.39/drivers/watchdog/Makefile
+--- linux-2.6.39.orig/drivers/watchdog/Makefile 2011-05-19 06:06:34.000000000 +0200
++++ linux-2.6.39/drivers/watchdog/Makefile 2011-08-24 18:17:24.000000000 +0200
+@@ -119,6 +119,7 @@
+ obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
+ obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o
+ obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
++obj-$(CONFIG_AR71XX_WDT) += ar71xx_wdt.o
+ obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
+ obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
+ obj-$(CONFIG_OCTEON_WDT) += octeon-wdt.o
diff -Nur linux-2.6.39.orig/drivers/watchdog/ar71xx_wdt.c linux-2.6.39/drivers/watchdog/ar71xx_wdt.c
--- linux-2.6.39.orig/drivers/watchdog/ar71xx_wdt.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/drivers/watchdog/ar71xx_wdt.c 2011-08-06 09:32:37.118022037 +0200
++++ linux-2.6.39/drivers/watchdog/ar71xx_wdt.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,299 @@
+/*
+ * Driver for the Atheros AR71xx SoC's built-in hardware watchdog timer.
@@ -27431,37 +24418,9 @@ diff -Nur linux-2.6.39.orig/drivers/watchdog/ar71xx_wdt.c linux-2.6.39/drivers/w
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
+MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
-diff -Nur linux-2.6.39.orig/drivers/watchdog/Kconfig linux-2.6.39/drivers/watchdog/Kconfig
---- linux-2.6.39.orig/drivers/watchdog/Kconfig 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/watchdog/Kconfig 2011-08-22 16:22:00.627980889 +0200
-@@ -990,6 +990,13 @@
- To compile this driver as a loadable module, choose M here.
- The module will be called bcm63xx_wdt.
-
-+config AR71XX_WDT
-+ tristate "Atheros AR71xx Watchdog Timer"
-+ depends on ATHEROS_AR71XX
-+ help
-+ Hardware driver for the built-in watchdog timer on the Atheros
-+ AR71xx SoCs.
-+
- # PARISC Architecture
-
- # POWERPC Architecture
-diff -Nur linux-2.6.39.orig/drivers/watchdog/Makefile linux-2.6.39/drivers/watchdog/Makefile
---- linux-2.6.39.orig/drivers/watchdog/Makefile 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/drivers/watchdog/Makefile 2011-08-22 16:22:00.647986892 +0200
-@@ -119,6 +119,7 @@
- obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
- obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o
- obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
-+obj-$(CONFIG_AR71XX_WDT) += ar71xx_wdt.o
- obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
- obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
- obj-$(CONFIG_OCTEON_WDT) += octeon-wdt.o
diff -Nur linux-2.6.39.orig/include/linux/ath9k_platform.h linux-2.6.39/include/linux/ath9k_platform.h
--- linux-2.6.39.orig/include/linux/ath9k_platform.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/ath9k_platform.h 2011-08-06 09:32:36.638021723 +0200
++++ linux-2.6.39/include/linux/ath9k_platform.h 2011-08-24 18:17:24.000000000 +0200
@@ -23,6 +23,15 @@
struct ath9k_platform_data {
@@ -27480,7 +24439,7 @@ diff -Nur linux-2.6.39.orig/include/linux/ath9k_platform.h linux-2.6.39/include/
#endif /* _LINUX_ATH9K_PLATFORM_H */
diff -Nur linux-2.6.39.orig/include/linux/ip.h linux-2.6.39/include/linux/ip.h
--- linux-2.6.39.orig/include/linux/ip.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/ip.h 2011-08-24 05:53:21.239229027 +0200
++++ linux-2.6.39/include/linux/ip.h 2011-08-24 18:17:24.000000000 +0200
@@ -102,7 +102,7 @@
__be32 saddr;
__be32 daddr;
@@ -27492,7 +24451,7 @@ diff -Nur linux-2.6.39.orig/include/linux/ip.h linux-2.6.39/include/linux/ip.h
#include <linux/skbuff.h>
diff -Nur linux-2.6.39.orig/include/linux/ipv6.h linux-2.6.39/include/linux/ipv6.h
--- linux-2.6.39.orig/include/linux/ipv6.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/ipv6.h 2011-08-24 05:53:21.289229059 +0200
++++ linux-2.6.39/include/linux/ipv6.h 2011-08-24 18:17:24.000000000 +0200
@@ -126,7 +126,7 @@
struct in6_addr saddr;
@@ -27504,7 +24463,7 @@ diff -Nur linux-2.6.39.orig/include/linux/ipv6.h linux-2.6.39/include/linux/ipv6
/*
diff -Nur linux-2.6.39.orig/include/linux/myloader.h linux-2.6.39/include/linux/myloader.h
--- linux-2.6.39.orig/include/linux/myloader.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/include/linux/myloader.h 2011-08-24 03:12:08.307985040 +0200
++++ linux-2.6.39/include/linux/myloader.h 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,120 @@
+/*
+ * Compex's MyLoader specific definitions
@@ -27628,7 +24587,7 @@ diff -Nur linux-2.6.39.orig/include/linux/myloader.h linux-2.6.39/include/linux/
+#endif /* _MYLOADER_H_*/
diff -Nur linux-2.6.39.orig/include/linux/netdevice.h linux-2.6.39/include/linux/netdevice.h
--- linux-2.6.39.orig/include/linux/netdevice.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/netdevice.h 2011-08-22 22:00:06.937981400 +0200
++++ linux-2.6.39/include/linux/netdevice.h 2011-08-24 18:17:24.000000000 +0200
@@ -1182,6 +1182,7 @@
void *ax25_ptr; /* AX.25 specific data */
struct wireless_dev *ieee80211_ptr; /* IEEE 802.11 specific data,
@@ -27639,7 +24598,7 @@ diff -Nur linux-2.6.39.orig/include/linux/netdevice.h linux-2.6.39/include/linux
* Cache lines mostly used on receive path (including eth_type_trans())
diff -Nur linux-2.6.39.orig/include/linux/nxp_74hc153.h linux-2.6.39/include/linux/nxp_74hc153.h
--- linux-2.6.39.orig/include/linux/nxp_74hc153.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/include/linux/nxp_74hc153.h 2011-04-27 12:19:21.817661653 +0200
++++ linux-2.6.39/include/linux/nxp_74hc153.h 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,24 @@
+/*
+ * NXP 74HC153 - Dual 4-input multiplexer defines
@@ -27667,7 +24626,7 @@ diff -Nur linux-2.6.39.orig/include/linux/nxp_74hc153.h linux-2.6.39/include/lin
+#endif /* _NXP_74HC153_H */
diff -Nur linux-2.6.39.orig/include/linux/phy.h linux-2.6.39/include/linux/phy.h
--- linux-2.6.39.orig/include/linux/phy.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/phy.h 2011-08-22 22:00:06.867980866 +0200
++++ linux-2.6.39/include/linux/phy.h 2011-08-24 18:17:24.000000000 +0200
@@ -332,6 +332,20 @@
void (*adjust_link)(struct net_device *dev);
@@ -27699,7 +24658,7 @@ diff -Nur linux-2.6.39.orig/include/linux/phy.h linux-2.6.39/include/linux/phy.h
int phy_start_interrupts(struct phy_device *phydev);
diff -Nur linux-2.6.39.orig/include/linux/spi/spi.h linux-2.6.39/include/linux/spi/spi.h
--- linux-2.6.39.orig/include/linux/spi/spi.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/spi/spi.h 2011-08-23 15:10:37.559229523 +0200
++++ linux-2.6.39/include/linux/spi/spi.h 2011-08-24 18:17:24.000000000 +0200
@@ -441,6 +441,8 @@
dma_addr_t rx_dma;
@@ -27719,7 +24678,7 @@ diff -Nur linux-2.6.39.orig/include/linux/spi/spi.h linux-2.6.39/include/linux/s
* last transfer ... allowing things like "read 16 bit length L"
diff -Nur linux-2.6.39.orig/include/linux/spi/vsc7385.h linux-2.6.39/include/linux/spi/vsc7385.h
--- linux-2.6.39.orig/include/linux/spi/vsc7385.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/include/linux/spi/vsc7385.h 2011-04-27 12:19:21.817661653 +0200
++++ linux-2.6.39/include/linux/spi/vsc7385.h 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,19 @@
+/*
+ * Platform data definition for the Vitesse VSC7385 ethernet switch driver
@@ -27742,7 +24701,7 @@ diff -Nur linux-2.6.39.orig/include/linux/spi/vsc7385.h linux-2.6.39/include/lin
+};
diff -Nur linux-2.6.39.orig/include/linux/switch.h linux-2.6.39/include/linux/switch.h
--- linux-2.6.39.orig/include/linux/switch.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/include/linux/switch.h 2011-08-22 22:09:59.799231408 +0200
++++ linux-2.6.39/include/linux/switch.h 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,204 @@
+/*
+ * switch.h: Switch configuration API
@@ -27950,7 +24909,7 @@ diff -Nur linux-2.6.39.orig/include/linux/switch.h linux-2.6.39/include/linux/sw
+#endif
diff -Nur linux-2.6.39.orig/include/linux/tcp.h linux-2.6.39/include/linux/tcp.h
--- linux-2.6.39.orig/include/linux/tcp.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/tcp.h 2011-08-24 05:53:21.379228748 +0200
++++ linux-2.6.39/include/linux/tcp.h 2011-08-24 18:17:24.000000000 +0200
@@ -54,7 +54,7 @@
__be16 window;
__sum16 check;
@@ -27962,7 +24921,7 @@ diff -Nur linux-2.6.39.orig/include/linux/tcp.h linux-2.6.39/include/linux/tcp.h
* The union cast uses a gcc extension to avoid aliasing problems
diff -Nur linux-2.6.39.orig/include/linux/udp.h linux-2.6.39/include/linux/udp.h
--- linux-2.6.39.orig/include/linux/udp.h 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/include/linux/udp.h 2011-08-24 05:53:21.428824967 +0200
++++ linux-2.6.39/include/linux/udp.h 2011-08-24 18:17:24.000000000 +0200
@@ -24,7 +24,7 @@
__be16 dest;
__be16 len;
@@ -27974,7 +24933,7 @@ diff -Nur linux-2.6.39.orig/include/linux/udp.h linux-2.6.39/include/linux/udp.h
#define UDP_CORK 1 /* Never send partially complete segments */
diff -Nur linux-2.6.39.orig/net/dsa/mv88e6063.c linux-2.6.39/net/dsa/mv88e6063.c
--- linux-2.6.39.orig/net/dsa/mv88e6063.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39/net/dsa/mv88e6063.c 2011-04-27 12:19:21.827661792 +0200
++++ linux-2.6.39/net/dsa/mv88e6063.c 2011-08-24 18:17:24.000000000 +0200
@@ -0,0 +1,294 @@
+/*
+ * net/dsa/mv88e6063.c - Driver for Marvell 88e6063 switch chips
@@ -28272,7 +25231,7 @@ diff -Nur linux-2.6.39.orig/net/dsa/mv88e6063.c linux-2.6.39/net/dsa/mv88e6063.c
+module_exit(mv88e6063_cleanup);
diff -Nur linux-2.6.39.orig/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c linux-2.6.39/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
--- linux-2.6.39.orig/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2011-05-19 06:06:34.000000000 +0200
-+++ linux-2.6.39/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2011-08-24 05:53:21.549229118 +0200
++++ linux-2.6.39/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2011-08-24 18:17:24.000000000 +0200
@@ -14,6 +14,7 @@
#include <linux/skbuff.h>
#include <linux/icmp.h>