diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/init.c linux-2.6.33.2/arch/mips/adm8668/init.c
--- original/linux-2.6.33.2/arch/mips/adm8668/init.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/init.c	2010-06-02 18:47:07.000000000 -0400
@@ -0,0 +1,18 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <adm8668.h>
+
+const char *get_system_type(void)
+{
+        unsigned long chipid = ADM8668_CONFIG_REG(ADM8668_CR0);
+        int adj = (ADM8668_CONFIG_REG(ADM8668_CR3) >> 11) & 0xf;
+        int product, revision, mhz;
+	static char ret[32];
+
+        product = chipid >> 16;
+        revision = chipid & 0xffff;
+	mhz = (SYS_CLOCK/1000000) + (adj * 5);
+
+	snprintf(ret, sizeof(ret), "ADM%xr%x %dMHz", product, revision, mhz);
+	return ret;
+}
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/irq.c linux-2.6.33.2/arch/mips/adm8668/irq.c
--- original/linux-2.6.33.2/arch/mips/adm8668/irq.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/irq.c	2010-04-23 17:19:55.000000000 -0400
@@ -0,0 +1,126 @@
+#include <linux/init.h>
+#include <linux/kernel_stat.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/random.h>
+#include <linux/pm.h>
+#include <linux/irq.h>
+#include <asm/mipsregs.h>
+#include <asm/irq_cpu.h>
+#include <asm/irq.h>
+#include <adm8668.h>
+
+
+void enable_adm8668_irq(unsigned int irq);
+void disable_adm8668_irq(unsigned int irq);
+void adm8668_irq_cascade(void);
+
+void plat_irq_dispatch(void)
+{
+	unsigned int pending;
+
+	pending = read_c0_cause() & read_c0_status() & ST0_IM;
+
+	// timer interrupt
+	if (pending & STATUSF_IP7)
+		do_IRQ(MIPS_CPU_IRQ_BASE + 7);
+	if (pending & STATUSF_IP2)
+		adm8668_irq_cascade();
+}
+
+/* 
+ * System irq dispatch
+ */
+void adm8668_irq_cascade()
+{
+	int i;
+	unsigned long intsrc;
+
+	intsrc = ADM8668_INTC_REG(IRQ_STATUS_REG) & IRQ_MASK;
+	for (i = 0; intsrc; intsrc >>= 1, i++)
+		if (intsrc & 0x1)
+			do_IRQ(i);
+}
+
+/*
+ * irq enable
+ */
+static __inline void _irq_enable(int irql)
+{
+	ADM8668_INTC_REG(IRQ_ENABLE_REG) = (1 << irql);
+}
+
+
+/*
+ * irq disable
+ */
+static __inline void _irq_disable(int irql)
+{
+	ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irql);
+}
+
+
+/* 
+ * enable 8668 irq 
+ */
+void enable_adm8668_irq(unsigned int irq)
+{
+	if ((irq < 0) || (irq > NR_IRQS))
+		return;
+
+	_irq_enable(irq);
+}
+
+
+/*
+ * disable 8668 irq 
+ */
+void disable_adm8668_irq(unsigned int irq)
+{
+	if ((irq < 0) || (irq > NR_IRQS)) 
+		return;
+
+	_irq_disable(irq);
+}
+
+static inline void ack_adm8668_irq(unsigned int irq_nr)
+{
+	ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irq_nr);
+}
+
+/*
+ * system irq type
+ */
+
+static struct irq_chip adm8668_irq_type = {
+	.name = "adm8668",
+	.ack = ack_adm8668_irq,
+	.mask = disable_adm8668_irq,
+	.unmask = enable_adm8668_irq
+};
+
+/*
+ * irq init
+ */
+void __init init_adm8668_irqs (void)
+{
+	int i;
+
+	for (i = 0; i <= INT_LVL_MAX; i++)
+		set_irq_chip_and_handler(i, &adm8668_irq_type,
+			handle_level_irq);
+
+	/* hw0 is where our interrupts are uh.. interrupted at. */
+	set_c0_status(IE_IRQ0);
+}
+
+/*
+ * system init
+ */
+void __init arch_init_irq(void)
+{
+	mips_cpu_irq_init();
+	init_adm8668_irqs();
+}
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/irq-stub.c linux-2.6.33.2/arch/mips/adm8668/irq-stub.c
--- original/linux-2.6.33.2/arch/mips/adm8668/irq-stub.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/irq-stub.c	2010-04-11 16:19:50.000000000 -0400
@@ -0,0 +1,67 @@
+/*
+ *  Copyright (C) 2004 Florian Schirmer <jolt@tuxbox.org>
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <asm/irq_cpu.h>
+
+extern irq_desc_t irq_desc[];
+
+void adm8668_hw0_dispatch(void)
+{
+	printk("hw0 dispatch\n");
+}
+
+void plat_irq_dispatch(void)
+{
+	u32 cause;
+
+	cause = read_c0_cause() & read_c0_status() & CAUSEF_IP;
+
+	clear_c0_status(cause);
+
+	// timer interrupt
+	if (cause & CAUSEF_IP7)
+		do_IRQ(7);
+
+	if (cause & CAUSEF_IP2) {
+		printk("hw0 interrupt\n");
+		do_IRQ(2);
+	}
+	if (cause & CAUSEF_IP3)
+		do_IRQ(3);
+	if (cause & CAUSEF_IP4)
+		do_IRQ(4);
+	if (cause & CAUSEF_IP5)
+		do_IRQ(5);
+	if (cause & CAUSEF_IP6)
+		do_IRQ(6);
+}
+
+void __init arch_init_irq(void)
+{
+	mips_cpu_irq_init();
+	setup_irq(2, &adm8668_hw0_dispatch);
+}
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/Makefile linux-2.6.33.2/arch/mips/adm8668/Makefile
--- original/linux-2.6.33.2/arch/mips/adm8668/Makefile	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/Makefile	2010-04-13 13:32:31.000000000 -0400
@@ -0,0 +1,7 @@
+#
+# something witty  --neutronscott
+#
+
+obj-y	 	:= init.o mipsIRQ.o irq.o mem.o pci.o prom.o time.o platform.o serial.o
+
+EXTRA_CFLAGS += -Werror
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/mem.c linux-2.6.33.2/arch/mips/adm8668/mem.c
--- original/linux-2.6.33.2/arch/mips/adm8668/mem.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/mem.c	2010-06-02 18:15:16.000000000 -0400
@@ -0,0 +1,18 @@
+/*
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <asm/addrspace.h>
+#include <asm/bootinfo.h>
+#include <asm/io.h>
+
+extern char _end;
+#define PFN_ALIGN(x)    (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK)
+
+void __init plat_mem_setup(void)
+{
+	/* i dunno why yet, ;\ */
+	add_memory_region(PFN_ALIGN(_end) & 0x1fffffff, (64*1024*1024)-1, BOOT_MEM_RAM);
+}
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/mipsIRQ.S linux-2.6.33.2/arch/mips/adm8668/mipsIRQ.S
--- original/linux-2.6.33.2/arch/mips/adm8668/mipsIRQ.S	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/mipsIRQ.S	2010-04-11 16:58:17.000000000 -0400
@@ -0,0 +1,95 @@
+/*
+ * Carsten Langgaard, carstenl@mips.com
+ * Copyright (C) 1999, 2000 MIPS Technologies, Inc.  All rights reserved.
+ *
+ * ########################################################################
+ *
+ *  This program is free software; you can distribute it and/or modify it
+ *  under the terms of the GNU General Public License (Version 2) as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ *  for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * ########################################################################
+ *
+ * Interrupt exception dispatch code.
+ *
+ */
+
+#include <asm/asm.h>
+#include <asm/mipsregs.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+
+/* A lot of complication here is taken away because:
+ *
+ * 1) We handle one interrupt and return, sitting in a loop and moving across
+ *    all the pending IRQ bits in the cause register is _NOT_ the answer, the
+ *    common case is one pending IRQ so optimize in that direction.
+ *
+ * 2) We need not check against bits in the status register IRQ mask, that
+ *    would make this routine slow as hell.
+ *
+ * 3) Linux only thinks in terms of all IRQs on or all IRQs off, nothing in
+ *    between like BSD spl() brain-damage.
+ *
+ * Furthermore, the IRQs on the MIPS board look basically (barring software
+ * IRQs which we don't use at all and all external interrupt sources are
+ * combined together on hardware interrupt 0 (MIPS IRQ 2)) like:
+ *
+ *	MIPS IRQ	Source
+ *      --------        ------
+ *             0	Software (ignored)
+ *             1        Software (ignored)
+ *             2        Combined hardware interrupt (hw0)
+ *             3        Hardware (ignored)
+ *             4        Hardware (ignored)
+ *             5        Hardware (ignored)
+ *             6        Hardware (ignored)
+ *             7        R4k timer (what we use)
+ *
+ * Note: On the SEAD board thing are a little bit different.
+ *       Here IRQ 2 (hw0) is wired to the UART0 and IRQ 3 (hw1) is wired
+ *       wired to UART1.
+ *	
+ * We handle the IRQ according to _our_ priority which is:
+ *
+ * Highest ----     R4k Timer
+ * Lowest  ----     Combined hardware interrupt
+ *
+ * then we just return, if multiple IRQs are pending then we will just take
+ * another exception, big deal.
+ */
+
+	.text
+	.set	noreorder
+	.set	noat
+	.align	5
+
+LEAF(mips_int_lock)
+	.set noreorder
+	mfc0	v0, CP0_STATUS
+	li		v1, ~STATUSB_IP9
+	and		v1, v1, v0
+	mtc0	v1, CP0_STATUS
+	j		ra
+	and		v0, v0, STATUSB_IP9
+	.set reorder
+END(mips_int_lock)
+
+
+LEAF(mips_int_unlock)
+	mfc0	v0, CP0_STATUS
+	and		a0, a0, STATUSB_IP9
+	or		v0, v0, a0
+	mtc0	v0, CP0_STATUS
+	j		ra
+	nop
+END(mips_int_unlock)
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/pci.c linux-2.6.33.2/arch/mips/adm8668/pci.c
--- original/linux-2.6.33.2/arch/mips/adm8668/pci.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/pci.c	2010-05-28 13:55:12.000000000 -0400
@@ -0,0 +1,237 @@
+/************************************************************************
+ *
+ *    Copyright (c) 2005
+ *    Infineon Technologies AG
+ *    St. Martin Strasse 53; 81669 Muenchen; Germany
+ *
+ *    THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED
+ *    NON-EXCLUSIVE, WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE
+ *    AND SUBLICENSE THIS SOFTWARE IS FREE OF CHARGE.
+ *    
+ *    THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY
+ *    DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR
+ *    IMPLIED, INCLUDING WITHOUT LIMI?TATION, WAR?RANTIES OR REPRESENTATIONS
+ *    OF WORKMANSHIP, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+ *    DURABILITY, THAT THE OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR
+ *    FREE OR FREE OF NY THIRD PARTY CALIMS, INCLUDING WITHOUT LIMITATION
+ *    CLAIMS OF THIRD PARTY INTELLECTUAL PROPERTY INFRINGEMENT.
+ *    
+ *    EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND
+ *    EXCEPT FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE
+ *    FOR ANY CLAIM OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT,
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *    --------------------------------------------------------------------
+ *    
+ *        Project : ADM8668
+ *        Block   : 
+ *        Creator : 
+ *        File    : pci.c
+ *        Abstract: 
+ *        Date    : 
+ *    
+ *    Modification History:
+ *           By              Date     Ver.   Modification Description
+ *           --------------- -------- -----  -----------------------------
+ *
+ ************************************************************************/
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/types.h>
+#include <asm/byteorder.h>
+#include <asm/pci.h>
+#include <adm8668.h>
+
+volatile u32* pci_config_address_reg = (volatile u32*)KSEG1ADDR(PCICFG_BASE);
+volatile u32* pci_config_data_reg = (volatile u32*)KSEG1ADDR(PCIDAT_BASE);
+
+#define PCI_ENABLE			0x80000000
+#define	ADMPCI_IO_BASE			0x12600000
+#define	ADMPCI_IO_SIZE			0x1fffff
+#define	ADMPCI_MEM_BASE			0x16000000
+#define	ADMPCI_MEM_SIZE			0x7ffffff
+#define PCI_CMM_IOACC_EN		0x1
+#define PCI_CMM_MEMACC_EN		0x2
+#define PCI_CMM_MASTER_EN		0x4
+#define PCI_CMM_DEF			(PCI_CMM_IOACC_EN | PCI_CMM_MEMACC_EN | PCI_CMM_MASTER_EN)
+
+#define PCI_DEF_CACHE_LINE_SZ	0
+#define PCI_DEF_LATENCY_TIMER	0x20
+#define PCI_DEF_CACHE_LATENCY	((PCI_DEF_LATENCY_TIMER << 8) | PCI_DEF_CACHE_LINE_SZ)
+
+
+#define cfgaddr(bus, devfn, where) (((bus->number & 0xff) << 0x10) | \
+                             ((devfn & 0xff) << 0x08) | \
+                             (where & 0xfc)) | PCI_ENABLE
+
+static int adm8668_write_bus0(int where, int size, u32 val)
+{
+	switch (size)
+	{
+	case 1:
+		*pci_config_address_reg = (where & 0xfc)|PCI_ENABLE;
+		*(volatile u8 *)(((int)pci_config_data_reg) + (where & 3)) = val;
+		break;
+	case 2:
+		if (where & 1)
+			return -1;
+		*pci_config_address_reg = (where & 0xfc)|PCI_ENABLE;
+		*(volatile u16 *)(((int)pci_config_data_reg) + (where & 2)) = val;
+		break;
+	case 4:
+		if (where & 3)
+			return -1;
+		*pci_config_address_reg = (where & 0xfc)|PCI_ENABLE;
+		*pci_config_data_reg = (val);
+	}
+	return 0;
+}
+
+/* assumed little endian */
+static int adm8668_read_config(struct pci_bus *bus, unsigned int devfn,
+				int where, int size, u32 *val)
+{
+    	switch (size)
+	{
+	case 1:
+		*pci_config_address_reg = cfgaddr(bus, devfn, where);
+		*val = (le32_to_cpu(*pci_config_data_reg) >> ((where&3)<<3)) & 0xff;
+		break;
+	case 2:
+		if (where & 1)
+			return PCIBIOS_BAD_REGISTER_NUMBER;
+		*pci_config_address_reg = cfgaddr(bus, devfn, where);
+		*val = (le32_to_cpu(*pci_config_data_reg) >> ((where&3)<<3)) & 0xffff;
+		break;
+	case 4:
+		if (where & 3)
+			return PCIBIOS_BAD_REGISTER_NUMBER;
+		*pci_config_address_reg = cfgaddr(bus, devfn, where);
+		*val = le32_to_cpu(*pci_config_data_reg);
+		break;
+	}
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int adm8668_write_config(struct pci_bus *bus, unsigned int devfn,
+				int where, int size, u32 val)
+{
+	switch (size)
+	{
+	case 1:
+		*pci_config_address_reg = cfgaddr(bus, devfn, where);
+		*(volatile u8 *)(((int)pci_config_data_reg) + (where & 3)) = val;
+		break;
+	case 2:
+		if (where & 1)
+			return PCIBIOS_BAD_REGISTER_NUMBER;
+		*pci_config_address_reg = cfgaddr(bus, devfn, where);
+		*(volatile u16 *)(((int)pci_config_data_reg) + (where & 2)) = val;
+		break;
+	case 4:
+		if (where & 3)
+			return PCIBIOS_BAD_REGISTER_NUMBER;
+		*pci_config_address_reg = cfgaddr(bus, devfn, where);
+		*pci_config_data_reg = (val);
+	}
+	return PCIBIOS_SUCCESSFUL;
+}
+
+
+struct pci_ops adm8668_pci_ops = {
+	.read = adm8668_read_config,
+	.write = adm8668_write_config
+};
+
+
+struct resource pciioport_resource = {
+	.name	= "PCI IO Space",
+	.start	= ADMPCI_IO_BASE,
+	.end	= ADMPCI_IO_BASE + ADMPCI_IO_SIZE,
+	.flags	= IORESOURCE_IO
+};
+
+
+struct resource pciiomem_resource = {
+	.name	= "PCI Memory Space",
+	.start	= ADMPCI_MEM_BASE,
+	.end	= ADMPCI_MEM_BASE + ADMPCI_MEM_SIZE,
+	.flags	= IORESOURCE_MEM
+};
+
+#ifdef CONFIG_ADM8668_DISABLE_PCI
+struct pci_controller mips_pci_channels[] = {
+	{ NULL, NULL, NULL , NULL , NULL}
+};
+#else
+struct pci_controller mips_pci_channels = {
+	.pci_ops = &adm8668_pci_ops,
+	.io_resource = &pciioport_resource,
+	.mem_resource = &pciiomem_resource,
+};
+#endif
+
+int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+{
+	printk("pcibios_fixup_irqs (slot:%d devfn:%d oldirq:%d)\n", slot,
+		dev->devfn, dev->irq);
+
+	switch (slot)
+	{
+		case 1:
+			return 14;
+		case 2:
+			return 13;
+		case 3:
+			return 12;
+		default:
+			return dev->irq;
+	}
+}
+
+
+int __init pcibios_plat_dev_init(struct pci_dev *dev)
+{
+	printk("------------------------------------------\n");
+	printk("PCI dev init name=%s fn=%d (irq: %d)\n", dev->dev.init_name,
+		dev->devfn, dev->irq);
+	return 0;
+}
+
+static int __init adm8668_pci_init(void)
+{
+	void __iomem *io_map_base;
+
+	printk("adm8668_pci_init()\n");
+	adm8668_write_bus0(PCI_COMMAND, 4, PCI_CMM_DEF);
+	adm8668_write_bus0(PCI_CACHE_LINE_SIZE, 2, 0);
+	adm8668_write_bus0(PCI_BASE_ADDRESS_0, 4, 0);
+	adm8668_write_bus0(PCI_BASE_ADDRESS_1, 4, 0);
+
+	/* stoopid. we know where it goes. */
+	ioport_resource.start = ADMPCI_IO_BASE;
+	ioport_resource.end = ADMPCI_IO_BASE + ADMPCI_IO_SIZE;
+
+	io_map_base = ioremap(ADMPCI_IO_BASE, ADMPCI_IO_SIZE);
+	if (!io_map_base)
+		printk("io_map_base didn't work.\n");
+	mips_pci_channels.io_map_base = (unsigned long)io_map_base;
+	register_pci_controller(&mips_pci_channels);
+	return 0;
+}
+
+static void adm8668_net_fixup(struct pci_dev *dev)
+{
+	struct resource *r = dev->resource;
+
+	printk("=======adm8668netfixup======\n");
+	r->start = ADM8668_WAN_BASE;
+	r->end	= ADM8668_WAN_BASE + 256;
+	dev->irq = INT_LVL_WAN;
+}
+
+DECLARE_PCI_FIXUP_HEADER(0x1317, 0x8688, adm8668_net_fixup);
+
+arch_initcall(adm8668_pci_init);
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/platform.c linux-2.6.33.2/arch/mips/adm8668/platform.c
--- original/linux-2.6.33.2/arch/mips/adm8668/platform.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/platform.c	2010-06-02 18:23:53.000000000 -0400
@@ -0,0 +1,106 @@
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <asm/reboot.h>
+#include <adm8668.h>
+
+static struct resource uart_resources[] = {
+	{
+		.start		= ADM8668_UART0_BASE,
+		.end		= ADM8668_UART0_BASE + 0x1F,
+		.flags		= IORESOURCE_MEM,
+	},
+	{
+		.start		= INT_LVL_UART0,
+		.flags		= IORESOURCE_IRQ,
+	},
+};
+
+static struct resource usbh_resources[] = {
+	{
+		.start	= ADM8668_USB_BASE+0x100,
+		.end	= ADM8668_USB_BASE + 0xffff,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= INT_LVL_USB,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device adm8668_uart_device = {
+	.name		= "adm8668_uart",
+	.id		= 0,
+	.resource	= uart_resources,
+	.num_resources	= ARRAY_SIZE(uart_resources),
+};
+
+static struct platform_device adm8668_usbh_device = {
+	.name		= "adm8668_ehci",
+	.id		= -1,
+	.resource	= usbh_resources,
+	.num_resources	= ARRAY_SIZE(usbh_resources),
+};
+
+int __devinit adm8668_devs_register(void)
+{
+	printk("ADM8668 DEV: register uart\n");
+	platform_device_register(&adm8668_uart_device);
+
+	printk("ADM8668 DEV: register usbh\n");
+	platform_device_register(&adm8668_usbh_device);
+
+	return 0;
+}
+
+static void adm8668_restart(char *cmd)
+{
+	int i;
+
+	printk("Head to the choppa!\n");
+	printk(KERN_NOTICE "\n** Rebooting system...\n");
+
+	/* stop eth0 and eth1 */
+	ADM8668_LAN_REG(NETCSR6) = BIT_1|BIT_13;
+	ADM8668_LAN_REG(NETCSR7) = 0;
+	ADM8668_WAN_REG(NETCSR6) = BIT_1|BIT_13;
+	ADM8668_WAN_REG(NETCSR7) = 0;
+
+	/* reset PHY */
+	ADM8668_WAN_REG(NETCSR37) = 0x20;
+	for (i = 0; i < 10000; i++)
+		;
+	ADM8668_WAN_REG(NETCSR37) = 0;
+	for (i = 0; i < 10000; i++)
+		;
+	*(unsigned int *)0xB1600000 = 1;	/* reset eth0 mac */
+	*(unsigned int *)0xB1A00000 = 1;	/* reset eth1 mac */
+	*(unsigned int *)0xB1800000 = 1;	/* reset wlan0 mac */
+
+	/* the real deal */
+	printk("Are we dead yet?\n");
+	for (i = 0; i < 1000; i++)
+		;
+	ADM8668_CONFIG_REG(ADM8668_CR1) = BIT_0;
+}
+
+void __init plat_setup(void)
+{
+	printk("plat_setup()\n");
+        /* do board-specific setup.. */
+	_machine_restart = adm8668_restart;
+}
+
+arch_initcall(adm8668_devs_register);
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/prom.c linux-2.6.33.2/arch/mips/adm8668/prom.c
--- original/linux-2.6.33.2/arch/mips/adm8668/prom.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/prom.c	2010-06-10 13:59:34.000000000 -0400
@@ -0,0 +1,142 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/serial_core.h>
+#include <asm/bootinfo.h>
+#include <adm8668.h>
+
+#if 0
+int prom_argc;
+char **prom_argv;
+char **prom_envp;
+
+char * __init_or_module prom_getcmdline(void)
+{
+	return &(arcs_cmdline[0]);
+}
+
+void prom_init_cmdline(void)
+{
+	char *cp;
+	int i;
+
+	cp = &(arcs_cmdline[0]);
+	for (i = 1; i < prom_argc; i++)
+	{
+		prom_argv[i] = (char *)KSEG1ADDR(prom_argv[i]);
+		printk("argv[%d]=%X\n", i, prom_argv[i]);
+		strcpy(cp, prom_argv[i]);
+		cp += strlen(prom_argv[i]);
+		*cp++ = ' ';
+	}
+	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
+		--cp;
+	if (prom_argc > 1)
+		*cp = '\0';
+}
+#endif
+
+static inline unsigned long IN_W(unsigned long _addr)
+{
+	return (*(volatile unsigned long *)(_addr));
+}
+
+static unsigned int serial_in(int offset)
+{
+        return IN_W(0xbe400000 + offset);
+}
+
+static inline void OUT_W(unsigned long _addr, unsigned long _value)
+{
+        (*((volatile unsigned long *)(_addr))) = _value;
+}
+
+static void serial_out(int offset, int value)
+{
+        OUT_W(0xbe400000 + offset, value);
+}
+
+void prom_putchar(char c)
+{
+	while ((serial_in(UART_FR_REG) & UART_TX_FIFO_FULL) != 0)
+		;
+	serial_out(UART_DR_REG, c);
+}
+
+static void serial_console_write(struct console *con, const char *s, unsigned n)
+{
+        while (n-- && *s) {
+                if (*s == '\n')
+                        prom_putchar('\r');
+                prom_putchar(*s);
+                s++;
+        }
+}
+
+static int serial_console_setup(struct console *co, char *options)
+{
+	/* u-boot did it, really! */
+	return 0;
+}
+
+static struct console sercons = {
+	name:		"ttyS",
+	write:		serial_console_write,
+	setup:		serial_console_setup,
+	flags:		CON_CONSDEV|CON_BOOT,
+	index:		-1,
+};
+
+static int adm8668_console_init(void)
+{
+	register_console(&sercons);
+
+	return 0;
+}
+
+void __init prom_init(void)
+{
+#if 0
+	prom_argc = (int)fw_arg0;
+	prom_argv = (char **)fw_arg1;
+	prom_envp = (char **)fw_arg2;
+#endif
+#if 1
+	/* 115200 baud */
+	serial_out(UART_LCR_M_REG, UART_115200bps_DIVISOR >> 8);
+	serial_out(UART_LCR_L_REG, UART_115200bps_DIVISOR);
+
+	/*default line mode*/
+	serial_out(UART_LCR_H_REG, UART_WLEN_8BITS | UART_ENABLE_FIFO);
+
+	/* enable uart */
+	serial_out(UART_CR_REG, UART_PORT_EN);
+#endif
+
+	adm8668_console_init();
+#if 1
+//	initrd_start	= (unsigned long)__initramfs_start;
+//	initrd_end	= (unsigned long)__initramfs_end;
+	strcpy(arcs_cmdline, "rootfs=cramfs root=1f01 console=ttyS0");
+//	prom_init_cmdline();
+#else
+	strcpy(arcs_cmdline, "root=/dev/nfs rw nfsroot=10.42.43.1:/nfs/busybox,v3 ip=dhcp");
+#endif
+	/* stop the blinking LEDs ! ? */
+		/* first kill timer */
+	ADM8668_TMR_REG(TIMER0_REG_BASE, TIMER_CTRL_REG) &= ~TMR_ENABLE;
+	ADM8668_INTC_REG(IRQ_DISABLE_REG) = 1 << INT_LVL_TIMERINT0;
+		/* enable 'em */
+	ADM8668_CONFIG_REG(CRGPIO_REG)	|= GPIO2_OUTPUT_ENABLE;
+	ADM8668_WLAN_REG(GPIO_REG)	|= GPIO0_OUTPUT_ENABLE;
+		/* green on, red off. */
+	GPIO_SET_HI(0);		/* green LED on WLAN reg */
+	CRGPIO_SET_LOW(2);	/* red LED on adm8668 CR */
+}
+
+void prom_free_prom_memory(void)
+{
+	printk("Freeing 0 UNUSED PROM BISH\n");
+}
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/serial.c linux-2.6.33.2/arch/mips/adm8668/serial.c
--- original/linux-2.6.33.2/arch/mips/adm8668/serial.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/serial.c	2010-04-26 14:01:23.000000000 -0400
@@ -0,0 +1,851 @@
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Derived from many drivers using generic_serial interface.
+ *
+ * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+ *
+ *  Serial driver for BCM63xx integrated UART.
+ *
+ * Hardware flow control was _not_ tested since I only have RX/TX on
+ * my board.
+ */
+
+#if defined(CONFIG_SERIAL_ADM8668_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/module.h>
+#include <linux/console.h>
+#include <linux/clk.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/sysrq.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <adm8668.h>
+
+#define BCM63XX_NR_UARTS	1
+
+static struct uart_port ports[BCM63XX_NR_UARTS];
+
+/*
+ * handy uart register accessor
+ */
+static inline unsigned int bcm_uart_readl(struct uart_port *port,
+					 unsigned int offset)
+{
+	return (*(volatile unsigned int *)(port->membase + offset));
+}
+
+static inline void bcm_uart_writel(struct uart_port *port,
+				  unsigned int value, unsigned int offset)
+{
+	(*((volatile unsigned int *)(port->membase + offset))) = value;
+}
+
+/*
+ * serial core request to check if uart tx fifo is empty
+ */
+static unsigned int bcm_uart_tx_empty(struct uart_port *port)
+{
+#if 1
+	return 1;
+#else
+	int val;
+	val = bcm_uart_readl(port, UART_FR_REG) & UART_TX_FIFO_EMPTY;
+	printk("tx_empty?=%x\n", val);
+	return (val != 0);
+#endif
+}
+
+/*
+ * serial core request to set RTS and DTR pin state and loopback mode
+ */
+static void bcm_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
+{
+#if 0
+	unsigned int val;
+
+	val = bcm_uart_readl(port, UART_MCTL_REG);
+	val &= ~(UART_MCTL_DTR_MASK | UART_MCTL_RTS_MASK);
+	/* invert of written value is reflected on the pin */
+	if (!(mctrl & TIOCM_DTR))
+		val |= UART_MCTL_DTR_MASK;
+	if (!(mctrl & TIOCM_RTS))
+		val |= UART_MCTL_RTS_MASK;
+	bcm_uart_writel(port, val, UART_MCTL_REG);
+
+	val = bcm_uart_readl(port, UART_CTL_REG);
+	if (mctrl & TIOCM_LOOP)
+		val |= UART_CTL_LOOPBACK_MASK;
+	else
+		val &= ~UART_CTL_LOOPBACK_MASK;
+	bcm_uart_writel(port, val, UART_CTL_REG);
+#endif
+}
+
+/*
+ * serial core request to return RI, CTS, DCD and DSR pin state
+ */
+static unsigned int bcm_uart_get_mctrl(struct uart_port *port)
+{
+#if 0
+	unsigned int val, mctrl;
+
+	mctrl = 0;
+	val = bcm_uart_readl(port, UART_EXTINP_REG);
+	if (val & UART_EXTINP_RI_MASK)
+		mctrl |= TIOCM_RI;
+	if (val & UART_EXTINP_CTS_MASK)
+		mctrl |= TIOCM_CTS;
+	if (val & UART_EXTINP_DCD_MASK)
+		mctrl |= TIOCM_CD;
+	if (val & UART_EXTINP_DSR_MASK)
+		mctrl |= TIOCM_DSR;
+	return mctrl;
+#endif
+	return 0;
+}
+
+/*
+ * serial core request to disable tx ASAP (used for flow control)
+ */
+static void bcm_uart_stop_tx(struct uart_port *port)
+{
+	unsigned int val;
+
+	val = bcm_uart_readl(port, UART_CR_REG);
+	val &= ~(UART_TX_INT_EN);
+	bcm_uart_writel(port, val, UART_CR_REG);
+}
+
+/*
+ * serial core request to (re)enable tx
+ */
+static void bcm_uart_start_tx(struct uart_port *port)
+{
+	unsigned int val;
+
+	val = bcm_uart_readl(port, UART_CR_REG);
+	val |= UART_TX_INT_EN;
+	bcm_uart_writel(port, val, UART_CR_REG);
+}
+
+/*
+ * serial core request to stop rx, called before port shutdown
+ */
+static void bcm_uart_stop_rx(struct uart_port *port)
+{
+	unsigned int val;
+
+	val = bcm_uart_readl(port, UART_CR_REG);
+	val &= ~UART_RX_INT_EN;
+	bcm_uart_writel(port, val, UART_CR_REG);
+}
+
+/*
+ * serial core request to enable modem status interrupt reporting
+ */
+static void bcm_uart_enable_ms(struct uart_port *port)
+{
+#if 0
+	unsigned int val;
+
+	val = bcm_uart_readl(port, UART_IR_REG);
+	val |= UART_IR_MASK(UART_IR_EXTIP);
+	bcm_uart_writel(port, val, UART_IR_REG);
+#endif
+}
+
+/*
+ * serial core request to start/stop emitting break char
+ */
+static void bcm_uart_break_ctl(struct uart_port *port, int ctl)
+{
+#if 0
+	unsigned long flags;
+	unsigned int val;
+
+	spin_lock_irqsave(&port->lock, flags);
+
+	val = bcm_uart_readl(port, UART_CTL_REG);
+	if (ctl)
+		val |= UART_CTL_XMITBRK_MASK;
+	else
+		val &= ~UART_CTL_XMITBRK_MASK;
+	bcm_uart_writel(port, val, UART_CTL_REG);
+
+	spin_unlock_irqrestore(&port->lock, flags);
+#endif
+}
+
+/*
+ * return port type in string format
+ */
+static const char *bcm_uart_type(struct uart_port *port)
+{
+	return (port->type == PORT_BCM63XX) ? "adm8668_uart" : NULL;
+}
+
+/*
+ * read all chars in rx fifo and send them to core
+ */
+static void bcm_uart_do_rx(struct uart_port *port)
+{
+	struct tty_struct *tty;
+	unsigned int max_count;
+
+	/* limit number of char read in interrupt, should not be
+	 * higher than fifo size anyway since we're much faster than
+	 * serial port */
+	max_count = 32;
+	tty = port->state->port.tty;
+	do {
+		unsigned int iestat, c, cstat;
+		char flag;
+
+		/* get overrun/fifo empty information from ier
+		 * register */
+		iestat = bcm_uart_readl(port, UART_FR_REG);
+		if (iestat & UART_RX_FIFO_EMPTY)
+			break;
+
+		/* recieve status */
+		cstat = bcm_uart_readl(port, UART_RSR_REG);
+		/* clear errors */
+		bcm_uart_writel(port, cstat, UART_RSR_REG);
+
+		c = bcm_uart_readl(port, UART_DR_REG);
+		port->icount.rx++;
+		flag = TTY_NORMAL;
+
+		if (unlikely((cstat & UART_RX_STATUS_MASK))) {
+			/* do stats first */
+			if (cstat & UART_BREAK_ERR) {
+				port->icount.brk++;
+				if (uart_handle_break(port))
+					continue;
+			}
+
+			if (cstat & UART_PARITY_ERR)
+				port->icount.parity++;
+			if (cstat & UART_FRAMING_ERR)
+				port->icount.frame++;
+			if (cstat & UART_OVERRUN_ERR) {
+				port->icount.overrun++;
+				tty_insert_flip_char(tty, 0, TTY_OVERRUN);
+			}
+
+			/* update flag wrt read_status_mask */
+			cstat &= port->read_status_mask;
+			if (cstat & UART_BREAK_ERR)
+				flag = TTY_BREAK;
+			if (cstat & UART_FRAMING_ERR)
+				flag = TTY_FRAME;
+			if (cstat & UART_PARITY_ERR)
+				flag = TTY_PARITY;
+		}
+
+		if (c == '`' && uart_handle_break(port)) {
+			printk("Handle fake break\n");
+			continue;
+		}
+
+		if (uart_handle_sysrq_char(port, c))
+			continue;
+
+		/* fixthis */
+		if ((cstat & port->ignore_status_mask) == 0)
+			tty_insert_flip_char(tty, c, flag);
+	} while (max_count--);
+
+	tty_flip_buffer_push(tty);
+}
+
+/*
+ * fill tx fifo with chars to send, stop when fifo is about to be full
+ * or when all chars have been sent.
+ */
+static void bcm_uart_do_tx(struct uart_port *port)
+{
+	struct circ_buf *xmit;
+
+	if (port->x_char) {
+		bcm_uart_writel(port, port->x_char, UART_DR_REG);
+		port->icount.tx++;
+		port->x_char = 0;
+		return;
+	}
+
+	if (uart_tx_stopped(port))
+		bcm_uart_stop_tx(port);
+
+	xmit = &port->state->xmit;
+
+	if (uart_circ_empty(xmit))
+		goto txq_empty;
+	do
+	{
+		while ((bcm_uart_readl(port, UART_FR_REG) & UART_TX_FIFO_FULL) != 0)
+			;
+		bcm_uart_writel(port, xmit->buf[xmit->tail], UART_DR_REG);
+		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
+		port->icount.tx++;
+		if (uart_circ_empty(xmit))
+			break;
+	} while (1);
+
+	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+		uart_write_wakeup(port);
+
+	if (uart_circ_empty(xmit))
+		goto txq_empty;
+
+	return;
+
+txq_empty:
+	bcm_uart_stop_tx(port);
+}
+
+/*
+ * process uart interrupt
+ */
+static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id)
+{
+	struct uart_port *port;
+	unsigned int irqstat;
+
+	port = dev_id;
+	spin_lock(&port->lock);
+
+	irqstat = bcm_uart_readl(port, UART_IIR_REG);
+
+	if (irqstat & (UART_RX_INT|UART_RX_TIMEOUT_INT)) {
+		bcm_uart_do_rx(port);
+	}
+
+	if (irqstat & UART_TX_INT) {
+		bcm_uart_do_tx(port);
+	}
+#if 0
+	if (irqstat & UART_IR_MASK(UART_IR_EXTIP)) {
+		unsigned int estat;
+
+		estat = bcm_uart_readl(port, UART_EXTINP_REG);
+		if (estat & UART_EXTINP_IRSTAT(UART_EXTINP_IR_CTS))
+			uart_handle_cts_change(port,
+					       estat & UART_EXTINP_CTS_MASK);
+		if (estat & UART_EXTINP_IRSTAT(UART_EXTINP_IR_DCD))
+			uart_handle_dcd_change(port,
+					       estat & UART_EXTINP_DCD_MASK);
+	}
+#endif
+	spin_unlock(&port->lock);
+	return IRQ_HANDLED;
+}
+
+/*
+ * enable rx & tx operation on uart
+ */
+static void bcm_uart_enable(struct uart_port *port)
+{
+	unsigned int val;
+
+	val = bcm_uart_readl(port, UART_CR_REG);
+	// BREAK_INT too
+	val |= (UART_RX_INT_EN | UART_RX_TIMEOUT_INT_EN);
+	bcm_uart_writel(port, val, UART_CR_REG);
+}
+
+/*
+ * disable rx & tx operation on uart
+ */
+static void bcm_uart_disable(struct uart_port *port)
+{
+	unsigned int val;
+
+	val = bcm_uart_readl(port, UART_CR_REG);
+	val &= ~(UART_TX_INT_EN | UART_RX_INT_EN | UART_RX_TIMEOUT_INT_EN);
+	bcm_uart_writel(port, val, UART_CR_REG);
+}
+
+/*
+ * clear all unread data in rx fifo and unsent data in tx fifo
+ */
+static void bcm_uart_flush(struct uart_port *port)
+{
+#if 0
+	unsigned int val;
+
+	/* empty rx and tx fifo */
+	val = bcm_uart_readl(port, UART_CTL_REG);
+	val |= UART_CTL_RSTRXFIFO_MASK | UART_CTL_RSTTXFIFO_MASK;
+	bcm_uart_writel(port, val, UART_CTL_REG);
+#endif
+
+	/* read any pending char to make sure all irq status are
+	 * cleared */
+	(void)bcm_uart_readl(port, UART_DR_REG);
+}
+
+/*
+ * serial core request to initialize uart and start rx operation
+ */
+static int bcm_uart_startup(struct uart_port *port)
+{
+	int ret;
+//	unsigned int val;
+
+	/* mask all irq and flush port */
+//	bcm_uart_disable(port);
+//	bcm_uart_writel(port, 0, UART_CR_REG);
+//	bcm_uart_flush(port);
+
+	/* clear any pending external input interrupt */
+	(void)bcm_uart_readl(port, UART_IIR_REG);
+
+#if 0	/* don't think ours do this */
+	/* set rx/tx fifo thresh to fifo half size */
+	val = bcm_uart_readl(port, UART_MCTL_REG);
+	val &= ~(UART_MCTL_RXFIFOTHRESH_MASK | UART_MCTL_TXFIFOTHRESH_MASK);
+	val |= (port->fifosize / 2) << UART_MCTL_RXFIFOTHRESH_SHIFT;
+	val |= (port->fifosize / 2) << UART_MCTL_TXFIFOTHRESH_SHIFT;
+	bcm_uart_writel(port, val, UART_MCTL_REG);
+
+	/* set rx fifo timeout to 1 char time */
+	val = bcm_uart_readl(port, UART_CTL_REG);
+	val &= ~UART_CTL_RXTMOUTCNT_MASK;
+	val |= 1 << UART_CTL_RXTMOUTCNT_SHIFT;
+	bcm_uart_writel(port, val, UART_CTL_REG);
+
+	/* report any edge on dcd and cts */
+	val = UART_EXTINP_INT_MASK;
+	val |= UART_EXTINP_DCD_NOSENSE_MASK;
+	val |= UART_EXTINP_CTS_NOSENSE_MASK;
+	bcm_uart_writel(port, val, UART_EXTINP_REG);
+#endif
+
+	/* register irq and enable rx interrupts */
+	ret = request_irq(port->irq, bcm_uart_interrupt, 0,
+			  bcm_uart_type(port), port);
+	if (ret)
+		return ret;
+
+	bcm_uart_enable(port);
+
+	return 0;
+}
+
+/*
+ * serial core request to flush & disable uart
+ */
+static void bcm_uart_shutdown(struct uart_port *port)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&port->lock, flags);
+//	bcm_uart_writel(port, 0, UART_CR_REG);
+	spin_unlock_irqrestore(&port->lock, flags);
+
+	bcm_uart_disable(port);
+	bcm_uart_flush(port);
+	free_irq(port->irq, port);
+}
+
+/*
+ * serial core request to change current uart setting
+ */
+static void bcm_uart_set_termios(struct uart_port *port,
+				 struct ktermios *new,
+				 struct ktermios *old)
+{
+	port->ignore_status_mask = 0;
+	uart_update_timeout(port, new->c_cflag, 115200);
+#if 0
+	unsigned int ctl, baud, quot, ier;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port->lock, flags);
+
+	/* disable uart while changing speed */
+	bcm_uart_disable(port);
+	bcm_uart_flush(port);
+
+	/* update Control register */
+	ctl = bcm_uart_readl(port, UART_CTL_REG);
+	ctl &= ~UART_CTL_BITSPERSYM_MASK;
+
+	switch (new->c_cflag & CSIZE) {
+	case CS5:
+		ctl |= (0 << UART_CTL_BITSPERSYM_SHIFT);
+		break;
+	case CS6:
+		ctl |= (1 << UART_CTL_BITSPERSYM_SHIFT);
+		break;
+	case CS7:
+		ctl |= (2 << UART_CTL_BITSPERSYM_SHIFT);
+		break;
+	default:
+		ctl |= (3 << UART_CTL_BITSPERSYM_SHIFT);
+		break;
+	}
+
+	ctl &= ~UART_CTL_STOPBITS_MASK;
+	if (new->c_cflag & CSTOPB)
+		ctl |= UART_CTL_STOPBITS_2;
+	else
+		ctl |= UART_CTL_STOPBITS_1;
+
+	ctl &= ~(UART_CTL_RXPAREN_MASK | UART_CTL_TXPAREN_MASK);
+	if (new->c_cflag & PARENB)
+		ctl |= (UART_CTL_RXPAREN_MASK | UART_CTL_TXPAREN_MASK);
+	ctl &= ~(UART_CTL_RXPAREVEN_MASK | UART_CTL_TXPAREVEN_MASK);
+	if (new->c_cflag & PARODD)
+		ctl |= (UART_CTL_RXPAREVEN_MASK | UART_CTL_TXPAREVEN_MASK);
+	bcm_uart_writel(port, ctl, UART_CTL_REG);
+
+	/* update Baudword register */
+	baud = uart_get_baud_rate(port, new, old, 0, port->uartclk / 16);
+	quot = uart_get_divisor(port, baud) - 1;
+	bcm_uart_writel(port, quot, UART_BAUD_REG);
+
+	/* update Interrupt register */
+	ier = bcm_uart_readl(port, UART_IR_REG);
+
+	ier &= ~UART_IR_MASK(UART_IR_EXTIP);
+	if (UART_ENABLE_MS(port, new->c_cflag))
+		ier |= UART_IR_MASK(UART_IR_EXTIP);
+
+	bcm_uart_writel(port, ier, UART_IR_REG);
+
+	/* update read/ignore mask */
+	port->read_status_mask = UART_FIFO_VALID_MASK;
+	if (new->c_iflag & INPCK) {
+		port->read_status_mask |= UART_FIFO_FRAMEERR_MASK;
+		port->read_status_mask |= UART_FIFO_PARERR_MASK;
+	}
+	if (new->c_iflag & (BRKINT))
+		port->read_status_mask |= UART_FIFO_BRKDET_MASK;
+
+	port->ignore_status_mask = 0;
+	if (new->c_iflag & IGNPAR)
+		port->ignore_status_mask |= UART_FIFO_PARERR_MASK;
+	if (new->c_iflag & IGNBRK)
+		port->ignore_status_mask |= UART_FIFO_BRKDET_MASK;
+	if (!(new->c_cflag & CREAD))
+		port->ignore_status_mask |= UART_FIFO_VALID_MASK;
+
+	uart_update_timeout(port, new->c_cflag, baud);
+	bcm_uart_enable(port);
+	spin_unlock_irqrestore(&port->lock, flags);
+#endif
+}
+
+/*
+ * serial core request to claim uart iomem
+ */
+static int bcm_uart_request_port(struct uart_port *port)
+{
+	unsigned int size = 0xf;
+	if (!request_mem_region(port->mapbase, size, "adm8668")) {
+		dev_err(port->dev, "Memory region busy\n");
+		return -EBUSY;
+	}
+
+	port->membase = ioremap(port->mapbase, size);
+	if (!port->membase) {
+		dev_err(port->dev, "Unable to map registers\n");
+		release_mem_region(port->mapbase, size);
+		return -EBUSY;
+	}
+	return 0;
+}
+
+/*
+ * serial core request to release uart iomem
+ */
+static void bcm_uart_release_port(struct uart_port *port)
+{
+	release_mem_region(port->mapbase, 0xf);
+	iounmap(port->membase);
+}
+
+/*
+ * serial core request to do any port required autoconfiguration
+ */
+static void bcm_uart_config_port(struct uart_port *port, int flags)
+{
+	if (flags & UART_CONFIG_TYPE) {
+		if (bcm_uart_request_port(port))
+			return;
+		port->type = PORT_BCM63XX;
+	}
+}
+
+/*
+ * serial core request to check that port information in serinfo are
+ * suitable
+ */
+static int bcm_uart_verify_port(struct uart_port *port,
+				struct serial_struct *serinfo)
+{
+	if (port->type != PORT_BCM63XX)
+		return -EINVAL;
+	if (port->irq != serinfo->irq)
+		return -EINVAL;
+	if (port->iotype != serinfo->io_type)
+		return -EINVAL;
+	if (port->mapbase != (unsigned long)serinfo->iomem_base)
+		return -EINVAL;
+	return 0;
+}
+
+/* serial core callbacks */
+static struct uart_ops bcm_uart_ops = {
+	.tx_empty	= bcm_uart_tx_empty,
+	.get_mctrl	= bcm_uart_get_mctrl,
+	.set_mctrl	= bcm_uart_set_mctrl,
+	.start_tx	= bcm_uart_start_tx,
+	.stop_tx	= bcm_uart_stop_tx,
+	.stop_rx	= bcm_uart_stop_rx,
+	.enable_ms	= bcm_uart_enable_ms,
+	.break_ctl	= bcm_uart_break_ctl,
+	.startup	= bcm_uart_startup,
+	.shutdown	= bcm_uart_shutdown,
+	.set_termios	= bcm_uart_set_termios,
+	.type		= bcm_uart_type,
+	.release_port	= bcm_uart_release_port,
+	.request_port	= bcm_uart_request_port,
+	.config_port	= bcm_uart_config_port,
+	.verify_port	= bcm_uart_verify_port,
+};
+
+
+
+//#ifdef CONFIG_SERIAL_BCM63XX_CONSOLE
+#if 1
+static inline void wait_for_xmitr(struct uart_port *port)
+{
+	unsigned int tmout;
+
+	/* Wait up to 10ms for the character(s) to be sent. */
+	tmout = 10000;
+#if 1
+        while ((bcm_uart_readl(port, UART_FR_REG) & UART_TX_FIFO_FULL) != 0)
+                ;
+#else
+	while (--tmout) {
+		unsigned int val;
+
+		val = bcm_uart_readl(port, UART_FR_REG);
+		if (!(val & UART_TX_FIFO_FULL))
+			break;
+		udelay(1);
+	}
+#endif
+}
+
+/*
+ * output given char
+ */
+static void bcm_console_putchar(struct uart_port *port, int ch)
+{
+	wait_for_xmitr(port);
+	bcm_uart_writel(port, ch, UART_DR_REG);
+}
+
+/*
+ * console core request to output given string
+ */
+static void bcm_console_write(struct console *co, const char *s,
+			      unsigned int count)
+{
+	struct uart_port *port;
+	unsigned long flags;
+	int locked;
+
+	port = &ports[co->index];
+
+	local_irq_save(flags);
+	if (port->sysrq) {
+		/* bcm_uart_interrupt() already took the lock */
+		locked = 0;
+	} else if (oops_in_progress) {
+		locked = spin_trylock(&port->lock);
+	} else {
+		spin_lock(&port->lock);
+		locked = 1;
+	}
+
+	/* call helper to deal with \r\n */
+	uart_console_write(port, s, count, bcm_console_putchar);
+
+	/* and wait for char to be transmitted */
+	wait_for_xmitr(port);
+
+	if (locked)
+		spin_unlock(&port->lock);
+	local_irq_restore(flags);
+}
+
+/*
+ * console core request to setup given console, find matching uart
+ * port and setup it.
+ */
+static int bcm_console_setup(struct console *co, char *options)
+{
+	struct uart_port *port;
+	int baud = 115200;
+	int bits = 8;
+	int parity = 'n';
+	int flow = 'n';
+
+	if (co->index < 0 || co->index >= BCM63XX_NR_UARTS)
+		return -EINVAL;
+	port = &ports[co->index];
+	if (!port->membase)
+		return -ENODEV;
+
+	if (options)
+		uart_parse_options(options, &baud, &parity, &bits, &flow);
+
+	return uart_set_options(port, co, baud, parity, bits, flow);
+}
+
+static struct uart_driver bcm_uart_driver;
+
+static struct console bcm63xx_console = {
+	.name		= "ttyS",
+	.write		= bcm_console_write,
+	.device		= uart_console_device,
+	.setup		= bcm_console_setup,
+	.flags		= CON_PRINTBUFFER,
+	.index		= -1,
+	.data		= &bcm_uart_driver,
+};
+
+static int __init bcm63xx_console_init(void)
+{
+	printk("63xx_console_init();\n");
+	register_console(&bcm63xx_console);
+	return 0;
+}
+
+console_initcall(bcm63xx_console_init);
+
+#define BCM63XX_CONSOLE	(&bcm63xx_console)
+#else
+#define BCM63XX_CONSOLE	NULL
+#endif /* CONFIG_SERIAL_BCM63XX_CONSOLE */
+
+static struct uart_driver bcm_uart_driver = {
+	.owner		= THIS_MODULE,
+	.driver_name	= "adm8668_uart",
+	.dev_name	= "ttyS",
+	.major		= TTY_MAJOR,
+	.minor		= 64,
+	.nr		= 1,
+	.cons		= BCM63XX_CONSOLE,
+};
+
+/*
+ * platform driver probe/remove callback
+ */
+static int __devinit bcm_uart_probe(struct platform_device *pdev)
+{
+	struct resource *res_mem, *res_irq;
+	struct uart_port *port;
+	int ret;
+
+	if (pdev->id < 0 || pdev->id >= BCM63XX_NR_UARTS)
+		return -EINVAL;
+
+	if (ports[pdev->id].membase)
+		return -EBUSY;
+
+	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res_mem)
+		return -ENODEV;
+
+	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+	if (!res_irq)
+		return -ENODEV;
+
+	port = &ports[pdev->id];
+	memset(port, 0, sizeof(*port));
+	port->iotype = UPIO_MEM;
+	port->mapbase = res_mem->start;
+	port->irq = res_irq->start;
+	port->ops = &bcm_uart_ops;
+	port->flags = UPF_BOOT_AUTOCONF;
+	port->dev = &pdev->dev;
+	port->fifosize = 8;
+	port->uartclk = ADM8668_UARTCLK_FREQ;
+
+	ret = uart_add_one_port(&bcm_uart_driver, port);
+	if (ret) {
+		kfree(port);
+		return ret;
+	}
+	platform_set_drvdata(pdev, port);
+	return 0;
+}
+
+static int __devexit bcm_uart_remove(struct platform_device *pdev)
+{
+	struct uart_port *port;
+
+	port = platform_get_drvdata(pdev);
+	uart_remove_one_port(&bcm_uart_driver, port);
+	platform_set_drvdata(pdev, NULL);
+	/* mark port as free */
+	ports[pdev->id].membase = 0;
+	return 0;
+}
+
+/*
+ * platform driver stuff
+ */
+static struct platform_driver bcm_uart_platform_driver = {
+	.probe	= bcm_uart_probe,
+	.remove	= __devexit_p(bcm_uart_remove),
+	.driver	= {
+		.owner = THIS_MODULE,
+		.name  = "adm8668_uart",
+	},
+};
+
+static int __init bcm_uart_init(void)
+{
+	int ret;
+
+	ret = uart_register_driver(&bcm_uart_driver);
+	if (ret)
+		return ret;
+
+	ret = platform_driver_register(&bcm_uart_platform_driver);
+	if (ret)
+		uart_unregister_driver(&bcm_uart_driver);
+
+	return ret;
+}
+
+static void __exit bcm_uart_exit(void)
+{
+	platform_driver_unregister(&bcm_uart_platform_driver);
+	uart_unregister_driver(&bcm_uart_driver);
+}
+
+module_init(bcm_uart_init);
+module_exit(bcm_uart_exit);
+
+MODULE_AUTHOR("Maxime Bizon <mbizon@freebox.fr>");
+MODULE_DESCRIPTION("Broadcom 63<xx integrated uart driver");
+MODULE_LICENSE("GPL");
diff -Nwru original/linux-2.6.33.2/arch/mips/adm8668/time.c linux-2.6.33.2/arch/mips/adm8668/time.c
--- original/linux-2.6.33.2/arch/mips/adm8668/time.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/adm8668/time.c	2010-04-13 14:11:17.000000000 -0400
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (C) 2004 Florian Schirmer <jolt@tuxbox.org>
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <linux/init.h>
+#include <linux/ssb/ssb.h>
+#include <asm/time.h>
+#include <adm8668.h>
+
+void __init plat_time_init(void)
+{
+	int adj = (ADM8668_CONFIG_REG(ADM8668_CR3) >> 11) & 0xf;
+
+	/* adjustable clock selection
+	   CR3 bit 14~11, 0000 -> 175MHz, 0001 -> 180MHz, etc... */
+
+	mips_hpt_frequency = (SYS_CLOCK + adj * 5000000) / 2;
+	printk("ADM8668 CPU clock: %d MHz\n", 2*mips_hpt_frequency / 1000000);
+}
diff -Nwru original/linux-2.6.33.2/arch/mips/configs/adm8668_defconfig linux-2.6.33.2/arch/mips/configs/adm8668_defconfig
--- original/linux-2.6.33.2/arch/mips/configs/adm8668_defconfig	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/configs/adm8668_defconfig	2010-04-10 17:55:18.000000000 -0400
@@ -0,0 +1,620 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.33.2
+# Fri Apr  9 21:30:22 2010
+#
+CONFIG_MIPS=y
+
+#
+# Machine selection
+#
+# CONFIG_MACH_ALCHEMY is not set
+# CONFIG_AR7 is not set
+# CONFIG_BCM47XX is not set
+CONFIG_ADM8668=y
+# CONFIG_BCM63XX is not set
+# CONFIG_MIPS_COBALT is not set
+# CONFIG_MACH_DECSTATION is not set
+# CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+# CONFIG_MACH_LOONGSON is not set
+# CONFIG_MIPS_MALTA is not set
+# CONFIG_MIPS_SIM is not set
+# CONFIG_NEC_MARKEINS is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
+# CONFIG_PNX8550_JBS is not set
+# CONFIG_PNX8550_STB810 is not set
+# CONFIG_PMC_MSP is not set
+# CONFIG_PMC_YOSEMITE is not set
+# CONFIG_POWERTV is not set
+# CONFIG_SGI_IP22 is not set
+# CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
+# CONFIG_SGI_IP32 is not set
+# CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CARMEL is not set
+# CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_BIGSUR is not set
+# CONFIG_SNI_RM is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
+# CONFIG_WR_PPMC is not set
+# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
+# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
+# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_SCHED_OMIT_FRAME_POINTER=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_CEVT_R4K_LIB=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K_LIB=y
+CONFIG_CSRC_R4K=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DMA_NEED_PCI_MAP_STATE=y
+# CONFIG_NO_IOPORT is not set
+# CONFIG_CPU_BIG_ENDIAN is not set
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_IRQ_CPU=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+
+#
+# CPU selection
+#
+# CONFIG_CPU_LOONGSON2E is not set
+# CONFIG_CPU_LOONGSON2F is not set
+CONFIG_CPU_MIPS32_R1=y
+# CONFIG_CPU_MIPS32_R2 is not set
+# CONFIG_CPU_MIPS64_R1 is not set
+# CONFIG_CPU_MIPS64_R2 is not set
+# CONFIG_CPU_R3000 is not set
+# CONFIG_CPU_TX39XX is not set
+# CONFIG_CPU_VR41XX is not set
+# CONFIG_CPU_R4300 is not set
+# CONFIG_CPU_R4X00 is not set
+# CONFIG_CPU_TX49XX is not set
+# CONFIG_CPU_R5000 is not set
+# CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
+# CONFIG_CPU_R6000 is not set
+# CONFIG_CPU_NEVADA is not set
+# CONFIG_CPU_R8000 is not set
+# CONFIG_CPU_R10000 is not set
+# CONFIG_CPU_RM7000 is not set
+# CONFIG_CPU_RM9000 is not set
+# CONFIG_CPU_SB1 is not set
+# CONFIG_CPU_CAVIUM_OCTEON is not set
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_CPU_MIPS32=y
+CONFIG_CPU_MIPSR1=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+
+#
+# Kernel type
+#
+CONFIG_32BIT=y
+# CONFIG_64BIT is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_32KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_MT_SMTC is not set
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_48 is not set
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_128 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_256 is not set
+# CONFIG_HZ_1000 is not set
+# CONFIG_HZ_1024 is not set
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_SECCOMP=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+# CONFIG_EXPERIMENTAL is not set
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="/nfs/busybox"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_RD_LZO=y
+CONFIG_INITRAMFS_COMPRESSION_NONE=y
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+# CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+CONFIG_BLK_DEV_BSG=y
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+# CONFIG_FREEZER is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, ISA, TC)
+#
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_MMU=y
+# CONFIG_PCCARD is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+CONFIG_TRAD_SIGNALS=y
+
+#
+# Power management options
+#
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PM is not set
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ENCLOSURE_SERVICES is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+
+#
+# PPS support
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# Caches
+#
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_HFSPLUS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_NLS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+# CONFIG_CRYPTO is not set
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_DECOMPRESS_LZO=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/adm8668.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/adm8668.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/adm8668.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/adm8668.h	2010-04-13 14:09:35.000000000 -0400
@@ -0,0 +1,511 @@
+/************************************************************************
+ *
+ *    Copyright (c) 2005
+ *    Infineon Technologies AG
+ *    St. Martin Strasse 53; 81669 Muenchen; Germany
+ *
+ *    THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED
+ *    NON-EXCLUSIVE, WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE
+ *    AND SUBLICENSE THIS SOFTWARE IS FREE OF CHARGE.
+ *    
+ *    THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY
+ *    DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR
+ *    IMPLIED, INCLUDING WITHOUT LIMI?TATION, WAR?RANTIES OR REPRESENTATIONS
+ *    OF WORKMANSHIP, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+ *    DURABILITY, THAT THE OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR
+ *    FREE OR FREE OF NY THIRD PARTY CALIMS, INCLUDING WITHOUT LIMITATION
+ *    CLAIMS OF THIRD PARTY INTELLECTUAL PROPERTY INFRINGEMENT.
+ *    
+ *    EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND
+ *    EXCEPT FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE
+ *    FOR ANY CLAIM OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT,
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *    --------------------------------------------------------------------
+ *    
+ *        Project : ADM8668
+ *        Block   : 
+ *        Creator : 
+ *        File    : include/asm/adm8668/adm8668.h
+ *        Abstract: 
+ *        Date    : 2003.11.25
+ *    
+ *    Modification History:
+ *           By              Date     Ver.   Modification Description
+ *           --------------- -------- -----  -----------------------------
+ *
+ ************************************************************************/
+
+#ifndef  __ADM8668_H__
+#define  __ADM8668_H__
+
+
+#include <asm/addrspace.h>
+#include "bsp_sup.h"
+
+
+
+#define MEM_KSEG0_BASE					0x80000000
+#define MEM_KSEG1_BASE					0xA0000000
+#define MEM_SEG_MASK					0xE0000000
+#define KVA2PA(_addr)					((unsigned long)(_addr) & ~MEM_SEG_MASK)
+
+#define MIPS_KSEG0A(_addr)				(KVA2PA(_addr) | MEM_KSEG0_BASE)
+#define MIPS_KSEG1A(_addr)				(KVA2PA(_addr) | MEM_KSEG1_BASE)
+
+#define PA2VA(_addr)					(KVA2PA(_addr) | MEM_KSEG1_BASE)
+#define PA2CACHEVA(_addr)				(KVA2PA(_addr) | MEM_KSEG0_BASE)
+
+
+/*=======================  Physical Memory Map  ============================*/
+#define ADM8668_SDRAM_BASE			0
+#define ADM8668_SMEM1_BASE			0x10000000
+#define ADM8668_MPMC_BASE			0x11000000
+#define ADM8668_USB_BASE			0x11200000
+#define ADM8668_CONFIG_BASE			0x11400000
+#define ADM8668_WAN_BASE			0x11600000
+#define ADM8668_WLAN_BASE			0x11800000
+#define ADM8668_LAN_BASE			0x11A00000
+#define ADM8668_INTC_BASE			0x1E000000
+#define ADM8668_TMR_BASE			0x1E200000
+#define ADM8668_UART0_BASE			0x1E400000
+#define ADM8668_SMEM0_BASE			0x1FC00000
+#define ADM8668_NAND_BASE			0x1fffff00
+
+#define PCICFG_BASE				0x12200000
+#define PCIDAT_BASE				0x12400000
+
+/* for PCI bridge fixup ! */
+#define PCI_BRIDGE_MASK				0x40
+
+/* WLAN registers */
+#define WCSR0		0x00
+#define WCSR11A		0x5c
+
+#define GPIO_REG	WCSR11A
+
+#define ADM8668_WLAN_REG(_reg)		\
+	(*((volatile unsigned int *)(PA2VA(ADM8668_WLAN_BASE + (_reg)))))
+
+/* configuration registers */
+#define ADM8668_CR0		0x00
+#define ADM8668_CR1		0x04
+#define ADM8668_CR2		0x08
+#define ADM8668_CR3		0x0C
+#define ADM8668_CR8		0x20
+#define ADM8668_CR10		0x28
+#define ADM8668_CR11		0x2C
+#define ADM8668_CR12		0x30
+#define ADM8668_CR13		0x34
+#define ADM8668_CR14		0x38
+#define ADM8668_CR15		0x3C
+#define ADM8668_CR16		0x40
+#define ADM8668_CR17		0x44
+#define ADM8668_CR18		0x48
+#define ADM8668_CR19		0x4C
+#define ADM8668_CR20		0x50
+#define ADM8668_CR21		0x54
+#define ADM8668_CR22		0x58
+#define ADM8668_CR23		0x5C
+#define ADM8668_CR24		0x60
+#define ADM8668_CR25		0x64
+#define ADM8668_CR26		0x68
+#define ADM8668_CR27		0x6C
+#define ADM8668_CR28		0x70
+#define ADM8668_CR29		0x74
+#define ADM8668_CR30		0x78
+#define ADM8668_CR31		0x7C
+#define ADM8668_CR32		0x80
+#define ADM8668_CR33		0x84
+#define ADM8668_CR34		0x88
+#define ADM8668_CR35		0x8C
+#define ADM8668_CR36		0x90
+#define ADM8668_CR37		0x94
+#define ADM8668_CR38		0x98
+#define ADM8668_CR39		0x9C
+#define ADM8668_CR40		0xA0
+#define ADM8668_CR41		0xA4
+#define ADM8668_CR42		0xA8
+#define ADM8668_CR43		0xAC
+#define ADM8668_CR44		0xB0
+#define ADM8668_CR45		0xB4
+#define ADM8668_CR46		0xB8
+#define ADM8668_CR47		0xBC
+#define ADM8668_CR48		0xC0
+#define ADM8668_CR49		0xC4
+#define ADM8668_CR50		0xC8
+#define ADM8668_CR51		0xCC
+#define ADM8668_CR52		0xD0
+#define ADM8668_CR53		0xD4
+#define ADM8668_CR54		0xD8
+#define ADM8668_CR55		0xDC
+#define ADM8668_CR56		0xE0
+#define ADM8668_CR57		0xE4
+#define ADM8668_CR58		0xE8
+#define ADM8668_CR59		0xEC
+#define ADM8668_CR60		0xF0
+#define ADM8668_CR61		0xF4
+#define ADM8668_CR62		0xF8
+#define ADM8668_CR63		0xFC
+#define ADM8668_CR64		0x100
+#define ADM8668_CR65		0x104
+#define ADM8668_CR66		0x108
+#define ADM8668_CR67		0x10C
+#define ADM8668_CR68		0x110
+
+#define CRGPIO_REG	ADM8668_CR8
+
+#define ADM8668_CONFIG_REG(_reg)		\
+	(*((volatile unsigned int *)(PA2VA(ADM8668_CONFIG_BASE + (_reg)))))
+#define ADM8668_MPMC_REG(_reg)		\
+	(*((volatile unsigned int *)(PA2VA(ADM8668_MPMC_BASE + (_reg)))))
+
+
+/*=======================  MIPS interrupt  ===================*/
+/*
+#define	MIPS_CPU_IRQ_BASE					16
+#define ADM8668_MIPSINT_SOFT0					0
+#define ADM8668_MIPSINT_SOFT1					1
+#define ADM8668_MIPSINT_IRQ					2
+#define ADM8668_MIPSINT_FIQ					3
+#define ADM8668_MIPSINT_REV0					4
+#define ADM8668_MIPSINT_REV1					5
+#define ADM8668_MIPSINT_REV2					6
+#define ADM8668_MIPSINT_TIMER					7
+*/
+
+/*==========================  Interrupt Controller  ==========================*/
+/* registers offset */
+#define IRQ_STATUS_REG							0x00	/* Read */
+#define IRQ_RAW_STATUS_REG						0x04	/* Read */
+#define IRQ_ENABLE_REG							0x08	/* Read/Write */
+#define IRQ_DISABLE_REG							0x0C	/* Write */
+#define IRQ_SOFT_REG							0x10	/* Write */
+
+#define FIQ_STATUS_REG							0x100	/* Read */
+#define FIQ_RAW_STATUS_REG						0x104
+#define FIQ_ENABLE_REG							0x108
+#define FIQ_DISABLE_REG							0x10c
+
+
+/*  Macro for accessing Interrupt controller register  */
+#define ADM8668_INTC_REG(_reg)		\
+	(*((volatile unsigned long *)(PA2VA(ADM8668_INTC_BASE + (_reg)))))
+
+
+/* interrupt levels */
+#define INT_LVL_SWI					1
+#define INT_LVL_COMMS_RX			2
+#define INT_LVL_COMMS_TX			3
+#define INT_LVL_TIMERINT0			4
+#define INT_LVL_TIMERINT1			5
+#define INT_LVL_UART0				6
+#define INT_LVL_LAN				7
+#define INT_LVL_WAN				8
+#define INT_LVL_WLAN				9
+#define INT_LVL_GPIO				10
+#define INT_LVL_IDE				11
+#define INT_LVL_PCI2				12
+#define INT_LVL_PCI1				13
+#define INT_LVL_PCI0				14
+#define INT_LVL_USB				15
+#define INT_LVL_MAX				INT_LVL_USB
+
+#define IRQ_MASK				0xffff
+
+#define IRQ_SWI					(0x1<<INT_LVL_SWI)
+#define IRQ_COMMS_RX				
+#define IRQ_COMMS_TX				
+#define IRQ_TIMERINT0				(0x1<<INT_LVL_TIMERINT0)
+#define IRQ_TIMERINT1				(0x1<<INT_LVL_TIMERINT1)
+#define IRQ_UART0				(0x1<<INT_LVL_UART0)
+#define IRQ_LAN					(0x1<<INT_LVL_LAN)
+#define IRQ_WAN					(0x1<<INT_LVL_WAN)
+#define IRQ_WLAN				(0x1<<INT_LVL_WLAN)
+#define IRQ_GPIO				(0x1<<INT_LVL_GPIO)
+#define IRQ_IDEINT				(0x1<<INT_LVL_IDE)
+#define IRQ_PCI2				(0x1<<INT_LVL_PCI2)
+#define IRQ_PCI1				(0x1<<INT_LVL_PCI1)
+#define IRQ_PCI0				(0x1<<INT_LVL_PCI0)
+#define IRQ_USB					(0x1<<INT_LVL_USB)
+
+
+/*===========================  UART Control Register  ========================*/
+#define UART_DR_REG								0x00
+#define UART_RSR_REG							0x04
+#define UART_ECR_REG							0x04
+#define UART_LCR_H_REG							0x08
+#define UART_LCR_M_REG							0x0c
+#define UART_LCR_L_REG							0x10
+#define UART_CR_REG								0x14
+#define UART_FR_REG								0x18
+#define UART_IIR_REG							0x1c
+#define UART_ICR_REG							0x1C
+#define UART_ILPR_REG							0x20
+
+/*  rsr/ecr reg  */
+#define UART_OVERRUN_ERR						0x08
+#define UART_BREAK_ERR							0x04
+#define UART_PARITY_ERR							0x02
+#define UART_FRAMING_ERR						0x01
+#define UART_RX_STATUS_MASK						0x0f
+#define UART_RX_ERROR							( UART_BREAK_ERR	\
+												| UART_PARITY_ERR	\
+												| UART_FRAMING_ERR)
+
+/*  lcr_h reg  */
+#define UART_SEND_BREAK							0x01
+#define UART_PARITY_EN							0x02
+#define UART_EVEN_PARITY						0x04
+#define UART_TWO_STOP_BITS						0x08
+#define UART_ENABLE_FIFO						0x10
+
+#define UART_WLEN_5BITS							0x00
+#define UART_WLEN_6BITS							0x20
+#define UART_WLEN_7BITS							0x40
+#define UART_WLEN_8BITS							0x60
+#define UART_WLEN_MASK							0x60
+
+/*  cr reg  */
+#define UART_PORT_EN							0x01
+#define UART_SIREN								0x02
+#define UART_SIRLP								0x04
+#define UART_MODEM_STATUS_INT_EN				0x08
+#define UART_RX_INT_EN							0x10
+#define UART_TX_INT_EN							0x20
+#define UART_RX_TIMEOUT_INT_EN					0x40
+#define UART_LOOPBACK_EN						0x80
+
+/*  fr reg  */
+#define UART_CTS								0x01
+#define UART_DSR								0x02
+#define UART_DCD								0x04
+#define UART_BUSY								0x08
+#define UART_RX_FIFO_EMPTY						0x10
+#define UART_TX_FIFO_FULL						0x20
+#define UART_RX_FIFO_FULL						0x40
+#define UART_TX_FIFO_EMPTY						0x80
+
+/*  iir/icr reg  */
+#define UART_MODEM_STATUS_INT					0x01
+#define UART_RX_INT								0x02
+#define UART_TX_INT								0x04
+#define UART_RX_TIMEOUT_INT						0x08
+
+#define UART_INT_MASK							0x0f
+
+#ifdef _FPGA_
+#define ADM8668_UARTCLK_FREQ					3686400
+#else
+#define ADM8668_UARTCLK_FREQ					62500000
+#endif
+
+#define UART_BAUDDIV(_rate)				\
+	((unsigned long)(ADM8668_UARTCLK_FREQ/(16*(_rate)) - 1))
+
+/*  uart_baudrate  */
+#define UART_230400bps_DIVISOR					UART_BAUDDIV(230400)
+#define UART_115200bps_DIVISOR					UART_BAUDDIV(115200)
+#define UART_76800bps_DIVISOR					UART_BAUDDIV(76800)
+#define UART_57600bps_DIVISOR					UART_BAUDDIV(57600)
+#define UART_38400bps_DIVISOR					UART_BAUDDIV(38400)
+#define UART_19200bps_DIVISOR					UART_BAUDDIV(19200)
+#define UART_14400bps_DIVISOR					UART_BAUDDIV(14400)
+#define UART_9600bps_DIVISOR					UART_BAUDDIV(9600)
+#define UART_2400bps_DIVISOR					UART_BAUDDIV(2400)
+#define UART_1200bps_DIVISOR					UART_BAUDDIV(1200)
+
+
+/*===========================  Counter Timer ==============================*/
+#define TIMER0_REG_BASE				ADM8668_TMR_BASE
+#define TIMER1_REG_BASE				ADM8668_TMR_BASE+0x20
+
+
+#define TIMER_LOAD_REG				0x00
+#define TIMER_VALUE_REG				0x04
+#define TIMER_CTRL_REG				0x08
+#define TIMER_CLR_REG				0x0c
+
+/* TIMER_LOAD_REG */
+#ifdef _FPGA_
+#define SYS_CLOCK				56000000
+#else
+#define SYS_CLOCK				175000000
+#endif
+
+#define SYS_PRESCALE				256
+
+#define TMR_10MS_TICKS				(SYS_CLOCK/SYS_PRESCALE/100)
+
+/* TIMER_CTRL_REG */
+#define TMR_PRESCALE_1				0x00
+#define TMR_PRESCALE_16				0x04
+#define TMR_PRESCALE_256			0x08
+#define TMR_MODE_PERIODIC			0x40
+#define TMR_ENABLE					0x80
+
+/* TIMER_CLR_REG */
+#define TMR_CLEAR_BIT				1
+
+
+/* Macro for access MPMC register */
+#define ADM8668_TMR_REG(base, _offset)				\
+		(*((volatile unsigned long *)(PA2VA(base + (_offset)))))
+
+
+/* For GPIO control */
+#define GPIO0_OUTPUT_ENABLE	0x1000
+#define GPIO1_OUTPUT_ENABLE	0x2000
+#define GPIO2_OUTPUT_ENABLE	0x4000
+#define GPIO_OUTPUT_ENABLE_ALL	0x7000
+#define GPIO0_OUTPUT_1		0x40
+#define GPIO1_OUTPUT_1		0x80
+#define GPIO2_OUTPUT_1		0x100
+#define GPIO0_INPUT_1		0x1
+#define GPIO1_INPUT_1		0x2
+#define GPIO2_INPUT_1		0x4
+
+#define GPIO_SET_HI(num)	\
+	ADM8668_WLAN_REG(GPIO_REG) |= (1 << (6 + num))
+
+#define GPIO_SET_LOW(num)	\
+	ADM8668_WLAN_REG(GPIO_REG) &= ~(1 << (6 + num))
+
+#define GPIO_TOGGLE(num)	\
+	ADM8668_WLAN_REG(GPIO_REG) ^= (1 << (6 + num))
+
+#define CRGPIO_SET_HI(num)	\
+	ADM8668_CONFIG_REG(CRGPIO_REG) |= (1 << (6 + num))
+
+#define CRGPIO_SET_LOW(num)	\
+	ADM8668_CONFIG_REG(CRGPIO_REG) &= ~(1 << (6 + num))
+
+#define CRGPIO_TOGGLE(num)	\
+	ADM8668_CONFIG_REG(CRGPIO_REG) ^= (1 << (6 + num))
+
+
+/*==========================================================================*/
+/* Cache Controller */
+#define ADM8668_CACHE_LINE_SIZE						16
+
+#define BIT_0			0x00000001
+#define BIT_1			0x00000002
+#define BIT_2			0x00000004
+#define BIT_3			0x00000008
+#define BIT_4			0x00000010
+#define BIT_5			0x00000020
+#define BIT_6			0x00000040
+#define BIT_7			0x00000080
+#define BIT_8			0x00000100
+#define BIT_9			0x00000200
+#define BIT_10			0x00000400
+#define BIT_11			0x00000800
+#define BIT_12			0x00001000
+#define BIT_13			0x00002000
+#define BIT_14			0x00004000
+#define BIT_15			0x00008000
+#define BIT_16			0x00010000
+#define BIT_17			0x00020000
+#define BIT_18			0x00040000
+#define BIT_19			0x00080000
+#define BIT_20			0x00100000
+#define BIT_21			0x00200000
+#define BIT_22			0x00400000
+#define BIT_23			0x00800000
+#define BIT_24			0x01000000
+#define BIT_25			0x02000000
+#define BIT_26			0x04000000
+#define BIT_27			0x08000000
+#define BIT_28			0x10000000
+#define BIT_29			0x20000000
+#define BIT_30			0x40000000
+#define BIT_31			0x80000000
+
+
+/* NAND controller registers */
+#define NAND_SET_BIT		0x0
+#define NAND_ECC_EN		0xA4
+#define NAND_ECC_DIS		0xA8
+#define NAND_ECC_RESET		0xAC
+#define NAND_ECC_0		0xB0
+#define NAND_ECC_1		0xB4
+#define NAND_ECC_SET_FAILED	0xB8
+#define NAND_ECC_CLR_FAILED	0xBC
+#define NAND_SET_CEn		0xC0	// CEn high
+#define NAND_CLR_CEn		0xC4	// CEn low
+#define NAND_SET_CLE		0xC8
+#define NAND_CLR_CLE		0xCC
+#define NAND_SET_ALE		0xD0
+#define NAND_CLR_ALE		0xD4
+#define NAND_SET_WPn		0xD8	// WPn high
+#define NAND_CLR_WPn		0xDC	// WPn low
+#define NAND_TOGGLE_WEn		0xE0
+#define NAND_TOGGLE_REn		0xE4
+#define NAND_BOOT_DONE		0xE8
+#define NAND_WDATA		0xEC
+#define NAND_STATUS		0xF0
+#define NAND_RDATA_BYTE		0xF4
+#define NAND_RDATA_WORD		0xF8
+#define NAND_RDATA_DWORD	0xFC
+/* end NAND controller registers */
+#define ADM8668_NAND_REG(_reg)		\
+	(*((volatile unsigned char *)(PA2VA(ADM8668_NAND_BASE + (_reg)))))
+#define ADM8668_NAND_WORD(_reg)		\
+	(*((volatile unsigned short *)(PA2VA(ADM8668_NAND_BASE + (_reg)))))
+#define ADM8668_NAND_DWORD(_reg)		\
+	(*((volatile unsigned int *)(PA2VA(ADM8668_NAND_BASE + (_reg)))))
+
+/* type definitions */
+typedef unsigned int UINT32;
+typedef unsigned short UINT16;
+typedef unsigned char UINT8;
+
+/* for network ports */
+#define ADM8668_MAX_IFNUM	2
+#define ADM8668_WAN_NAME	"adm1"
+#define ADM8668_LAN_NAME	"adm0"
+#define ADM8668_DEFAULT_MAC	"\0ifadm"
+
+#define	NETCSR0		0x0
+#define	NETCSR1		0x08
+#define	NETCSR2		0x10
+#define	NETCSR3		0x18
+#define	NETCSR4		0x20
+#define	NETCSR5		0x28
+#define	NETCSR6		0x30
+#define	NETCSR7		0x38
+#define	NETCSR8		0x40
+#define	NETCSR9		0x48
+#define	NETCSR10	0x50
+#define	NETCSR11	0x58
+#define	NETCSR12	0x60
+#define	NETCSR13	0x68
+#define	NETCSR14	0x70
+#define	NETCSR15	0x78
+#define	NETCSR36	0xD0
+#define	NETCSR36A	0xD4
+#define	NETCSR36B	0xD8
+#define	NETCSR36C	0xDC	// dummy
+#define	NETCSR36D	0xE0
+#define	NETCSR36E	0xE4
+#define	NETCSR36F	0xE8
+#define	NETCSR36G	0xEC
+#define	NETCSR36H	0xF0
+#define	NETCSR36I	0xF4
+#define	NETCSR37	0xF8
+
+/* for descriptor skip DWs */
+#define NETDESCSKIP_1DW	BIT_2
+#define NETDESCSKIP_2DW	BIT_3
+#define NETDESCSKIP_3DW	(BIT_3|BIT_2)
+#define NETDESCSKIP_4DW	BIT_4
+
+
+#define ADM8668_LAN_REG(_reg)		\
+	(*((volatile unsigned int *)(PA2VA(ADM8668_LAN_BASE + (_reg)))))
+#define ADM8668_WAN_REG(_reg)		\
+	(*((volatile unsigned int *)(PA2VA(ADM8668_WAN_BASE + (_reg)))))
+
+
+#endif /* __ADM8668_H__ */
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/bsp_sup.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/bsp_sup.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/bsp_sup.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/bsp_sup.h	2010-04-09 10:15:17.000000000 -0400
@@ -0,0 +1,125 @@
+/************************************************************************
+ *
+ *    Copyright (c) 2005
+ *    Infineon Technologies AG
+ *    St. Martin Strasse 53; 81669 Muenchen; Germany
+ *
+ *    THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED
+ *    NON-EXCLUSIVE, WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE
+ *    AND SUBLICENSE THIS SOFTWARE IS FREE OF CHARGE.
+ *    
+ *    THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY
+ *    DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR
+ *    IMPLIED, INCLUDING WITHOUT LIMI?TATION, WAR?RANTIES OR REPRESENTATIONS
+ *    OF WORKMANSHIP, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+ *    DURABILITY, THAT THE OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR
+ *    FREE OR FREE OF NY THIRD PARTY CALIMS, INCLUDING WITHOUT LIMITATION
+ *    CLAIMS OF THIRD PARTY INTELLECTUAL PROPERTY INFRINGEMENT.
+ *    
+ *    EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND
+ *    EXCEPT FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE
+ *    FOR ANY CLAIM OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT,
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *    --------------------------------------------------------------------
+ *    
+ *        Project : Common plateform
+ *        Block   : 
+ *        Creator : 
+ *        File    : bsp_sup.h
+ *        Abstract: 
+ *        Date    : 
+ *    
+ *    Modification History:
+ *           By              Date     Ver.   Modification Description
+ *           --------------- -------- -----  -----------------------------
+ *
+ ************************************************************************/
+#ifndef _BSP_SUP_H_
+#define _BSP_SUP_H_
+
+
+#define UBOOT_CFG_ENV_SIZE			(0x400-4)
+#define ADD_WAN_MAC
+#define CONFIG_IFX_GAN
+#define ADM8668_BL_MAGIC			0x6c62676d
+#define ADM8668_MAC_MAGIC			0x69666164
+#define ADM8668_VER_MAGIC			0x7276676d
+#define ADM8668_ID_MAGIC			0x6469676d
+#define ADM8668_IF_MAGIC			0x6669676d
+#define ADM8668_WANMAC_MAGIC			0x69666164
+#ifdef CONFIG_IFX_GAN
+#define ADM8668_IMEI_MAGIC			0x6669676e
+#endif
+
+#define BSP_IFNAME_MAX_LEN	15
+#define BOOT_LINE_SIZE	    255
+#define BSP_STR_LEN         79
+
+
+/*
+ * Boot mode configuration
+ */
+typedef struct BTMODE_CFG_S
+{
+	unsigned long btmode;
+	unsigned long dlmethod;
+} BTMODE_CFG_T;
+
+
+/*
+ * Interface configuration
+ */
+typedef struct IF_CFG_S
+{
+	char ifname[BSP_IFNAME_MAX_LEN+1];
+	unsigned long ip;
+	unsigned long mask;
+	unsigned long gateway;
+} IF_CFG_T;
+
+
+/*
+ * Board configuration
+ */
+typedef struct BOARD_CFG_S
+{
+	unsigned long blmagic;
+	unsigned char blreserved[UBOOT_CFG_ENV_SIZE];
+
+	unsigned long macmagic;
+    	unsigned char mac[8];
+	unsigned long macnum;
+
+	unsigned long idmagic;    
+    	unsigned char serial[BSP_STR_LEN+1];
+
+    	unsigned long vermagic;
+    	unsigned char ver[BSP_STR_LEN+1];
+
+	unsigned long ifmagic;
+	IF_CFG_T ifcfg[8];
+
+    	unsigned long btmagic;
+	BTMODE_CFG_T bootmode;
+#ifdef ADD_WAN_MAC 
+	unsigned long wanmagic;
+    	unsigned char wanmac[8];
+#endif	
+#ifdef CONFIG_IFX_GAN
+	unsigned long imeimagic;
+	unsigned char imei0[16];
+	unsigned char imei1[16];
+#endif
+} BOARD_CFG_T, *PBOARD_CFG_T;
+
+#ifdef CONFIG_ADM8668_NOR_CFG
+#define ADM8668_BOARD_CFG_ADDR	(ADM8668_SMEM0_BASE + CONFIG_ADM8668_BSP_OFFSET*1024)
+#define ADM8668_BOARD_CFG_SIZE	(CONFIG_ADM8668_BSP_SIZE*1024)
+#elif 0 /* CONFIG_ADM8668_NAND_CFG */
+#define ADM8668_BOARD_CFG_ADDR	(CONFIG_ADM8668_BSP_OFFSET*1024)
+#define ADM8668_BOARD_CFG_SIZE	(CONFIG_ADM8668_BSP_SIZE*1024)
+#endif
+
+#endif  /* _BSP_SUP_H_   */
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/flash.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/flash.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/flash.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/flash.h	2010-04-14 12:46:34.000000000 -0400
@@ -0,0 +1,73 @@
+/************************************************************************
+ *
+ *    Copyright (c) 2005
+ *    Infineon Technologies AG
+ *    St. Martin Strasse 53; 81669 Muenchen; Germany
+ *
+ *    THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED
+ *    NON-EXCLUSIVE, WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE
+ *    AND SUBLICENSE THIS SOFTWARE IS FREE OF CHARGE.
+ *    
+ *    THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY
+ *    DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR
+ *    IMPLIED, INCLUDING WITHOUT LIMI?TATION, WAR?RANTIES OR REPRESENTATIONS
+ *    OF WORKMANSHIP, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+ *    DURABILITY, THAT THE OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR
+ *    FREE OR FREE OF NY THIRD PARTY CALIMS, INCLUDING WITHOUT LIMITATION
+ *    CLAIMS OF THIRD PARTY INTELLECTUAL PROPERTY INFRINGEMENT.
+ *    
+ *    EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND
+ *    EXCEPT FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE
+ *    FOR ANY CLAIM OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT,
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *    --------------------------------------------------------------------
+ *    
+ *        Project : Common plateform
+ *        Block   : 
+ *        Creator : 
+ *        File    : flash.h
+ *        Abstract: 
+ *        Date    : 
+ *    
+ *    Modification History:
+ *           By              Date     Ver.   Modification Description
+ *           --------------- -------- -----  -----------------------------
+ *
+ ************************************************************************/
+#ifndef _FLASH_H_
+#define _FLASH_H_
+
+enum    FLASH_E
+{
+    FLASH_NOT_FIT_IN = -2,
+    FLASH_ERROR = -1,
+    FLASH_OK = 0,
+    FLASH_PARTIAL_DONE
+};
+
+typedef struct FLASH_DESC_S
+{
+    struct FLASH_DESC_S *next;
+    int flash_size;
+    int addr_inc;
+    int byte_width;
+    char *start;
+    unsigned long *blocks;
+    int num;
+    int (*erase)(struct FLASH_DESC_S *cp, char *flash, int cells);
+    int (*read) (struct FLASH_DESC_S *cp, char *flash, char *dst, int cells);
+    int (*write)(struct FLASH_DESC_S *cp, char *flash, char *src, int cells);
+}
+FLASH_DESC;
+
+
+int flash_init(void);
+int flash_add(FLASH_DESC *cp);
+int flash_erase(char *flash, int size);
+int flash_read (char *flash, char *dst, int size);
+int flash_write(char *flash, char *src, int size);
+
+
+#endif  /* _FLASH_H_   */
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hw_nat.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hw_nat.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hw_nat.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hw_nat.h	2010-04-09 09:08:42.000000000 -0400
@@ -0,0 +1,241 @@
+/************************************************************************
+ *
+ *    Copyright (c) 2005
+ *    Infineon Technologies AG
+ *    St. Martin Strasse 53; 81669 Muenchen; Germany
+ *
+ *    THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED
+ *    NON-EXCLUSIVE, WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE
+ *    AND SUBLICENSE THIS SOFTWARE IS FREE OF CHARGE.
+ *    
+ *    THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY
+ *    DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR
+ *    IMPLIED, INCLUDING WITHOUT LIMI?TATION, WAR?RANTIES OR REPRESENTATIONS
+ *    OF WORKMANSHIP, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+ *    DURABILITY, THAT THE OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR
+ *    FREE OR FREE OF NY THIRD PARTY CALIMS, INCLUDING WITHOUT LIMITATION
+ *    CLAIMS OF THIRD PARTY INTELLECTUAL PROPERTY INFRINGEMENT.
+ *    
+ *    EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND
+ *    EXCEPT FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE
+ *    FOR ANY CLAIM OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT,
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *    --------------------------------------------------------------------
+ *    
+ *        Project : ADM8668
+ *        Block   : 
+ *        Creator : Joy Lin
+ *        File    : hw_nat.h
+ *        Abstract: This is a include file for hw_nat.c.
+ *		    It will include all constant and structure for hardware NAT
+ *        Date    : 1/28/2004
+ *    
+ *    Modification History:
+ *           By              Date     Ver.   Modification Description
+ *           --------------- -------- -----  -----------------------------
+ *	     Joy Lin        1/28/2004 V1.0    Initial Version
+ ************************************************************************/
+#ifndef __HW_NAT_H__
+#define __HW_NAT_H__
+
+#if defined(__vxworks__)
+#include    "types/vxTypesOld.h"
+#elif defined(__linux__)
+#include <asm/adm8668/adm8668.h>
+#include <linux/netfilter_ipv4/ip_nat.h>
+#include <linux/netfilter_ipv4/ip_nat_rule.h>
+#include <linux/netfilter_ipv4/ip_nat_protocol.h>
+#include <linux/netfilter_ipv4/ip_nat_core.h>
+#include <linux/netfilter_ipv4/ip_nat_helper.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ip_conntrack_core.h>
+
+#define LAN_REG_BASE		ADM8668_LAN_BASE
+#define CFG_REG_8628_BASE	ADM8668_CONFIG_BASE
+
+#define FALSE			-1
+#define TRUE			0
+#endif
+
+/******************************************************************************/
+/* Bit Mask definitions                                                       */
+/******************************************************************************/
+
+#ifndef	BIT_31
+    #define	BIT_31		0x80000000
+#endif
+#ifndef	BIT_30
+    #define	BIT_30		0x40000000
+#endif
+#ifndef	BIT_29
+    #define	BIT_29		0x20000000
+#endif
+#ifndef	BIT_28
+    #define	BIT_28		0x10000000
+#endif
+#ifndef	BIT_27
+    #define	BIT_27		0x08000000
+#endif
+#ifndef	BIT_26
+    #define	BIT_26		0x04000000
+#endif
+#ifndef	BIT_25
+    #define	BIT_25		0x02000000
+#endif
+#ifndef	BIT_24
+    #define	BIT_24		0x01000000
+#endif
+#ifndef	BIT_23
+    #define	BIT_23		0x00800000
+#endif
+#ifndef	BIT_22
+    #define	BIT_22		0x00400000
+#endif
+#ifndef	BIT_21
+    #define	BIT_21		0x00200000
+#endif
+#ifndef	BIT_20
+    #define	BIT_20		0x00100000
+#endif
+#ifndef	BIT_19
+    #define	BIT_19		0x00080000
+#endif
+#ifndef	BIT_18
+    #define	BIT_18		0x00040000
+#endif
+#ifndef	BIT_17
+    #define	BIT_17		0x00020000
+#endif
+#ifndef	BIT_16
+    #define	BIT_16		0x00010000
+#endif
+#ifndef	BIT_15
+    #define	BIT_15		0x00008000
+#endif
+#ifndef	BIT_14
+    #define	BIT_14		0x00004000
+#endif
+#ifndef	BIT_13
+    #define	BIT_13		0x00002000
+#endif
+#ifndef	BIT_12
+    #define	BIT_12		0x00001000
+#endif
+#ifndef	BIT_11
+    #define	BIT_11		0x00000800
+#endif
+#ifndef	BIT_10
+    #define	BIT_10		0x00000400
+#endif
+#ifndef	BIT_9
+    #define	BIT_9		0x00000200
+#endif
+#ifndef	BIT_8
+    #define	BIT_8		0x00000100
+#endif
+#ifndef	BIT_7
+    #define	BIT_7		0x00000080
+#endif
+#ifndef	BIT_6
+    #define	BIT_6		0x00000040
+#endif
+#ifndef	BIT_5
+    #define	BIT_5		0x00000020
+#endif
+#ifndef	BIT_4
+    #define	BIT_4		0x00000010
+#endif
+#ifndef	BIT_3
+    #define	BIT_3		0x00000008
+#endif
+#ifndef	BIT_2
+    #define	BIT_2		0x00000004
+#endif
+#ifndef	BIT_1
+    #define	BIT_1		0x00000002
+#endif
+#ifndef	BIT_0
+    #define	BIT_0		0x00000001
+#endif
+
+// CSR offset
+
+//--Joy+b3, joyl_01142004
+#define	CSR36A		    0xd4
+#define	CSR36B		    0xd8
+#define	CSR36C		    0xdc
+#define	CSR36D		    0xe0    // NAT queue Receive descriptor base address
+#define	CSR36E		    0xe4    // NAT queue Transmit descriptor base address
+#define	CSR36F		    0xe8
+#define	CSR36G		    0xec
+#define	CSR36H		    0xf0
+#define	CSR36I		    0xf4
+
+//--Joy+b3, joyl_01152004
+#define CFG_REG(x)			        ((x) * 4)
+
+// CR10, NAT Table Access Control
+#define CR10_ERASE_BIT				BIT_2
+#define CR10_WRITE_BIT				BIT_1
+
+#define CR10_READY(x)				( x & BIT_0)
+//#define CR10_WRITE(x)				((x & BIT_1) >> 1)
+//#define CR10_ERASE(x)				((x & BIT_2) >> 2)
+//#define CR10_INDEX(x)				((x & 0x000003F8) >> 3)
+
+// CR17, NAT Table Access Data 6
+#define CR17_ENTRY_VALID			BIT_23
+#define CR17_NAT_FILTER 			BIT_22
+#define CR17_FAST_PATH_ON		    BIT_21
+#define CR17_FOR_TCP    			BIT_20
+#define CR17_FOR_PPPOE  			BIT_19
+#define CR17_FORWARD_TO_VLAN_WAN    BIT_15
+
+// CR24, NAT Control Register
+#define CR24_NATQ_EN				BIT_28
+#define CR24_HW_NAT_EN				BIT_26
+#define CR24_PORT1_IS_LAN			BIT_25
+#define CR24_VLAN_EN				BIT_24
+#define CR24_WAN_VLAN_ID			2 //see netif_cfg.c
+#define CR24_LAN_VLAN_ID			1 //see netif_cfg.c
+
+//--Joy+b3, joyl_01312004, temp
+#define NAT_DESC_NUM                100
+
+#define NATQ_BUF_SIZE               2048
+#define NAT_TABLE_ENTRY_NUM         128
+
+#define DESCRIPTOR_END_OF_RING      BIT_25
+
+typedef struct _NAT_DESC {
+        u32 	Des0;
+        u32   	Des1;
+        u32    	Des2;
+        u32    	Des3;
+        u32	nDes0;
+        u32	nDes1;
+        u32	nDes2;
+        u32	nDes3;
+} NAT_DESC, *PNAT_DESC;
+
+#define WAIT_CR10_READY \
+        while (CR10_READY(ADM8668_CONFIG_REG(ADM8668_CR10)) == 0)     
+
+#define ERASE_WHOLE_NAT_TABLE \
+        { WAIT_CR10_READY ; \
+          ADM8668_CONFIG_REG(ADM8668_CR10) = CR10_ERASE_BIT; }
+
+#define READ_NAT_TABLE_BY_INDEX(x) \
+          ADM8668_CONFIG_REG(ADM8668_CR10) = ((x) << 3)
+
+#define WRITE_NAT_TABLE_BY_INDEX(x) \
+          ADM8668_CONFIG_REG(ADM8668_CR10) = (((x) << 3) | CR10_WRITE_BIT)
+
+#define MODE_DISABLED		0
+#define MODE_NORMAL		1
+#define MODE_PPPOE		2
+#define MODE_DISABLETURBONAT	3
+
+#endif  // #ifndef __HW_NAT_H__
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hwprofile.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hwprofile.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hwprofile.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/hwprofile.h	2010-04-09 09:08:43.000000000 -0400
@@ -0,0 +1,59 @@
+/************************************************************************
+ *
+ *    Copyright (c) 2005
+ *    Infineon Technologies AG
+ *    St. Martin Strasse 53; 81669 Muenchen; Germany
+ *
+ *    THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED
+ *    NON-EXCLUSIVE, WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE
+ *    AND SUBLICENSE THIS SOFTWARE IS FREE OF CHARGE.
+ *    
+ *    THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY
+ *    DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR
+ *    IMPLIED, INCLUDING WITHOUT LIMI?TATION, WAR?RANTIES OR REPRESENTATIONS
+ *    OF WORKMANSHIP, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+ *    DURABILITY, THAT THE OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR
+ *    FREE OR FREE OF NY THIRD PARTY CALIMS, INCLUDING WITHOUT LIMITATION
+ *    CLAIMS OF THIRD PARTY INTELLECTUAL PROPERTY INFRINGEMENT.
+ *    
+ *    EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND
+ *    EXCEPT FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE
+ *    FOR ANY CLAIM OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT,
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *    --------------------------------------------------------------------
+ *    
+ *        Project : ADM8668
+ *        Block   : 
+ *        Creator : 
+ *        File    : include/asm/adm8668/hwprofile.h
+ *        Abstract: 
+ *        Date    : 2003.11.26
+ *    
+ *    Modification History:
+ *           By              Date     Ver.   Modification Description
+ *           --------------- -------- -----  -----------------------------
+ *
+ ************************************************************************/
+
+
+#ifndef  __HWPROFILE_1_H__
+#define  __HWPROFILE_1_H__
+
+
+#include <linux/config.h>
+
+
+#define HWPF_8668_SDRAM_SIZE         (CONFIG_ADM8668_SDRAM_SIZE*1024*1024)
+
+#ifdef CONFIG_ADM8668_DMA_MEM
+#define HWPF_ADM_DMA_MAX_ADDR       (CONFIG_ADM8668_DMA_ADDR*1024*1024)
+#else
+#define HWPF_ADM_DMA_MAX_ADDR        0
+#endif
+
+
+
+
+#endif /* __HWPROFILE_H__ */
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/irq.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/irq.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/irq.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/irq.h	2010-04-13 14:16:02.000000000 -0400
@@ -0,0 +1,35 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 by Ralf Baechle
+ */
+#ifndef __ASM_MACH_ADM8668_IRQ_H
+#define __ASM_MACH_ADM8668_IRQ_H
+
+#ifndef NR_IRQS
+#define NR_IRQS	32
+#endif
+
+#ifdef CONFIG_IRQ_CPU
+
+#ifndef MIPS_CPU_IRQ_BASE
+#define MIPS_CPU_IRQ_BASE 16
+#endif
+
+#ifdef CONFIG_IRQ_CPU_RM7K
+#ifndef RM7K_CPU_IRQ_BASE
+#define RM7K_CPU_IRQ_BASE (MIPS_CPU_IRQ_BASE+8)
+#endif
+#endif
+
+#ifdef CONFIG_IRQ_CPU_RM9K
+#ifndef RM9K_CPU_IRQ_BASE
+#define RM9K_CPU_IRQ_BASE (MIPS_CPU_IRQ_BASE+12)
+#endif
+#endif
+
+#endif /* CONFIG_IRQ_CPU */
+
+#endif /* __ASM_MACH_ADM8668_IRQ_H */
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/prom.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/prom.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/prom.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/prom.h	2010-04-09 09:08:44.000000000 -0400
@@ -0,0 +1,55 @@
+/*
+ * Carsten Langgaard, carstenl@mips.com
+ * Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
+ *
+ * ########################################################################
+ *
+ *  This program is free software; you can distribute it and/or modify it
+ *  under the terms of the GNU General Public License (Version 2) as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ *  for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * ########################################################################
+ *
+ * MIPS boards bootprom interface for the Linux kernel.
+ *
+ */
+/************************************************************************
+ *
+ * Copyright (c) 2005
+ * Infineon Technologies AG
+ * St. Martin Strasse 53; 81669 Muenchen; Germany
+ *
+ ************************************************************************/
+#ifndef _MIPS_PROM_H
+#define _MIPS_PROM_H
+
+extern char *prom_getcmdline(void);
+extern char *prom_getenv(char *name);
+extern void setup_prom_printf(int tty_no);
+extern void prom_printf(char *fmt, ...);
+extern void prom_init_cmdline(void);
+extern void prom_meminit(void);
+extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem);
+extern void prom_free_prom_memory (void);
+extern void mips_display_message(const char *str);
+extern void mips_display_word(unsigned int num);
+extern int get_ethernet_addr(char *ethernet_addr);
+
+/* Memory descriptor management. */
+#define PROM_MAX_PMEMBLOCKS    32
+struct prom_pmemblock {
+        unsigned long base; /* Within KSEG0. */
+        unsigned int size;  /* In bytes. */
+        unsigned int type;  /* free or prom memory */
+};
+
+#endif /* !(_MIPS_PROM_H) */
diff -Nwru original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/war.h linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/war.h
--- original/linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/war.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/arch/mips/include/asm/mach-adm8668/war.h	2010-04-09 09:19:48.000000000 -0400
@@ -0,0 +1,25 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org>
+ */
+#ifndef __ASM_MIPS_MACH_ADM8668_WAR_H
+#define __ASM_MIPS_MACH_ADM8668_WAR_H
+
+#define R4600_V1_INDEX_ICACHEOP_WAR	0
+#define R4600_V1_HIT_CACHEOP_WAR	0
+#define R4600_V2_HIT_CACHEOP_WAR	0
+#define R5432_CP0_INTERRUPT_WAR		0
+#define BCM1250_M3_WAR			0
+#define SIBYTE_1956_WAR			0
+#define MIPS4K_ICACHE_REFILL_WAR	0
+#define MIPS_CACHE_SYNC_WAR		0
+#define TX49XX_ICACHE_INDEX_INV_WAR	0
+#define RM9000_CDEX_SMP_WAR		0
+#define ICACHE_REFILLS_WORKAROUND_WAR	0
+#define R10000_LLSC_WAR			0
+#define MIPS34K_MISSED_ITLB_WAR		0
+
+#endif /* __ASM_MIPS_MACH_ADM8668_WAR_H */
diff -Nwru original/linux-2.6.33.2/arch/mips/Kconfig linux-2.6.33.2/arch/mips/Kconfig
--- original/linux-2.6.33.2/arch/mips/Kconfig	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/arch/mips/Kconfig	2010-06-09 09:08:22.000000000 -0400
@@ -37,7 +37,6 @@
 	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
@@ -69,6 +68,22 @@
 	help
 	 Support for BCM47XX based boards
 
+config ADM8668
+	bool "WildPass ADM8668"
+	select SYS_HAS_CPU_MIPS32_R1
+	select IRQ_CPU
+	select CEVT_R4K
+	select CSRC_R4K
+	select HW_HAS_PCI
+	select PCI
+	select SYS_SUPPORTS_LITTLE_ENDIAN
+	select SYS_SUPPORTS_32BIT_KERNEL
+	select DMA_NONCOHERENT
+	select SWAP_IO_SPACE
+	select ARCH_WANT_OPTIONAL_GPIOLIB
+	help
+		ADM8668 crap
+
 config BCM63XX
 	bool "Broadcom BCM63XX based boards"
 	select CEVT_R4K
diff -Nwru original/linux-2.6.33.2/arch/mips/Makefile linux-2.6.33.2/arch/mips/Makefile
--- original/linux-2.6.33.2/arch/mips/Makefile	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/arch/mips/Makefile	2010-04-09 09:21:06.000000000 -0400
@@ -207,6 +207,13 @@
 #
 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
 #
+core-$(CONFIG_ADM8668)		+= arch/mips/adm8668/
+cflags-$(CONFIG_ADM8668)	+= -I$(srctree)/arch/mips/include/asm/mach-adm8668
+load-$(CONFIG_ADM8668)		+= 0xffffffff80002000
+
+#
+# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
+#
 core-$(CONFIG_MACH_JAZZ)	+= arch/mips/jazz/
 cflags-$(CONFIG_MACH_JAZZ)	+= -I$(srctree)/arch/mips/include/asm/mach-jazz
 load-$(CONFIG_MACH_JAZZ)	+= 0xffffffff80080000
diff -Nwru original/linux-2.6.33.2/dot-config linux-2.6.33.2/dot-config
--- original/linux-2.6.33.2/dot-config	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/dot-config	2010-06-25 15:13:30.000000000 -0400
@@ -0,0 +1,1155 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.33.2
+# Wed Jun  9 10:09:04 2010
+#
+CONFIG_MIPS=y
+
+#
+# Machine selection
+#
+# CONFIG_MACH_ALCHEMY is not set
+# CONFIG_AR7 is not set
+# CONFIG_BCM47XX is not set
+CONFIG_ADM8668=y
+# CONFIG_BCM63XX is not set
+# CONFIG_MIPS_COBALT is not set
+# CONFIG_MACH_DECSTATION is not set
+# CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+# CONFIG_MACH_LOONGSON is not set
+# CONFIG_MIPS_MALTA is not set
+# CONFIG_MIPS_SIM is not set
+# CONFIG_NEC_MARKEINS is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
+# CONFIG_PNX8550_JBS is not set
+# CONFIG_PNX8550_STB810 is not set
+# CONFIG_PMC_MSP is not set
+# CONFIG_PMC_YOSEMITE is not set
+# CONFIG_POWERTV is not set
+# CONFIG_SGI_IP22 is not set
+# CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
+# CONFIG_SGI_IP32 is not set
+# CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CARMEL is not set
+# CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_BIGSUR is not set
+# CONFIG_SNI_RM is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
+# CONFIG_WR_PPMC is not set
+# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
+# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
+# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_SCHED_OMIT_FRAME_POINTER=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_CEVT_R4K_LIB=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K_LIB=y
+CONFIG_CSRC_R4K=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DMA_NEED_PCI_MAP_STATE=y
+# CONFIG_NO_IOPORT is not set
+# CONFIG_CPU_BIG_ENDIAN is not set
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_IRQ_CPU=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+
+#
+# CPU selection
+#
+# CONFIG_CPU_LOONGSON2E is not set
+# CONFIG_CPU_LOONGSON2F is not set
+CONFIG_CPU_MIPS32_R1=y
+# CONFIG_CPU_MIPS32_R2 is not set
+# CONFIG_CPU_MIPS64_R1 is not set
+# CONFIG_CPU_MIPS64_R2 is not set
+# CONFIG_CPU_R3000 is not set
+# CONFIG_CPU_TX39XX is not set
+# CONFIG_CPU_VR41XX is not set
+# CONFIG_CPU_R4300 is not set
+# CONFIG_CPU_R4X00 is not set
+# CONFIG_CPU_TX49XX is not set
+# CONFIG_CPU_R5000 is not set
+# CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
+# CONFIG_CPU_R6000 is not set
+# CONFIG_CPU_NEVADA is not set
+# CONFIG_CPU_R8000 is not set
+# CONFIG_CPU_R10000 is not set
+# CONFIG_CPU_RM7000 is not set
+# CONFIG_CPU_RM9000 is not set
+# CONFIG_CPU_SB1 is not set
+# CONFIG_CPU_CAVIUM_OCTEON is not set
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_CPU_MIPS32=y
+CONFIG_CPU_MIPSR1=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+
+#
+# Kernel type
+#
+CONFIG_32BIT=y
+# CONFIG_64BIT is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_32KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_MT_SMTC is not set
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_48 is not set
+CONFIG_HZ_100=y
+# CONFIG_HZ_128 is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_256 is not set
+# CONFIG_HZ_1000 is not set
+# CONFIG_HZ_1024 is not set
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_HZ=100
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+# CONFIG_KEXEC is not set
+# CONFIG_SECCOMP is not set
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION="adm8668-1"
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+# CONFIG_TREE_RCU is not set
+# CONFIG_TREE_PREEMPT_RCU is not set
+CONFIG_TINY_RCU=y
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_PCSPKR_PLATFORM is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_PCI_QUIRKS=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+
+#
+# GCOV-based kernel profiling
+#
+CONFIG_SLOW_WORK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+# CONFIG_MODULE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+# CONFIG_INLINE_SPIN_UNLOCK is not set
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+# CONFIG_INLINE_READ_UNLOCK is not set
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+# CONFIG_INLINE_WRITE_UNLOCK is not set
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+# CONFIG_FREEZER is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, ISA, TC)
+#
+CONFIG_HW_HAS_PCI=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCI_LEGACY is not set
+# CONFIG_PCI_STUB is not set
+# CONFIG_PCI_IOV is not set
+CONFIG_MMU=y
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+CONFIG_TRAD_SIGNALS=y
+
+#
+# Power management options
+#
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PM is not set
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_MULTIPLE_TABLES is not set
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_LRO=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_NETFILTER_ADVANCED is not set
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=y
+CONFIG_NETFILTER_NETLINK_LOG=y
+CONFIG_NF_CONNTRACK=y
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IRC=y
+CONFIG_NF_CONNTRACK_SIP=y
+CONFIG_NF_CT_NETLINK=y
+CONFIG_NETFILTER_XTABLES=y
+CONFIG_NETFILTER_XT_TARGET_MARK=y
+CONFIG_NETFILTER_XT_TARGET_NFLOG=y
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
+CONFIG_NETFILTER_XT_MATCH_MARK=y
+CONFIG_NETFILTER_XT_MATCH_POLICY=y
+CONFIG_NETFILTER_XT_MATCH_STATE=y
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_DEFRAG_IPV4=y
+CONFIG_NF_CONNTRACK_IPV4=y
+# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+CONFIG_NF_NAT=y
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_NF_NAT_FTP=y
+CONFIG_NF_NAT_IRC=y
+# CONFIG_NF_NAT_TFTP is not set
+# CONFIG_NF_NAT_AMANDA is not set
+# CONFIG_NF_NAT_PPTP is not set
+# CONFIG_NF_NAT_H323 is not set
+CONFIG_NF_NAT_SIP=y
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_RDS is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+CONFIG_STP=y
+CONFIG_BRIDGE=y
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+CONFIG_LLC=y
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_IEEE802154 is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_WIRELESS=y
+CONFIG_WEXT_CORE=y
+CONFIG_WEXT_PROC=y
+CONFIG_CFG80211=y
+# CONFIG_NL80211_TESTMODE is not set
+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
+# CONFIG_CFG80211_REG_DEBUG is not set
+# CONFIG_CFG80211_DEFAULT_PS is not set
+# CONFIG_WIRELESS_OLD_REGULATORY is not set
+CONFIG_CFG80211_WEXT=y
+# CONFIG_WIRELESS_EXT_SYSFS is not set
+# CONFIG_LIB80211 is not set
+CONFIG_MAC80211=y
+# CONFIG_MAC80211_RC_PID is not set
+CONFIG_MAC80211_RC_MINSTREL=y
+# CONFIG_MAC80211_RC_DEFAULT_PID is not set
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT="minstrel"
+# CONFIG_MAC80211_MESH is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_DEVTMPFS is not set
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE="rt2561s.bin"
+CONFIG_EXTRA_FIRMWARE_DIR="firmware"
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_ADM8668_NOR=y
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_93CX6=y
+# CONFIG_CB710_CORE is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# You can enable one or both FireWire driver stacks.
+#
+
+#
+# The newer stack is recommended.
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ETHOC is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+# CONFIG_TULIP_NAPI_HW_MITIGATION is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_ULI526X is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+# CONFIG_KS8842 is not set
+# CONFIG_KS8851_MLL is not set
+# CONFIG_ATL2 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+CONFIG_WLAN=y
+# CONFIG_LIBERTAS_THINFIRM is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_RTL8180 is not set
+# CONFIG_ADM8211 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_MWL8K is not set
+# CONFIG_ATH_COMMON is not set
+# CONFIG_B43 is not set
+# CONFIG_B43LEGACY is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_IWLWIFI is not set
+# CONFIG_LIBERTAS is not set
+# CONFIG_HERMES is not set
+# CONFIG_P54_COMMON is not set
+CONFIG_RT2X00=y
+# CONFIG_RT2400PCI is not set
+# CONFIG_RT2500PCI is not set
+CONFIG_RT61PCI=y
+CONFIG_RT2800PCI_PCI=y
+# CONFIG_RT2800PCI is not set
+CONFIG_RT2X00_LIB_PCI=y
+CONFIG_RT2X00_LIB=y
+CONFIG_RT2X00_LIB_FIRMWARE=y
+CONFIG_RT2X00_LIB_CRYPTO=y
+# CONFIG_RT2X00_DEBUG is not set
+# CONFIG_WL12XX is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PPP=y
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=y
+# CONFIG_PPP_SYNC_TTY is not set
+# CONFIG_PPP_DEFLATE is not set
+# CONFIG_PPP_BSDCOMP is not set
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=y
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_VMXNET3 is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_DEVKMEM is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_SERIAL_ADM8668=y
+CONFIG_SERIAL_ADM8668_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGA_ARB is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_SOUND is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_UWB is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_INFINIBAND is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=y
+CONFIG_SQUASHFS=y
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=y
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff -Nwru original/linux-2.6.33.2/drivers/mtd/maps/adm8668.c linux-2.6.33.2/drivers/mtd/maps/adm8668.c
--- original/linux-2.6.33.2/drivers/mtd/maps/adm8668.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/drivers/mtd/maps/adm8668.c	2010-06-10 13:59:06.000000000 -0400
@@ -0,0 +1,122 @@
+
+/*
+ *  Copyright © 2001 Flaga hf. Medical Devices, Kári Davíðsson <kd@flaga.is>
+ *
+ *  $Id: nor_map.c,v 1.1.1.1 2008/07/10 16:56:13 thkang Exp $
+ *  
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <asm/io.h>
+
+#define FLASH_PHYS_ADDR             0x10000000
+#define FLASH_SIZE 	            0x800000 
+
+#define ADM8668_VMLINUZ_ADDR		0x00040000
+#define ADM8668_VMLINUZ_SIZE		0x001C0000
+
+#define ADM8668_LZMA_ADDR 	     	0x00200000
+#define ADM8668_LZMA_SIZE   	     	0x00400000
+
+struct mtd_partition nor_parts[] = {
+	{
+		.name =		"vmlinuz",
+		.offset =	ADM8668_VMLINUZ_ADDR,
+		.size =		ADM8668_VMLINUZ_SIZE
+	},
+	{
+		.name =		"rootfs",
+		.offset =	ADM8668_LZMA_ADDR,
+		.size =		ADM8668_LZMA_SIZE
+	},
+	{
+		.name =		"user",
+		.offset =	0x600000,
+		.size =		0x200000
+	},
+	{
+		.name =		"firmware",
+		.offset =	ADM8668_VMLINUZ_ADDR,
+		.size =		ADM8668_LZMA_SIZE+ADM8668_VMLINUZ_SIZE
+	},
+};
+
+#define PARTITION_COUNT (sizeof(nor_parts)/sizeof(struct mtd_partition))
+
+static struct mtd_info *mymtd;
+
+static struct map_info nor_map = {
+	name:		"adm8668",
+	size:		FLASH_SIZE,
+	phys:		FLASH_PHYS_ADDR,
+	bankwidth:	2,
+};
+
+int __init init_adm8668_flash(void)
+{
+	printk(KERN_NOTICE "ADM8668 NOR flash device: %x at %x\n",
+			FLASH_SIZE, FLASH_PHYS_ADDR);
+
+	nor_map.virt = ioremap(FLASH_PHYS_ADDR, FLASH_SIZE);
+
+	if (!nor_map.virt) {
+		printk("Failed to ioremap\n");
+		return -EIO;
+	}
+
+	simple_map_init(&nor_map);
+
+	mymtd = do_map_probe("cfi_probe", &nor_map);
+	if (mymtd) {
+		mymtd->owner = THIS_MODULE;
+		add_mtd_partitions(mymtd, nor_parts, PARTITION_COUNT);
+		printk(KERN_NOTICE "ADM8668 NOR flash device initialized\n");
+		return 0;
+	}
+
+	iounmap((void *)nor_map.virt);
+	return -ENXIO;
+}
+
+static void __exit cleanup_adm8668_flash(void)
+{
+	if (mymtd) {
+		del_mtd_partitions(mymtd);
+		map_destroy(mymtd);
+	}
+	if (nor_map.virt) {
+		iounmap((void *)nor_map.virt);
+		nor_map.virt = 0;
+	}
+}
+
+module_init(init_adm8668_flash);
+module_exit(cleanup_adm8668_flash);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jeanson Hung <jeanson.hung@infineon.com>");
+MODULE_DESCRIPTION("MTD map driver for ADM8668 NOR Flash");
diff -Nwru original/linux-2.6.33.2/drivers/mtd/maps/Kconfig linux-2.6.33.2/drivers/mtd/maps/Kconfig
--- original/linux-2.6.33.2/drivers/mtd/maps/Kconfig	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/mtd/maps/Kconfig	2010-04-13 13:31:57.000000000 -0400
@@ -103,6 +103,12 @@
 	default "0x02000000"
 	depends on MSP_FLASH_MAP_LIMIT_32M
 
+config MTD_ADM8668_NOR
+	tristate "ADM8668 NOR mapping"
+	depends on ADM8668 && MTD_CFI
+	help
+	  mapping driver for ADM8668 NOR
+
 config MTD_SUN_UFLASH
 	tristate "Sun Microsystems userflash support"
 	depends on SPARC && MTD_CFI && PCI
diff -Nwru original/linux-2.6.33.2/drivers/mtd/maps/Makefile linux-2.6.33.2/drivers/mtd/maps/Makefile
--- original/linux-2.6.33.2/drivers/mtd/maps/Makefile	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/mtd/maps/Makefile	2010-04-13 13:33:40.000000000 -0400
@@ -7,6 +7,7 @@
 endif
 
 # Chip mappings
+obj-$(CONFIG_MTD_ADM8668_NOR)	+= adm8668.o
 obj-$(CONFIG_MTD_CDB89712)	+= cdb89712.o
 obj-$(CONFIG_MTD_ARM_INTEGRATOR)+= integrator-flash.o
 obj-$(CONFIG_MTD_CFI_FLAGADM)	+= cfi_flagadm.o
diff -Nwru original/linux-2.6.33.2/drivers/net/tulip/interrupt.c linux-2.6.33.2/drivers/net/tulip/interrupt.c
--- original/linux-2.6.33.2/drivers/net/tulip/interrupt.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/net/tulip/interrupt.c	2010-04-14 11:22:53.000000000 -0400
@@ -115,6 +115,9 @@
 #ifdef CONFIG_TULIP_NAPI_HW_MITIGATION
 	int received = 0;
 #endif
+#ifdef CONFIG_ADM8668
+	int csr6 = 0;
+#endif
 
 #ifdef CONFIG_TULIP_NAPI_HW_MITIGATION
 
@@ -159,6 +162,15 @@
 			*/
 		       pkt_len = ((status >> 16) & 0x7ff) - 4;
 
+#ifdef CONFIG_ADM8668
+			if (tp->chip_id == IFADMNET) /* 2 byte shift */
+			{
+				csr6 = inl(dev->base_addr + CSR6);
+				if (csr6 & 0x1)
+					pkt_len += 2;
+			}
+#endif
+
 		       /*
 			* Maximum pkt_len is 1518 (1514 + vlan header)
 			* Anything higher than this is always invalid
@@ -223,6 +235,10 @@
                                        char *temp = skb_put(skb = tp->rx_buffers[entry].skb,
                                                             pkt_len);
 
+#ifdef CONFIG_ADM8668
+					if ((tp->chip_id == IFADMNET) && (csr6 & 1))
+						skb_pull(skb, 2);
+#endif
 #ifndef final_version
                                        if (tp->rx_buffers[entry].mapping !=
                                            le32_to_cpu(tp->rx_ring[entry].buffer1)) {
diff -Nwru original/linux-2.6.33.2/drivers/net/tulip/Makefile linux-2.6.33.2/drivers/net/tulip/Makefile
--- original/linux-2.6.33.2/drivers/net/tulip/Makefile	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/net/tulip/Makefile	2010-04-14 12:44:35.000000000 -0400
@@ -12,6 +12,9 @@
 
 # Declare multi-part drivers.
 
+# i dunno. need separate this better? :)
+cflags-$(CONFIG_ADM8668)	+= -I$(srctree)/arch/mips/include/asm/mach-adm8668
+
 tulip-objs			:= eeprom.o interrupt.o media.o \
 				   timer.o tulip_core.o		\
 				   21142.o pnic.o pnic2.o
diff -Nwru original/linux-2.6.33.2/drivers/net/tulip/tulip_core.c linux-2.6.33.2/drivers/net/tulip/tulip_core.c
--- original/linux-2.6.33.2/drivers/net/tulip/tulip_core.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/net/tulip/tulip_core.c	2010-05-28 14:07:55.000000000 -0400
@@ -208,6 +208,9 @@
   { "Conexant LANfinity", 256, 0x0001ebef,
 	HAS_MII | HAS_ACPI, tulip_timer, tulip_media_task },
 
+  /* adm8668 */
+  { "Infineon-ADMtek onchip network", 256, 0x0001a451,
+    MC_HASH_ONLY | COMET_MAC_ADDR, comet_timer },
 };
 
 
@@ -251,6 +254,8 @@
 	{ 0x14ea, 0xab08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* Planex FNW-3602-TX */
 	{ 0x1414, 0x0001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* Microsoft MN-120 */
 	{ 0x1414, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+	{ 0x1317, 0x8688, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+	{ 0x1317, 0x8668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ } /* terminate list */
 };
 MODULE_DEVICE_TABLE(pci, tulip_pci_tbl);
@@ -474,6 +479,10 @@
 		tp->csr6 = 0x00040000;
 	} else if (tp->chip_id == AX88140) {
 		tp->csr6 = tp->mii_cnt ? 0x00040100 : 0x00000100;
+	} else if (tp->chip_id == IFADMNET) {
+		iowrite32(0x400008, ioaddr + 0x88);
+		dev->if_port = tp->mii_cnt ? 11 : 0;
+		tp->csr6 = 0x00040000;
 	} else
 		tulip_select_media(dev, 1);
 
@@ -557,6 +566,10 @@
 		       "CSR6/7 %8.8x / %8.8x CSR12 %8.8x, resetting...\n",
 		       dev->name, (int)ioread32(ioaddr + CSR5), (int)ioread32(ioaddr + CSR6),
 		       (int)ioread32(ioaddr + CSR7), (int)ioread32(ioaddr + CSR12));
+	} else if (tp->chip_id == IFADMNET) {
+		printk(KERN_WARNING "%s: IFADMNET xmit timeout, status %8.8x "
+					", resetting...\n",
+					dev->name, ioread32(ioaddr + CSR5));
 	} else {
 		printk(KERN_WARNING "%s: Transmit timed out, status %8.8x, CSR12 "
 			   "%8.8x, resetting...\n",
@@ -615,6 +628,8 @@
 	for (i = 0; i < RX_RING_SIZE; i++) {
 		tp->rx_ring[i].status = 0x00000000;
 		tp->rx_ring[i].length = cpu_to_le32(PKT_BUF_SZ);
+		if (tp->chip_id == IFADMNET)
+			tp->rx_ring[i].length |= BIT_24;
 		tp->rx_ring[i].buffer2 = cpu_to_le32(tp->rx_ring_dma + sizeof(struct tulip_rx_desc) * (i + 1));
 		tp->rx_buffers[i].skb = NULL;
 		tp->rx_buffers[i].mapping = 0;
@@ -648,6 +663,8 @@
 		tp->tx_buffers[i].skb = NULL;
 		tp->tx_buffers[i].mapping = 0;
 		tp->tx_ring[i].status = 0x00000000;
+		if (tp->chip_id == IFADMNET)
+			tp->tx_ring[i].status |= BIT_24;
 		tp->tx_ring[i].buffer2 = cpu_to_le32(tp->tx_ring_dma + sizeof(struct tulip_tx_desc) * (i + 1));
 	}
 	tp->tx_ring[i-1].buffer2 = cpu_to_le32(tp->tx_ring_dma);
@@ -889,7 +906,7 @@
 			data->phy_id = phy;
 		else if (tp->flags & HAS_NWAY)
 			data->phy_id = 32;
-		else if (tp->chip_id == COMET)
+		else if ((tp->chip_id == COMET) || (tp->chip_id == IFADMNET))
 			data->phy_id = 1;
 		else
 			return -ENODEV;
@@ -1155,6 +1172,16 @@
 		spin_unlock_irqrestore(&tp->lock, flags);
 	}
 
+#ifdef CONFIG_ADM8668
+	if (tp->chip_id == IFADMNET)
+	{
+		if ((int)ioaddr == ADM8668_LAN_BASE)
+			csr6 |= BIT_9;	/* force 100Mbps full duplex */
+		csr6 |= BIT_0;	/* pad 2 bytes when Rx.
+				 * but why? -neutronscott */
+	}
+#endif
+
 	iowrite32(csr6, ioaddr + CSR6);
 }
 
@@ -1295,6 +1322,9 @@
 
 	board_idx++;
 
+	if (board_idx == 0) irq = 8;
+	else irq = 7;
+
 	/*
 	 *	Lan media wire a tulip chip to a wan interface. Needs a very
 	 *	different driver (lmc driver)
@@ -1378,8 +1408,6 @@
 		return i;
 	}
 
-	irq = pdev->irq;
-
 	/* alloc_etherdev ensures aligned and zeroed private structures */
 	dev = alloc_etherdev (sizeof (*tp));
 	if (!dev) {
@@ -1737,6 +1765,28 @@
 	/* put the chip in snooze mode until opened */
 	tulip_set_power_state (tp, 0, 1);
 
+	/* let's clone eth0 (wan) to make eth1 (lan)
+	 * cos i'm too lazy (and ill-educated) to do it the right way :(
+	 * the init func just uses too much pci stuff, and eth1 isn't
+	 * really advertised as pci as eth0 is... oh well.
+	 * --neutronscott
+	 */
+
+	if (board_idx == 0)
+	{
+		int whocares;
+
+		pdev->resource->start = 0x11A00000;
+		pdev->resource->end = 0x11A00000 + 256;
+		/* it is 0000:00:00.0 but netdevice_register will register
+		 * the parent in sysfs, and it will already be done, thus
+		 * it'll be like, omg and freak out!
+		 */
+		whocares = kobject_rename(&(pdev->dev.kobj), "0000:00:00.1");
+		tulip_init_one(pdev, ent);
+		whocares = kobject_rename(&(pdev->dev.kobj), "0000:00:00.0");
+	}
+
 	return 0;
 
 err_out_free_ring:
@@ -1754,6 +1804,7 @@
 
 err_out_free_netdev:
 	free_netdev (dev);
+	printk("TULIP: err_out :(\n");
 	return -ENODEV;
 }
 
@@ -1894,3 +1945,4 @@
 
 module_init(tulip_init);
 module_exit(tulip_cleanup);
+EXPORT_SYMBOL(tulip_init_one);
diff -Nwru original/linux-2.6.33.2/drivers/net/tulip/tulip.h linux-2.6.33.2/drivers/net/tulip/tulip.h
--- original/linux-2.6.33.2/drivers/net/tulip/tulip.h	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/net/tulip/tulip.h	2010-04-14 12:44:50.000000000 -0400
@@ -26,7 +26,10 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/unaligned.h>
-
+#ifdef CONFIG_ADM8668
+#include <adm8668.h>
+#include <flash.h>
+#endif
 
 
 /* undefine, or define to various debugging levels (>4 == obscene levels) */
@@ -89,6 +92,7 @@
 	I21145,
 	DM910X,
 	CONEXANT,
+	IFADMNET,
 };
 
 
diff -Nwru original/linux-2.6.33.2/drivers/serial/Kconfig linux-2.6.33.2/drivers/serial/Kconfig
--- original/linux-2.6.33.2/drivers/serial/Kconfig	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/serial/Kconfig	2010-04-11 12:14:59.000000000 -0400
@@ -1477,6 +1477,25 @@
 	  If you have enabled the serial port on the bcm63xx CPU
 	  you can make it the console by answering Y to this option.
 
+config SERIAL_ADM8668
+	tristate "adm8668 serial port support"
+	select SERIAL_CORE
+	depends on ADM8668
+	help
+	  If you have an adm8668 CPU, you can enable its onboard
+	  serial port by enabling this options.
+
+          To compile this driver as a module, choose M here: the
+          module will be called adm8668_uart.
+
+config SERIAL_ADM8668_CONSOLE
+	bool "Console on bcm63xx serial port"
+	depends on SERIAL_ADM8668=y
+	select SERIAL_CORE_CONSOLE
+	help
+	  If you have enabled the serial port on the adm8668 CPU
+	  you can make it the console by answering Y to this option.
+
 config SERIAL_GRLIB_GAISLER_APBUART
 	tristate "GRLIB APBUART serial support"
 	depends on OF
diff -Nwru original/linux-2.6.33.2/drivers/usb/core/hcd-arc.c linux-2.6.33.2/drivers/usb/core/hcd-arc.c
--- original/linux-2.6.33.2/drivers/usb/core/hcd-arc.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/drivers/usb/core/hcd-arc.c	2010-04-16 11:31:25.000000000 -0400
@@ -0,0 +1,382 @@
+/*
+ * (C) Copyright David Brownell 2000-2002
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/usb.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#ifdef CONFIG_PPC_PMAC
+#include <asm/machdep.h>
+#include <asm/pmac_feature.h>
+#include <asm/pci-bridge.h>
+#include <asm/prom.h>
+#endif
+
+#include "usb.h"
+#include "hcd.h"
+
+
+/* PCI-based HCs are common, but plenty of non-PCI HCs are used too */
+
+
+/*-------------------------------------------------------------------------*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+/**
+ * usb_hcd_pci_probe - initialize PCI-based HCDs
+ * @dev: USB Host Controller being probed
+ * @id: pci hotplug id connecting controller to HCD framework
+ * Context: !in_interrupt()
+ *
+ * Allocates basic PCI resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ * Store this function in the HCD's struct pci_driver as probe().
+ */
+int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
+{
+	struct hc_driver	*driver;
+	struct usb_hcd		*hcd;
+	int			retval;
+
+	if (usb_disabled())
+		return -ENODEV;
+
+	if (!id)
+		return -EINVAL;
+	driver = (struct hc_driver *)id->driver_data;
+	if (!driver)
+		return -EINVAL;
+
+	if (pci_enable_device(dev) < 0)
+		return -ENODEV;
+	dev->current_state = PCI_D0;
+
+	if (!dev->irq) {
+		dev_err(&dev->dev,
+			"Found HC with no IRQ.  Check BIOS/PCI %s setup!\n",
+			pci_name(dev));
+		retval = -ENODEV;
+		goto err1;
+	}
+
+	hcd = usb_create_hcd(driver, &dev->dev, pci_name(dev));
+	if (!hcd) {
+		retval = -ENOMEM;
+		goto err1;
+	}
+
+	if (driver->flags & HCD_MEMORY) {
+		/* EHCI, OHCI */
+		hcd->rsrc_start = pci_resource_start(dev, 0);
+		hcd->rsrc_len = pci_resource_len(dev, 0);
+		if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
+				driver->description)) {
+			dev_dbg(&dev->dev, "controller already in use\n");
+			retval = -EBUSY;
+			goto err2;
+		}
+		hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
+		if (hcd->regs == NULL) {
+			dev_dbg(&dev->dev, "error mapping memory\n");
+			retval = -EFAULT;
+			goto err3;
+		}
+
+	} else {
+		/* UHCI */
+		int	region;
+
+		for (region = 0; region < PCI_ROM_RESOURCE; region++) {
+			if (!(pci_resource_flags(dev, region) &
+					IORESOURCE_IO))
+				continue;
+
+			hcd->rsrc_start = pci_resource_start(dev, region);
+			hcd->rsrc_len = pci_resource_len(dev, region);
+			if (request_region(hcd->rsrc_start, hcd->rsrc_len,
+					driver->description))
+				break;
+		}
+		if (region == PCI_ROM_RESOURCE) {
+			dev_dbg(&dev->dev, "no i/o regions available\n");
+			retval = -EBUSY;
+			goto err1;
+		}
+	}
+
+	pci_set_master(dev);
+
+	retval = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED);
+	if (retval != 0)
+		goto err4;
+	return retval;
+
+ err4:
+	if (driver->flags & HCD_MEMORY) {
+		iounmap(hcd->regs);
+ err3:
+		release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+	} else
+		release_region(hcd->rsrc_start, hcd->rsrc_len);
+ err2:
+	usb_put_hcd(hcd);
+ err1:
+	pci_disable_device(dev);
+	dev_err(&dev->dev, "init %s fail, %d\n", pci_name(dev), retval);
+	return retval;
+}
+EXPORT_SYMBOL_GPL(usb_hcd_pci_probe);
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_pci_remove - shutdown processing for PCI-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_pci_probe(), first invoking
+ * the HCD's stop() method.  It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ * Store this function in the HCD's struct pci_driver as remove().
+ */
+void usb_hcd_pci_remove(struct pci_dev *dev)
+{
+	struct usb_hcd		*hcd;
+
+	hcd = pci_get_drvdata(dev);
+	if (!hcd)
+		return;
+
+	usb_remove_hcd(hcd);
+	if (hcd->driver->flags & HCD_MEMORY) {
+		iounmap(hcd->regs);
+		release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+	} else {
+		release_region(hcd->rsrc_start, hcd->rsrc_len);
+	}
+	usb_put_hcd(hcd);
+	pci_disable_device(dev);
+}
+EXPORT_SYMBOL_GPL(usb_hcd_pci_remove);
+
+/**
+ * usb_hcd_pci_shutdown - shutdown host controller
+ * @dev: USB Host Controller being shutdown
+ */
+void usb_hcd_pci_shutdown(struct pci_dev *dev)
+{
+	struct usb_hcd		*hcd;
+
+	hcd = pci_get_drvdata(dev);
+	if (!hcd)
+		return;
+
+	if (hcd->driver->shutdown)
+		hcd->driver->shutdown(hcd);
+}
+EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown);
+
+#ifdef	CONFIG_PM_SLEEP
+
+static int check_root_hub_suspended(struct device *dev)
+{
+	struct pci_dev		*pci_dev = to_pci_dev(dev);
+	struct usb_hcd		*hcd = pci_get_drvdata(pci_dev);
+
+	if (!(hcd->state == HC_STATE_SUSPENDED ||
+			hcd->state == HC_STATE_HALT)) {
+		dev_warn(dev, "Root hub is not suspended\n");
+		return -EBUSY;
+	}
+	return 0;
+}
+
+static int hcd_pci_suspend(struct device *dev)
+{
+	struct pci_dev		*pci_dev = to_pci_dev(dev);
+	struct usb_hcd		*hcd = pci_get_drvdata(pci_dev);
+	int			retval;
+
+	/* Root hub suspend should have stopped all downstream traffic,
+	 * and all bus master traffic.  And done so for both the interface
+	 * and the stub usb_device (which we check here).  But maybe it
+	 * didn't; writing sysfs power/state files ignores such rules...
+	 */
+	retval = check_root_hub_suspended(dev);
+	if (retval)
+		return retval;
+
+	/* We might already be suspended (runtime PM -- not yet written) */
+	if (pci_dev->current_state != PCI_D0)
+		return retval;
+
+	if (hcd->driver->pci_suspend) {
+		retval = hcd->driver->pci_suspend(hcd);
+		suspend_report_result(hcd->driver->pci_suspend, retval);
+		if (retval)
+			return retval;
+	}
+
+	synchronize_irq(pci_dev->irq);
+
+	/* Downstream ports from this root hub should already be quiesced, so
+	 * there will be no DMA activity.  Now we can shut down the upstream
+	 * link (except maybe for PME# resume signaling).  We'll enter a
+	 * low power state during suspend_noirq, if the hardware allows.
+	 */
+	pci_disable_device(pci_dev);
+	return retval;
+}
+
+static int hcd_pci_suspend_noirq(struct device *dev)
+{
+	struct pci_dev		*pci_dev = to_pci_dev(dev);
+	struct usb_hcd		*hcd = pci_get_drvdata(pci_dev);
+	int			retval;
+
+	retval = check_root_hub_suspended(dev);
+	if (retval)
+		return retval;
+
+	pci_save_state(pci_dev);
+
+	/* If the root hub is HALTed rather than SUSPENDed,
+	 * disallow remote wakeup.
+	 */
+	if (hcd->state == HC_STATE_HALT)
+		device_set_wakeup_enable(dev, 0);
+	dev_dbg(dev, "wakeup: %d\n", device_may_wakeup(dev));
+
+	/* Possibly enable remote wakeup,
+	 * choose the appropriate low-power state, and go to that state.
+	 */
+	retval = pci_prepare_to_sleep(pci_dev);
+	if (retval == -EIO) {		/* Low-power not supported */
+		dev_dbg(dev, "--> PCI D0 legacy\n");
+		retval = 0;
+	} else if (retval == 0) {
+		dev_dbg(dev, "--> PCI %s\n",
+				pci_power_name(pci_dev->current_state));
+	} else {
+		suspend_report_result(pci_prepare_to_sleep, retval);
+		return retval;
+	}
+
+#ifdef CONFIG_PPC_PMAC
+	/* Disable ASIC clocks for USB */
+	if (machine_is(powermac)) {
+		struct device_node	*of_node;
+
+		of_node = pci_device_to_OF_node(pci_dev);
+		if (of_node)
+			pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
+	}
+#endif
+	return retval;
+}
+
+static int hcd_pci_resume_noirq(struct device *dev)
+{
+	struct pci_dev		*pci_dev = to_pci_dev(dev);
+
+#ifdef CONFIG_PPC_PMAC
+	/* Reenable ASIC clocks for USB */
+	if (machine_is(powermac)) {
+		struct device_node *of_node;
+
+		of_node = pci_device_to_OF_node(pci_dev);
+		if (of_node)
+			pmac_call_feature(PMAC_FTR_USB_ENABLE,
+						of_node, 0, 1);
+	}
+#endif
+
+	/* Go back to D0 and disable remote wakeup */
+	pci_back_from_sleep(pci_dev);
+	return 0;
+}
+
+static int resume_common(struct device *dev, bool hibernated)
+{
+	struct pci_dev		*pci_dev = to_pci_dev(dev);
+	struct usb_hcd		*hcd = pci_get_drvdata(pci_dev);
+	int			retval;
+
+	if (hcd->state != HC_STATE_SUSPENDED) {
+		dev_dbg(dev, "can't resume, not suspended!\n");
+		return 0;
+	}
+
+	retval = pci_enable_device(pci_dev);
+	if (retval < 0) {
+		dev_err(dev, "can't re-enable after resume, %d!\n", retval);
+		return retval;
+	}
+
+	pci_set_master(pci_dev);
+
+	clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
+
+	if (hcd->driver->pci_resume) {
+		retval = hcd->driver->pci_resume(hcd, hibernated);
+		if (retval) {
+			dev_err(dev, "PCI post-resume error %d!\n", retval);
+			usb_hc_died(hcd);
+		}
+	}
+	return retval;
+}
+
+static int hcd_pci_resume(struct device *dev)
+{
+	return resume_common(dev, false);
+}
+
+static int hcd_pci_restore(struct device *dev)
+{
+	return resume_common(dev, true);
+}
+
+const struct dev_pm_ops usb_hcd_pci_pm_ops = {
+	.suspend	= hcd_pci_suspend,
+	.suspend_noirq	= hcd_pci_suspend_noirq,
+	.resume_noirq	= hcd_pci_resume_noirq,
+	.resume		= hcd_pci_resume,
+	.freeze		= check_root_hub_suspended,
+	.freeze_noirq	= check_root_hub_suspended,
+	.thaw_noirq	= NULL,
+	.thaw		= NULL,
+	.poweroff	= hcd_pci_suspend,
+	.poweroff_noirq	= hcd_pci_suspend_noirq,
+	.restore_noirq	= hcd_pci_resume_noirq,
+	.restore	= hcd_pci_restore,
+};
+EXPORT_SYMBOL_GPL(usb_hcd_pci_pm_ops);
+
+#endif	/* CONFIG_PM_SLEEP */
diff -Nwru original/linux-2.6.33.2/drivers/usb/core/hcd.c linux-2.6.33.2/drivers/usb/core/hcd.c
--- original/linux-2.6.33.2/drivers/usb/core/hcd.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/usb/core/hcd.c	2010-06-01 21:09:12.000000000 -0400
@@ -2106,9 +2106,11 @@
 	switch (hcd->driver->flags & HCD_MASK) {
 	case HCD_USB11:
 		rhdev->speed = USB_SPEED_FULL;
+	printk("HCD SPEED: FULL\n");
 		break;
 	case HCD_USB2:
 		rhdev->speed = USB_SPEED_HIGH;
+	printk("HCD SPEED: HIGH\n");
 		break;
 	case HCD_USB3:
 		rhdev->speed = USB_SPEED_SUPER;
diff -Nwru original/linux-2.6.33.2/drivers/usb/core/hcd-pci.c linux-2.6.33.2/drivers/usb/core/hcd-pci.c
--- original/linux-2.6.33.2/drivers/usb/core/hcd-pci.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/usb/core/hcd-pci.c	2010-04-16 12:52:03.000000000 -0400
@@ -61,6 +61,7 @@
 	struct usb_hcd		*hcd;
 	int			retval;
 
+	printk("usb_hcd_pci_probe();\n");
 	if (usb_disabled())
 		return -ENODEV;
 
diff -Nwru original/linux-2.6.33.2/drivers/usb/core/hub.c linux-2.6.33.2/drivers/usb/core/hub.c
--- original/linux-2.6.33.2/drivers/usb/core/hub.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/usb/core/hub.c	2010-05-29 13:22:25.000000000 -0400
@@ -682,6 +682,7 @@
 	bool need_debounce_delay = false;
 	unsigned delay;
 
+	printk("hub_activate: part %d\n", type);
 	/* Continue a partial initialization */
 	if (type == HUB_INIT2)
 		goto init2;
@@ -1955,7 +1956,8 @@
 #define SET_ADDRESS_TRIES	2
 #define GET_DESCRIPTOR_TRIES	2
 #define SET_CONFIG_TRIES	(2 * (use_both_schemes + 1))
-#define USE_NEW_SCHEME(i)	((i) / 2 == old_scheme_first)
+#define	USE_NEW_SCHEME(i)	0
+//#define USE_NEW_SCHEME(i)	((i) / 2 == old_scheme_first)
 
 #define HUB_ROOT_RESET_TIME	50	/* times are in msec */
 #define HUB_SHORT_RESET_TIME	10
@@ -1974,31 +1976,41 @@
 			delay_time += delay) {
 		/* wait to give the device a chance to reset */
 		msleep(delay);
-
+		printk("hub_port_wait_reset[%d] delay=%d\n", delay_time, delay);
 		/* read and decode port status */
 		ret = hub_port_status(hub, port1, &portstatus, &portchange);
-		if (ret < 0)
+		if (ret < 0) {
+			printk("hub_port_wait_reset:hub_port_status==%d\n", ret);
 			return ret;
+		}
 
 		/* Device went away? */
-		if (!(portstatus & USB_PORT_STAT_CONNECTION))
+		if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
+			printk("hub_port_wait_reset: device went away\n");
 			return -ENOTCONN;
+		}
 
 		/* bomb out completely if the connection bounced */
-		if ((portchange & USB_PORT_STAT_C_CONNECTION))
-			return -ENOTCONN;
+		if ((portchange & USB_PORT_STAT_C_CONNECTION)) {
+			printk("hub_port_wait_reset: bomb out - bounced\n");
+//			return -ENOTCONN;
+		}
 
 		/* if we`ve finished resetting, then break out of the loop */
 		if (!(portstatus & USB_PORT_STAT_RESET) &&
 		    (portstatus & USB_PORT_STAT_ENABLE)) {
 			if (hub_is_wusb(hub))
 				udev->speed = USB_SPEED_VARIABLE;
-			else if (portstatus & USB_PORT_STAT_HIGH_SPEED)
+			else if (portstatus & USB_PORT_STAT_HIGH_SPEED) {
+				printk("hub_port_wait_reset: try HIGH\n");
 				udev->speed = USB_SPEED_HIGH;
-			else if (portstatus & USB_PORT_STAT_LOW_SPEED)
+			} else if (portstatus & USB_PORT_STAT_LOW_SPEED) {
+				printk("hub_port_wait_reset: try LOW\n");
 				udev->speed = USB_SPEED_LOW;
-			else
+			} else {
+				printk("hub_port_wait_reset: try FULL\n");
 				udev->speed = USB_SPEED_FULL;
+			}
 			return 0;
 		}
 
@@ -2011,6 +2023,7 @@
 			port1, delay);
 	}
 
+	printk("hub_port_wait_reset: loop ended. EBUSY\n");
 	return -EBUSY;
 }
 
@@ -2028,12 +2041,14 @@
 	for (i = 0; i < PORT_RESET_TRIES; i++) {
 		status = set_port_feature(hub->hdev,
 				port1, USB_PORT_FEAT_RESET);
+		printk("usb_port_reset, set_port_feature=%d\n", status);
 		if (status)
 			dev_err(hub->intfdev,
 					"cannot reset port %d (err = %d)\n",
 					port1, status);
 		else {
 			status = hub_port_wait_reset(hub, port1, udev, delay);
+			printk("usb_port_reset:hub_port_wait_reset=%d\n", status);
 			if (status && status != -ENOTCONN)
 				dev_dbg(hub->intfdev,
 						"port_wait_reset: err = %d\n",
@@ -2605,6 +2620,7 @@
 		retval = usb_control_msg(udev, usb_sndaddr0pipe(),
 				USB_REQ_SET_ADDRESS, 0, devnum, 0,
 				NULL, 0, USB_CTRL_SET_TIMEOUT);
+		printk("hub_set_address:usb_control_msg=%d\n",retval);
 		if (retval == 0)
 			update_address(udev, devnum);
 	}
@@ -2671,6 +2687,7 @@
 		retval = hub_port_reset(hub, port1, udev, delay);
 		if (retval < 0)		/* error or disconnect */
 			goto fail;
+		printk("hub_port_init:hub_port_reset=%d\n", retval);
 		/* success, speed is known */
 	}
 	retval = -ENODEV;
@@ -2730,12 +2747,16 @@
 
 	/* Set up TT records, if needed  */
 	if (hdev->tt) {
+		printk("setup tt cos hdev->tt\n");
 		udev->tt = hdev->tt;
 		udev->ttport = hdev->ttport;
 	} else if (udev->speed != USB_SPEED_HIGH
 			&& hdev->speed == USB_SPEED_HIGH) {
+		printk("setup tt cos speed mismatch\n");
 		udev->tt = &hub->tt;
 		udev->ttport = port1;
+	} else {
+		printk("no setup tt!!??\n");
 	}
  
 	/* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
@@ -2777,6 +2798,7 @@
 					USB_DT_DEVICE << 8, 0,
 					buf, GET_DESCRIPTOR_BUFSIZE,
 					initial_descriptor_timeout);
+				printk("usb_hub_init: Get Desc size (r)=%d\n", r);
 				switch (buf->bMaxPacketSize0) {
 				case 8: case 16: case 32: case 64: case 255:
 					if (buf->bDescriptorType ==
@@ -2792,14 +2814,21 @@
 				}
 				if (r == 0)
 					break;
+				msleep(500);
 			}
+			if (buf->bMaxPacketSize0 == 0)
+				buf->bMaxPacketSize0 = 64;
 			udev->descriptor.bMaxPacketSize0 =
 					buf->bMaxPacketSize0;
+			printk("Found new MaxPacketSize: %d\n", buf->bMaxPacketSize0);
 			kfree(buf);
 
 			retval = hub_port_reset(hub, port1, udev, delay);
 			if (retval < 0)		/* error or disconnect */
+			{
+				printk("now hub_port_reset fails==%d?\n",retval);
 				goto fail;
+			}
 			if (oldspeed != udev->speed) {
 				dev_dbg(&udev->dev,
 					"device reset changed speed!\n");
@@ -2814,7 +2843,7 @@
 				continue;
 			}
 #undef GET_DESCRIPTOR_BUFSIZE
-		}
+		} // end new scheme bullshit
 
  		/*
  		 * If device is WUSB, we already assigned an
@@ -2824,6 +2853,7 @@
 		if (udev->wusb == 0) {
 			for (j = 0; j < SET_ADDRESS_TRIES; ++j) {
 				retval = hub_set_address(udev, devnum);
+				printk("hub_set_address[%d]==%d\n",devnum,retval);
 				if (retval >= 0)
 					break;
 				msleep(200);
@@ -2863,8 +2893,10 @@
 			break;
 		}
 	}
-	if (retval)
+	if (retval) {
+		printk("unknown fail. retval=%d\n", retval);
 		goto fail;
+	}
 
 	if (udev->descriptor.bMaxPacketSize0 == 0xff ||
 			udev->speed == USB_SPEED_SUPER)
@@ -3072,7 +3104,6 @@
 	}
 
 	for (i = 0; i < SET_CONFIG_TRIES; i++) {
-
 		/* reallocate for each attempt, since references
 		 * to the previous one can escape in various ways
 		 */
@@ -3121,9 +3152,10 @@
 
 		/* reset (non-USB 3.0 devices) and get descriptor */
 		status = hub_port_init(hub, udev, port1, i);
-		if (status < 0)
+		if (status < 0) {
+			printk("hub_port_init()==%d\n", status);
 			goto loop;
-
+		}
 		/* consecutive bus-powered hubs aren't reliable; they can
 		 * violate the voltage drop budget.  if the new child has
 		 * a "powered" LED, users should notice we didn't enable it
@@ -3134,6 +3166,7 @@
 				&& udev->bus_mA <= 100) {
 			u16	devstat;
 
+			printk("consecutive bus-powered hub???!!!\n");
 			status = usb_get_status(udev, USB_RECIP_DEVICE, 0,
 					&devstat);
 			if (status < 2) {
@@ -3181,6 +3214,7 @@
 		/* Run it through the hoops (find a driver, etc) */
 		if (!status) {
 			status = usb_new_device(udev);
+			printk("usb_new_device() status==%d\n", status);
 			if (status) {
 				spin_lock_irq(&device_state_lock);
 				hdev->children[port1-1] = NULL;
@@ -3204,9 +3238,12 @@
 		release_address(udev);
 		hub_free_dev(udev);
 		usb_put_dev(udev);
-		if ((status == -ENOTCONN) || (status == -ENOTSUPP))
+		if ((status == -ENOTCONN) || (status == -ENOTSUPP)) {
+			printk("usb enum try #%d, status==%d [notconn or notsupp] :(\n", i, status);
 			break;
 	}
+
+	}
 	if (hub->hdev->parent ||
 			!hcd->driver->port_handed_over ||
 			!(hcd->driver->port_handed_over)(hcd, port1))
diff -Nwru original/linux-2.6.33.2/drivers/usb/host/ehci-adm8668.c linux-2.6.33.2/drivers/usb/host/ehci-adm8668.c
--- original/linux-2.6.33.2/drivers/usb/host/ehci-adm8668.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/drivers/usb/host/ehci-adm8668.c	2010-06-01 21:30:32.000000000 -0400
@@ -0,0 +1,200 @@
+/*
+ * EHCI HCD (Host Controller Driver) for USB.
+ *
+ * Bus Glue for ADM8668
+ *
+ * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org>
+ *
+ * Modified for AMD Alchemy Au1200 EHC
+ *  by K.Boge <karsten.boge@amd.com>
+ *
+ * Modified for ADM8668
+ *  by neutronscott <sn@scottn.us>
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <linux/platform_device.h>
+
+extern int usb_disabled(void);
+
+static void adm8668_start_ehc(void)
+{
+	volatile u32 *ptr2workAround, version_id;
+
+	ptr2workAround = (volatile u32 *)0xB1400000;
+	version_id = *ptr2workAround;
+
+	ptr2workAround = (volatile u32 *)0xB1400108;
+	*ptr2workAround = 0x0C1600D9;
+	if (version_id != 0x86880001)
+	{
+		*ptr2workAround = *ptr2workAround & ~(3<<20);
+		*ptr2workAround = *ptr2workAround | (1<<20);
+	}
+	printk("ADM8668 version: %x\n", version_id);
+}
+
+static void adm8668_stop_ehc(void)
+{
+
+}
+
+static int ehci_adm8668_setup(struct usb_hcd *hcd)
+{
+	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+	int retval;
+
+	ehci_reset(ehci);
+	retval = ehci_halt(ehci);
+	if (retval)
+		return retval;
+
+	retval = ehci_init(hcd);
+	if (retval)
+		return retval;
+
+	/* non std burstsize */
+	ehci_writel(ehci, 0x0E10, &ehci->regs->burstsize);
+	hcd->has_tt = 1;
+	ehci->sbrn = 0x20;
+	ehci_port_power(ehci, 0);
+
+	return 0;
+}
+
+static const struct hc_driver ehci_adm8668_hc_driver = {
+	.description		= hcd_name,
+	.product_desc		= "ADM8668 EHCI",
+	.hcd_priv_size		= sizeof(struct ehci_hcd),
+
+	/*
+	 * generic hardware linkage
+	 */
+	.irq			= ehci_irq,
+	.flags			= HCD_MEMORY | HCD_USB2,
+
+	/*
+	 * basic lifecycle operations
+	 *
+	 * FIXME -- ehci_init() doesn't do enough here.
+	 * See ehci-ppc-soc for a complete implementation.
+	 */
+	.reset			= ehci_adm8668_setup,
+	.start			= ehci_run,
+	.stop			= ehci_stop,
+	.shutdown		= ehci_shutdown,
+
+	/*
+	 * managing i/o requests and associated device resources
+	 */
+	.urb_enqueue		= ehci_urb_enqueue,
+	.urb_dequeue		= ehci_urb_dequeue,
+	.endpoint_disable	= ehci_endpoint_disable,
+	.endpoint_reset		= ehci_endpoint_reset,
+
+	/*
+	 * scheduling support
+	 */
+	.get_frame_number	= ehci_get_frame,
+
+	/*
+	 * root hub support
+	 */
+	.hub_status_data	= ehci_hub_status_data,
+	.hub_control		= ehci_hub_control,
+	.bus_suspend		= ehci_bus_suspend,
+	.bus_resume		= ehci_bus_resume,
+	.relinquish_port	= ehci_relinquish_port,
+	.port_handed_over	= ehci_port_handed_over,
+
+	.clear_tt_buffer_complete	= ehci_clear_tt_buffer_complete,
+};
+
+
+static int ehci_hcd_adm8668_drv_probe(struct platform_device *pdev)
+{
+	struct usb_hcd *hcd;
+	struct ehci_hcd *ehci;
+	int ret;
+
+	if (usb_disabled())
+		return -ENODEV;
+
+	printk("Initalizing ADM8668 USB\n");
+
+	if (pdev->resource[1].flags != IORESOURCE_IRQ) {
+		pr_debug("resource[1] is not IORESOURCE_IRQ");
+		return -ENOMEM;
+	}
+	hcd = usb_create_hcd(&ehci_adm8668_hc_driver, &pdev->dev, "ADM8668");
+	if (!hcd)
+		return -ENOMEM;
+
+	hcd->rsrc_start = pdev->resource[0].start;
+	hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
+
+	if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+		pr_debug("request_mem_region failed");
+		ret = -EBUSY;
+		goto err1;
+	}
+
+	hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+	if (!hcd->regs) {
+		pr_debug("ioremap failed");
+		ret = -ENOMEM;
+			goto err2;
+	}
+
+	ehci = hcd_to_ehci(hcd);
+	ehci->caps = hcd->regs;
+	ehci->regs = hcd->regs +
+		HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
+	ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
+
+	/* Startup fix for some errata */
+	adm8668_start_ehc();
+
+	ret = usb_add_hcd(hcd, pdev->resource[1].start,
+			  IRQF_DISABLED | IRQF_SHARED);
+
+	if (ret == 0) {
+		platform_set_drvdata(pdev, hcd);
+		return ret;
+	}
+
+	adm8668_stop_ehc();
+	iounmap(hcd->regs);
+err2:
+	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+err1:
+	usb_put_hcd(hcd);
+	return ret;
+}
+
+static int ehci_hcd_adm8668_drv_remove(struct platform_device *pdev)
+{
+	struct usb_hcd *hcd = platform_get_drvdata(pdev);
+
+	usb_remove_hcd(hcd);
+	iounmap(hcd->regs);
+	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+	usb_put_hcd(hcd);
+	adm8668_stop_ehc();
+	platform_set_drvdata(pdev, NULL);
+
+	return 0;
+}
+
+static struct platform_driver ehci_hcd_adm8668_driver = {
+	.probe		= ehci_hcd_adm8668_drv_probe,
+	.remove		= ehci_hcd_adm8668_drv_remove,
+	.shutdown	= usb_hcd_platform_shutdown,
+	.driver = {
+		.name	= "adm8668_ehci",
+		.owner	= THIS_MODULE,
+	}
+};
+
+MODULE_ALIAS("platform:adm8668_ehci");
diff -Nwru original/linux-2.6.33.2/drivers/usb/host/ehci-hcd.c linux-2.6.33.2/drivers/usb/host/ehci-hcd.c
--- original/linux-2.6.33.2/drivers/usb/host/ehci-hcd.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/usb/host/ehci-hcd.c	2010-05-29 13:58:05.000000000 -0400
@@ -67,15 +67,20 @@
 
 
 #undef VERBOSE_DEBUG
-#undef EHCI_URB_TRACE
+#define EHCI_URB_TRACE
 
 #ifdef DEBUG
 #define EHCI_STATS
 #endif
 
 /* magic numbers that can affect system performance */
+#ifdef	CONFIG_ADM8668
+#define	EHCI_TUNE_CERR		0	/* 0-3 qtd retries; 0 == don't stop */
+#define	EHCI_TUNE_RL_HS		0xF	/* nak throttle; see 4.9 */
+#else
 #define	EHCI_TUNE_CERR		3	/* 0-3 qtd retries; 0 == don't stop */
 #define	EHCI_TUNE_RL_HS		4	/* nak throttle; see 4.9 */
+#endif
 #define	EHCI_TUNE_RL_TT		0
 #define	EHCI_TUNE_MULT_HS	1	/* 1-3 transactions/uframe; 4.10.3 */
 #define	EHCI_TUNE_MULT_TT	1
@@ -528,6 +533,7 @@
 	/*
 	 * keep io watchdog by default, those good HCDs could turn off it later
 	 */
+
 	ehci->need_io_watchdog = 1;
 	init_timer(&ehci->watchdog);
 	ehci->watchdog.function = ehci_watchdog;
@@ -642,6 +648,8 @@
 	 * host side drivers though.
 	 */
 	hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params);
+/* they did it in 2.4, ya'd think it not return true? */
+#ifndef	CONFIG_ADM8668
 	if (HCC_64BIT_ADDR(hcc_params)) {
 		ehci_writel(ehci, 0, &ehci->regs->segment);
 #if 0
@@ -650,6 +658,7 @@
 			ehci_info(ehci, "enabled 64bit DMA\n");
 #endif
 	}
+#endif /* CONFIG_ADM8668 */
 
 
 	// Philips, Intel, and maybe others need CMD_RUN before the
@@ -675,7 +684,7 @@
 	 */
 	down_write(&ehci_cf_port_reset_rwsem);
 	hcd->state = HC_STATE_RUNNING;
-	ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
+//	ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
 	ehci_readl(ehci, &ehci->regs->command);	/* unblock posted writes */
 	msleep(5);
 	up_write(&ehci_cf_port_reset_rwsem);
@@ -1113,6 +1122,11 @@
 #define PLATFORM_DRIVER		ehci_mxc_driver
 #endif
 
+#ifdef CONFIG_ADM8668
+#include "ehci-adm8668.c"
+#define	PLATFORM_DRIVER		ehci_hcd_adm8668_driver
+#endif
+
 #ifdef CONFIG_SOC_AU1200
 #include "ehci-au1xxx.c"
 #define	PLATFORM_DRIVER		ehci_hcd_au1xxx_driver
diff -Nwru original/linux-2.6.33.2/drivers/usb/host/ehci-hub.c linux-2.6.33.2/drivers/usb/host/ehci-hub.c
--- original/linux-2.6.33.2/drivers/usb/host/ehci-hub.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/usb/host/ehci-hub.c	2010-05-28 16:09:04.000000000 -0400
@@ -801,7 +801,7 @@
 			 * this bit; seems too long to spin routinely...
 			 */
 			retval = handshake(ehci, status_reg,
-					PORT_RESET, 0, 750);
+					PORT_RESET, 0, 5750);
 			if (retval != 0) {
 				ehci_err (ehci, "port %d reset error %d\n",
 					wIndex + 1, retval);
diff -Nwru original/linux-2.6.33.2/drivers/usb/host/ehci-q.c linux-2.6.33.2/drivers/usb/host/ehci-q.c
--- original/linux-2.6.33.2/drivers/usb/host/ehci-q.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/drivers/usb/host/ehci-q.c	2010-06-01 20:38:13.000000000 -0400
@@ -239,6 +239,9 @@
 				usb_pipein(urb->pipe) ? "in" : "out");
 			status = -EPROTO;
 		} else {	/* unknown */
+			if ((token & 0xFF) == QTD_STS_HALT)
+				status = -EPIPE;
+			else
 			status = -EPROTO;
 		}
 
@@ -972,8 +975,10 @@
 	struct ehci_qh	*head;
 
 	/* Don't link a QH if there's a Clear-TT-Buffer pending */
-	if (unlikely(qh->clearing_tt))
+	if (unlikely(qh->clearing_tt)) {
+		printk("qh_link_async: clear-tt-buffer pending. i give up\n");
 		return;
+	}
 
 	WARN_ON(qh->qh_state != QH_STATE_IDLE);
 
@@ -1132,9 +1137,9 @@
 		goto done;
 	}
 	rc = usb_hcd_link_urb_to_ep(ehci_to_hcd(ehci), urb);
-	if (unlikely(rc))
+	if (unlikely(rc)) {
 		goto done;
-
+	}
 	qh = qh_append_tds(ehci, urb, qtd_list, epnum, &urb->ep->hcpriv);
 	if (unlikely(qh == NULL)) {
 		usb_hcd_unlink_urb_from_ep(ehci_to_hcd(ehci), urb);
@@ -1145,8 +1150,12 @@
 	/* Control/bulk operations through TTs don't need scheduling,
 	 * the HC and TT handle it when the TT has a buffer ready.
 	 */
+	// neutronscott-- linux2.4 checks qh!=0
+	if (likely (qh != 0)) {
 	if (likely (qh->qh_state == QH_STATE_IDLE))
 		qh_link_async(ehci, qh);
+	}
+
  done:
 	spin_unlock_irqrestore (&ehci->lock, flags);
 	if (unlikely (qh == NULL))
diff -Nwru original/linux-2.6.33.2/include/linux/usb/ehci_def.h linux-2.6.33.2/include/linux/usb/ehci_def.h
--- original/linux-2.6.33.2/include/linux/usb/ehci_def.h	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/include/linux/usb/ehci_def.h	2010-05-27 13:39:21.000000000 -0400
@@ -91,9 +91,13 @@
 	u32		frame_list;	/* points to periodic list */
 	/* ASYNCLISTADDR: offset 0x18 */
 	u32		async_next;	/* address of next async queue head */
-
+#ifdef	CONFIG_ADM8668
+	u32		asyncttsts;
+	u32		burstsize;
+	u32		reserved [7];
+#else
 	u32		reserved [9];
-
+#endif
 	/* CONFIGFLAG: offset 0x40 */
 	u32		configured_flag;
 #define FLAG_CF		(1<<0)		/* true: we'll support "high speed" */
diff -Nwru original/linux-2.6.33.2/Makefile linux-2.6.33.2/Makefile
--- original/linux-2.6.33.2/Makefile	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/Makefile	2010-06-10 13:43:06.000000000 -0400
@@ -1556,3 +1556,11 @@
 # Declare the contents of the .PHONY variable as phony.  We keep that
 # information in a variable so we can use it in if_changed and friends.
 .PHONY: $(PHONY)
+
+uImage:	vmlinux
+	$(OBJCOPY) -O binary -R .note -R .comment -S vmlinux linux.bin
+	gzip -f9 linux.bin
+	$(OBJCOPY) -I binary -O binary --pad-to 0x1bffc0 linux.bin.gz vmlinuz.tmp
+	cat ./rootfs.img >> vmlinuz.tmp
+	./mkimage -A mips -O linux -T kernel -C gzip -a 2000 -e $(shell grep kernel_entry System.map|cut -f1 -d" ") -n "ADM8668 Linux Kernel(2.4.31)" -d vmlinuz.tmp /srv/tftp/vmlinuz-2.6
+#	./mkimage -A mips -O linux -T kernel -C gzip -a 2000 -e $(shell grep kernel_entry System.map|cut -f1 -d" ") -n "ADM8668 Linux Kernel(2.4.31)" -d linux.bin.gz /srv/tftp/vmlinuz-2.6
diff -Nwru original/linux-2.6.33.2/net/mac80211/mlme.c linux-2.6.33.2/net/mac80211/mlme.c
--- original/linux-2.6.33.2/net/mac80211/mlme.c	2010-04-06 05:40:51.000000000 -0400
+++ linux-2.6.33.2/net/mac80211/mlme.c	2010-04-14 19:35:57.000000000 -0400
@@ -1200,7 +1200,7 @@
 	const u8 *ssid;
 
 	ssid = ieee80211_bss_get_ie(&ifmgd->associated->cbss, WLAN_EID_SSID);
-	ieee80211_send_probe_req(sdata, ifmgd->associated->cbss.bssid,
+	ieee80211_send_probe_req(sdata, NULL,
 				 ssid + 2, ssid[1], NULL, 0);
 
 	ifmgd->probe_send_count++;
diff -Nwru original/linux-2.6.33.2/NOTES.ADM8668 linux-2.6.33.2/NOTES.ADM8668
--- original/linux-2.6.33.2/NOTES.ADM8668	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.33.2/NOTES.ADM8668	2010-06-25 15:16:01.000000000 -0400
@@ -0,0 +1,13 @@
+todo, somewhat in order--
+
+Get cmdline from U-boot!!
+
+Fix machine_restart. I put the code in, but it doesn't get called?
+
+Fix LEDs
+
+Tulip driver needs to use platform_driver stuff,
+  register both eth0 and eth1 (ie. adm0 adm1 // wan, lan)
+  Currently we detect just eth0 using the address probed by PCI,
+  then i copy it's device structure, change the resources, and probe it again
+  to make eth1. ain't that silly? HEH!!
