summaryrefslogtreecommitdiff
path: root/target/linux/brcm-2.6/patches
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-14 16:41:33 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-14 16:41:33 +0000
commitc92885c466d11dc3b8e2837a8be1fd3b6b7e2e01 (patch)
tree1a38200fe1a33cb965650ca687167175938fbedd /target/linux/brcm-2.6/patches
parenta8131d463830012d225fa1032222c3a38b168778 (diff)
Upgrade to Linux 2.6.19
- Includes large parts of the patch from #1021 by dpalffy - Includes RB532 NAND driver changes by n0-1 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5789 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm-2.6/patches')
-rw-r--r--target/linux/brcm-2.6/patches/001-bcm947xx.patch680
-rw-r--r--target/linux/brcm-2.6/patches/002-flash-map.patch36
-rw-r--r--target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch95
-rw-r--r--target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch66
-rw-r--r--target/linux/brcm-2.6/patches/005-remove_scache.patch94
-rw-r--r--target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch36
6 files changed, 547 insertions, 460 deletions
diff --git a/target/linux/brcm-2.6/patches/001-bcm947xx.patch b/target/linux/brcm-2.6/patches/001-bcm947xx.patch
index e180e4718f..c935ac8082 100644
--- a/target/linux/brcm-2.6/patches/001-bcm947xx.patch
+++ b/target/linux/brcm-2.6/patches/001-bcm947xx.patch
@@ -1,6 +1,6 @@
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bcm947xx/broadcom/bcmsrom.c
---- linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/bcmsrom.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmsrom.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmsrom.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,481 @@
+/*
+ * Misc useful routines to access NIC SROM/OTP .
@@ -172,9 +172,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc
+ /* now correct the endianness of the byte array */
+ ltoh16_buf(buf, nwords * 2);
+ }
-+
++
+ return err;
-+}
++}
+
+/*
+* Create variable table from memory.
@@ -199,7 +199,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc
+ *vars = NULL;
+ *count = 0;
+ }
-+
++
+ return 0;
+}
+
@@ -213,7 +213,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc
+ uint16 w, b[64];
+ uint8 sromrev;
+ struct ether_addr ea;
-+ char eabuf[32];
++ char eabuf[32];
+ uint32 w32;
+ int woff, i;
+ char *vp, *base;
@@ -233,7 +233,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc
+ /* bcm4401 sroms misprogrammed */
+ if (sromrev == 0x10)
+ sromrev = 1;
-+
++
+ /* srom version check */
+ if (sromrev > 3)
+ return (-2);
@@ -415,7 +415,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc
+ vp += sprintf(vp, "wl0gpio3=%d", (w >> 8) & 0xff);
+ vp++;
+ }
-+
++
+ /* Word 52 is max power 0/1 */
+ w = b[52];
+ vp += sprintf(vp, "pa0maxpwr=%d", w & 0xff);
@@ -483,9 +483,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc
+ return err;
+}
+
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/bcm947xx/broadcom/bcmutils.c
---- linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/bcmutils.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmutils.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmutils.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmutils.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,356 @@
+/*
+ * Misc useful OS-independent routines.
@@ -548,19 +548,19 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b
+{
+ ulong result, value;
+ bool minus;
-+
++
+ minus = FALSE;
+
+ while (bcm_isspace(*cp))
+ cp++;
-+
++
+ if (cp[0] == '+')
+ cp++;
+ else if (cp[0] == '-') {
+ minus = TRUE;
+ cp++;
+ }
-+
++
+ if (base == 0) {
+ if (cp[0] == '0') {
+ if ((cp[1] == 'x') || (cp[1] == 'X')) {
@@ -575,7 +575,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b
+ } else if (base == 16 && (cp[0] == '0') && ((cp[1] == 'x') || (cp[1] == 'X'))) {
+ cp = &cp[2];
+ }
-+
++
+ result = 0;
+
+ while (bcm_isxdigit(*cp) &&
@@ -733,7 +733,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b
+* This format allows multiple features to share the gpio with mutual
+* understanding.
+*
-+* 'def_pin' is returned if a specific gpio is not defined for the requested functionality
++* 'def_pin' is returned if a specific gpio is not defined for the requested functionality
+* and if def_pin is not used by others.
+*/
+uint
@@ -771,14 +771,14 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b
+ * x^8 + x^7 +x^6 + x^4 + x^2 + 1
+ *
+ * The caller provides the initial value (either CRC8_INIT_VALUE
-+ * or the previous returned value) to allow for processing of
++ * or the previous returned value) to allow for processing of
+ * discontiguous blocks of data. When generating the CRC the
+ * caller is responsible for complementing the final return value
+ * and inserting it into the byte stream. When checking, a final
+ * return value of CRC8_GOOD_VALUE indicates a valid CRC.
+ *
+ * Reference: Dallas Semiconductor Application Note 27
-+ * Williams, Ross N., "A Painless Guide to CRC Error Detection Algorithms",
++ * Williams, Ross N., "A Painless Guide to CRC Error Detection Algorithms",
+ * ver 3, Aug 1993, ross@guest.adelaide.edu.au, Rocksoft Pty Ltd.,
+ * ftp://ftp.rocksoft.com/clients/rocksoft/papers/crc_v3.txt
+ *
@@ -843,9 +843,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b
+#define CNBUFS 5
+
+#endif
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bcm947xx/broadcom/cfe_env.c
---- linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/cfe_env.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.19/arch/mips/bcm947xx/broadcom/cfe_env.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/cfe_env.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/cfe_env.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,234 @@
+/*
+ * NVRAM variable manipulation (Linux kernel half)
@@ -861,7 +861,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ * $Id$
+ */
+
-+#include <linux/config.h>
++#include <linux/autoconf.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
@@ -896,9 +896,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ *
+ * If bit 0 (low bit) is set, the length is an 8-bit value.
+ * If bit 0 (low bit) is clear, the length is a 16-bit value
-+ *
++ *
+ * Bit 7 set indicates "user" TLVs. In this case, bit 0 still
-+ * indicates the size of the length field.
++ * indicates the size of the length field.
+ *
+ * Flags are from the constants below:
+ *
@@ -915,11 +915,11 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ * The actual TLV types we support
+ */
+
-+#define ENV_TLV_TYPE_END 0x00
++#define ENV_TLV_TYPE_END 0x00
+#define ENV_TLV_TYPE_ENV ENV_CODE_SYS(0,ENV_LENGTH_8BITS)
+
+/*
-+ * Environment variable flags
++ * Environment variable flags
+ */
+
+#define ENV_FLG_NORMAL 0x00 /* normal read/write */
@@ -932,14 +932,14 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+
+/* *********************************************************************
+ * _nvram_read(buffer,offset,length)
-+ *
++ *
+ * Read data from the NVRAM device
-+ *
-+ * Input parameters:
++ *
++ * Input parameters:
+ * buffer - destination buffer
+ * offset - offset of data to read
+ * length - number of bytes to read
-+ *
++ *
+ * Return value:
+ * number of bytes read, or <0 if error occured
+ ********************************************************************* */
@@ -948,7 +948,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+{
+ int i;
+ if (offset > NVRAM_SIZE)
-+ return -1;
++ return -1;
+
+ for ( i = 0; i < length; i++) {
+ buffer[i] = ((volatile unsigned char*)nv_buf)[offset + i];
@@ -980,7 +980,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ * @return value of variable or NULL if undefined
+ */
+
-+char*
++char*
+cfe_env_get(unsigned char *nv_buf, char* name)
+{
+ int size;
@@ -991,7 +991,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ unsigned int rectype;
+ int offset;
+ int flg;
-+
++
+ size = NVRAM_SIZE;
+ buffer = &_nvdata[0];
+
@@ -1002,7 +1002,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ if (_nvram_read(nv_buf, ptr,offset,1) != 1) {
+ goto error;
+ }
-+
++
+ while ((*ptr != ENV_TLV_TYPE_END) && (size > 1)) {
+
+ /* Adjust pointer for TLV type */
@@ -1010,9 +1010,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ offset++;
+ size--;
+
-+ /*
++ /*
+ * Read the length. It can be either 1 or 2 bytes
-+ * depending on the code
++ * depending on the code
+ */
+ if (rectype & ENV_LENGTH_8BITS) {
+ /* Read the record type and length - 8 bits */
@@ -1047,7 +1047,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ *envval++ = '\0';
+ memcpy(_valuestr,envval,(reclen-1)-(envval-ptr));
+ _valuestr[(reclen-1)-(envval-ptr)] = '\0';
-+#if 0
++#if 0
+ printk(KERN_INFO "NVRAM:%s=%s\n", ptr, _valuestr);
+#endif
+ if(!strcmp(ptr, name)){
@@ -1057,16 +1057,16 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+ return _valuestr;
+ }
+ break;
-+
-+ default:
++
++ default:
+ /* Unknown TLV type, skip it. */
+ break;
+ }
+
+ /*
-+ * Advance to next TLV
++ * Advance to next TLV
+ */
-+
++
+ size -= (int)reclen;
+ offset += reclen;
+
@@ -1081,9 +1081,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc
+
+}
+
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/bcm947xx/broadcom/linux_osl.c
---- linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/linux_osl.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.19/arch/mips/bcm947xx/broadcom/linux_osl.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/linux_osl.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/linux_osl.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,102 @@
+/*
+ * Linux OS Independent Layer
@@ -1113,7 +1113,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/
+#endif
+#include <pcicfg.h>
+
-+#define PCI_CFG_RETRY 10
++#define PCI_CFG_RETRY 10
+
+#define OS_HANDLE_MAGIC 0x1234abcd
+#define BCM_MEM_FILENAME_LEN 24
@@ -1138,7 +1138,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/
+osl_pci_read_config(osl_t *osh, uint offset, uint size)
+{
+ uint val;
-+ uint retry=PCI_CFG_RETRY;
++ uint retry=PCI_CFG_RETRY;
+
+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
+
@@ -1158,7 +1158,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/
+void
+osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val)
+{
-+ uint retry=PCI_CFG_RETRY;
++ uint retry=PCI_CFG_RETRY;
+
+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
+
@@ -1169,7 +1169,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/
+ pci_write_config_dword(osh->pdev, offset, val);
+ if (offset!=PCI_BAR0_WIN)
+ break;
-+ if (osl_pci_read_config(osh,offset,size) == val)
++ if (osl_pci_read_config(osh,offset,size) == val)
+ break;
+ } while (retry--);
+
@@ -1187,9 +1187,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/
+ }
+}
+
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/Makefile linux.dev/arch/mips/bcm947xx/broadcom/Makefile
---- linux.old/arch/mips/bcm947xx/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/Makefile 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/Makefile linux-2.6.19/arch/mips/bcm947xx/broadcom/Makefile
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/Makefile 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,6 @@
+#
+# Makefile for the BCM47xx specific kernel interface routines
@@ -1197,9 +1197,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/Makefile linux.dev/arch/mips/bcm
+#
+
+obj-y := sbutils.o linux_osl.o bcmsrom.o bcmutils.o sbmips.o sbpci.o sflash.o nvram.o cfe_env.o
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm947xx/broadcom/nvram.c
---- linux.old/arch/mips/bcm947xx/broadcom/nvram.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/nvram.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.19/arch/mips/bcm947xx/broadcom/nvram.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/nvram.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/nvram.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,192 @@
+/*
+ * NVRAM variable manipulation (Linux kernel half)
@@ -1215,7 +1215,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9
+ * $Id$
+ */
+
-+#include <linux/config.h>
++#include <linux/autoconf.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
@@ -1247,7 +1247,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9
+static int cfe_env;
+
+extern char *cfe_env_get(char *nv_buf, const char *name);
-+
++
+
+/* Convenience */
+#define sbh_lock bcm947xx_sbh_lock
@@ -1318,11 +1318,11 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9
+ header = (struct nvram_header *) KSEG1ADDR(base + 4 KB);
+ if (header->magic == NVRAM_MAGIC)
+ goto found;
-+
++
+ header = (struct nvram_header *) KSEG1ADDR(base + 1 KB);
+ if (header->magic == NVRAM_MAGIC)
+ goto found;
-+
++
+ return;
+
+found:
@@ -1376,7 +1376,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9
+
+ if (!nvram_buf[0])
+ return NULL;
-+
++
+ /* Look for name=value and return value */
+ var = &nvram_buf[sizeof(struct nvram_header)];
+ end = nvram_buf + sizeof(nvram_buf) - 2;
@@ -1393,9 +1393,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9
+}
+
+EXPORT_SYMBOL(nvram_get);
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm947xx/broadcom/sbmips.c
---- linux.old/arch/mips/bcm947xx/broadcom/sbmips.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/sbmips.c 2006-11-03 21:19:49.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sbmips.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbmips.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sbmips.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,1115 @@
+/*
+ * BCM47XX Sonics SiliconBackplane MIPS core routines
@@ -1791,7 +1791,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm
+ tmp = CEIL(10, ns) << FW_W3_SHIFT; /* W3 = 10nS */
+ tmp |= CEIL(10, ns) << FW_W1_SHIFT; /* W1 = 10nS */
+ tmp |= CEIL(120, ns); /* W0 = 120nS */
-+
++
+ // Added by Chen-I for 5365
+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID)
+ {
@@ -1809,7 +1809,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm
+ }
+ }
+ // Added by Chen-I & Yen for enabling 5350 EXTIF
-+ if (BCMINIT(sb_chip)(sbh) == BCM5350_DEVICE_ID)
++ if (BCMINIT(sb_chip)(sbh) == BCM5350_DEVICE_ID)
+ {
+ /* Set programmable interface timing for external uart */
+ tmp = CEIL(10, ns) << FW_W3_SHIFT; /* W3 = 10nS */
@@ -1844,7 +1844,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm
+ }
+ /* USB gets its own interrupt */
+ BCMINIT(sb_setirq)(sbh, 3, SB_USB, 0);
-+
++
+ break;
+ case BCM5350_DEVICE_ID:
+ /* Clear interrupt map */
@@ -1899,7 +1899,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm
+ } else
+ goto out;
+
-+ // Added by Chen-I for 5365
++ // Added by Chen-I for 5365
+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID)
+ rate = 100000000;
+ else
@@ -2512,9 +2512,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm
+}
+
+EXPORT_SYMBOL(sb_irq);
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm947xx/broadcom/sbpci.c
---- linux.old/arch/mips/bcm947xx/broadcom/sbpci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/sbpci.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sbpci.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbpci.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sbpci.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,534 @@
+/*
+ * Low-Level PCI and SB support for BCM47xx
@@ -2855,7 +2855,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm9
+ /* Enable PCI interrupts */
+ W_REG(&pci->intmask, PCI_INTA);
+ }
-+
++
+ return 0;
+}
+
@@ -3050,9 +3050,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm9
+ return 0;
+}
+
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bcm947xx/broadcom/sbutils.c
---- linux.old/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/sbutils.c 2006-11-03 21:22:22.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sbutils.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sbutils.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,2375 @@
+/*
+ * Misc utility routines for accessing chip-specific features
@@ -3060,7 +3060,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ *
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
-+ *
++ *
+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
@@ -3142,7 +3142,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+#define BADIDX (SB_MAXCORES+1)
+#define NOREV -1
+
-+#define PCI(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCI))
++#define PCI(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCI))
+
+/* sonicsrev */
+#define SONICS_2_2 (SBIDL_RV_2_2 >> SBIDL_RV_SHIFT)
@@ -3205,7 +3205,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+static sb_info_t ksi;
+
+/* generic kernel variant of sb_attach() */
-+sb_t *
++sb_t *
+BCMINITFN(sb_kattach)()
+{
+ uint32 *regs;
@@ -3237,7 +3237,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+}
+#endif
+
-+static sb_info_t *
++static sb_info_t *
+BCMINITFN(sb_doattach)(sb_info_t *si, uint devid, osl_t *osh, void *regs,
+ uint bustype, void *sdh, char **vars, int *varsz)
+{
@@ -3344,13 +3344,13 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ return NULL;
+ }
+ }
-+
++
+ /* srom_var_init() depends on sb_scan() info */
+ if (srom_var_init(si, si->sb.bustype, si->curmap, osh, vars, varsz)) {
+ SB_ERROR(("sb_doattach: srom_var_init failed: bad srom\n"));
+ return (NULL);
+ }
-+
++
+ if (cc == NULL) {
+ /*
+ * The chip revision number is hardwired into all
@@ -3397,7 +3397,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ if (si->sb.ccrev >= 16) {
+ w = getintvar(*vars, "gpiotimerval");
+ if (!w)
-+ w = DEFAULT_GPIOTIMERVAL;
++ w = DEFAULT_GPIOTIMERVAL;
+ sb_corereg(si, 0, OFFSETOF(chipcregs_t, gpiotimerval), ~0, w);
+ }
+
@@ -3563,9 +3563,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ else {
+ sblo = sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatelow), 0, 0);
+ sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatelow), ~0, (sblo | SBTML_FGC | SBTML_BE));
-+
++
+ SPINWAIT(((sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatehigh), 0, 0) & SBTMH_BISTD) == 0), 100000);
-+
++
+ if (sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatehigh), 0, 0) & SBTMH_BISTF)
+ result = BCME_ERROR;
+
@@ -3684,7 +3684,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ sb_setcoreidx(&si->sb, i);
+ si->coreid[i] = sb_coreid(&si->sb);
+
-+ if (si->coreid[i] == SB_PCI) {
++ if (si->coreid[i] == SB_PCI) {
+ pciidx = i;
+ pcirev = sb_corerev(&si->sb);
+ pci = TRUE;
@@ -3692,8 +3692,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ }
+ if (pci) {
+ si->sb.buscoretype = SB_PCI;
-+ si->sb.buscorerev = pcirev;
-+ si->sb.buscoreidx = pciidx;
++ si->sb.buscorerev = pcirev;
++ si->sb.buscoreidx = pciidx;
+ }
+
+ /*
@@ -3801,8 +3801,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ return (BADIDX);
+}
+
-+/*
-+ * this function changes logical "focus" to the indiciated core,
++/*
++ * this function changes logical "focus" to the indiciated core,
+ * must be called with interrupt off.
+ * Moreover, callers should keep interrupts off during switching out of and back to d11 core
+ */
@@ -3816,7 +3816,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+
+ if (coreidx >= si->numcores)
+ return (NULL);
-+
++
+ /*
+ * If the user has provided an interrupt mask enabled function,
+ * then assert interrupts are disabled before switching the core.
@@ -3857,8 +3857,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ return (si->curmap);
+}
+
-+/*
-+ * this function changes logical "focus" to the indiciated core,
++/*
++ * this function changes logical "focus" to the indiciated core,
+ * must be called with interrupt off.
+ * Moreover, callers should keep interrupts off during switching out of and back to d11 core
+ */
@@ -4190,7 +4190,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ idx = BADIDX;
+ switch (BUSTYPE(si->sb.bustype)) {
+ case PCI_BUS:
-+ idx = si->sb.buscoreidx;
++ idx = si->sb.buscoreidx;
+ break;
+ case JTAG_BUS:
+ idx = SB_CC_IDX;
@@ -4476,10 +4476,10 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ ASSERT(0);
+ /* PLL types 3 and 7 use BASE2 (25Mhz) */
+ if ((pll_type == PLL_TYPE3) ||
-+ (pll_type == PLL_TYPE7)) {
++ (pll_type == PLL_TYPE7)) {
+ clock = CC_CLOCK_BASE2 * n1 * n2;
+ }
-+ else
++ else
+ clock = CC_CLOCK_BASE1 * n1 * n2;
+
+ if (clock == 0)
@@ -4559,8 +4559,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ m = R_REG(&cc->clockcontrol_mips);
+ else if (pll_type == PLL_TYPE3)
+ {
-+ // Added by Chen-I for 5365
-+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID)
++ // Added by Chen-I for 5365
++ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID)
+ m = R_REG(&cc->clockcontrol_sb);
+ else
+ m = R_REG(&cc->clockcontrol_m2);
@@ -4572,13 +4572,13 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ return 0;
+ }
+
-+ // Added by Chen-I for 5365
++ // Added by Chen-I for 5365
+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID)
+ {
+ rate = 100000000;
+ }
+ else
-+ {
++ {
+ /* calculate rate */
+ rate = sb_clock_rate(pll_type, n, m);
+ if (pll_type == PLL_TYPE3)
@@ -4742,8 +4742,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+}
+
+/* release one gpio */
-+/*
-+ * releasing the gpio doesn't change the current value on the GPIO last write value
++/*
++ * releasing the gpio doesn't change the current value on the GPIO last write value
+ * persists till some one overwrites it
+*/
+
@@ -4766,7 +4766,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ ASSERT((gpio_bitmask) && !((gpio_bitmask) & (gpio_bitmask - 1)));
+ return -1;
+ }
-+
++
+ /* already released */
+ if (!(sb_gpioreservation & gpio_bitmask))
+ return -1;
@@ -4893,7 +4893,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+}
+
+/* mask&set gpio timer val */
-+uint32
++uint32
+sb_gpiotimerval(sb_t *sbh, uint32 mask, uint32 gpiotimerval)
+{
+ sb_info_t *si;
@@ -5004,7 +5004,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ chipcregs_t *cc;
+ uint intr_val = 0;
+ uint err = 0;
-+
++
+ si = SB_INFO(sbh);
+
+ /* chipcommon cores prior to rev6 don't support slowclkcontrol */
@@ -5017,12 +5017,12 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+
+ if (set && ((*div % 4) || (*div < 4)))
+ return 2;
-+
++
+ INTR_OFF(si, intr_val);
+ origidx = si->curidx;
+ cc = (chipcregs_t*) sb_setcore(sbh, SB_CC, 0);
+ ASSERT(cc != NULL);
-+
++
+ if (!(R_REG(&cc->capabilities) & CAP_PWR_CTL)) {
+ err = 3;
+ goto done;
@@ -5060,7 +5060,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ /* set all Instaclk chip ILP to 1 MHz */
+ if (si->sb.ccrev >= 10)
+ SET_REG(&cc->system_clk_ctl, SYCC_CD_MASK, (ILP_DIV_1MHZ << SYCC_CD_SHIFT));
-+
++
+ sb_clkctl_setdelay(si, (void *)cc);
+
+done:
@@ -5260,14 +5260,14 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+
+
+void
-+sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice,
++sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice,
+ uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif)
+{
+ uint vendor, core, unit;
+ uint chip, chippkg;
+ char varname[8];
+ uint8 class, subclass, progif;
-+
++
+ vendor = sb_corevendor(sbh);
+ core = sb_coreid(sbh);
+ unit = sb_coreunit(sbh);
@@ -5276,7 +5276,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+ chippkg = BCMINIT(sb_chippkg)(sbh);
+
+ progif = 0;
-+
++
+ /* Known vendor translations */
+ switch (vendor) {
+ case SB_VEND_BCM:
@@ -5429,9 +5429,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc
+EXPORT_SYMBOL(sb_gpiotimerval);
+EXPORT_SYMBOL(sb_watchdog);
+EXPORT_SYMBOL(sb_kattach);
-diff -urN linux.old/arch/mips/bcm947xx/broadcom/sflash.c linux.dev/arch/mips/bcm947xx/broadcom/sflash.c
---- linux.old/arch/mips/bcm947xx/broadcom/sflash.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/broadcom/sflash.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sflash.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sflash.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sflash.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,418 @@
+/*
+ * Broadcom SiliconBackplane chipcommon serial flash interface
@@ -5801,7 +5801,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sflash.c linux.dev/arch/mips/bcm
+
+ /* Copy entire block */
+ while(blk_len) {
-+ copied = sflash_read(cc, blk_offset, blk_len, blk_ptr);
++ copied = sflash_read(cc, blk_offset, blk_len, blk_ptr);
+ blk_offset += copied;
+ blk_len -= copied;
+ blk_ptr += copied;
@@ -5851,9 +5851,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sflash.c linux.dev/arch/mips/bcm
+ return ret;
+}
+
-diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm947xx/include/bcmdevs.h
---- linux.old/arch/mips/bcm947xx/include/bcmdevs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/bcmdevs.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.19/arch/mips/bcm947xx/include/bcmdevs.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmdevs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmdevs.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,391 @@
+/*
+ * Broadcom device-specific manifest constants.
@@ -5935,7 +5935,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm
+
+#define BCM4306_DEVICE_ID 0x4306 /* 4306 chipcommon chipid */
+#define BCM4306_D11G_ID 0x4320 /* 4306 802.11g */
-+#define BCM4306_D11G_ID2 0x4325
++#define BCM4306_D11G_ID2 0x4325
+#define BCM4306_D11A_ID 0x4321 /* 4306 802.11a */
+#define BCM4306_UART_ID 0x4322 /* 4306 uart */
+#define BCM4306_V90_ID 0x4323 /* 4306 v90 codec */
@@ -6246,9 +6246,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm
+#define GPIO_NUMPINS 16
+
+#endif /* _BCMDEVS_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/bcm947xx/include/bcmendian.h
---- linux.old/arch/mips/bcm947xx/include/bcmendian.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/bcmendian.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.19/arch/mips/bcm947xx/include/bcmendian.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmendian.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmendian.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,152 @@
+/*
+ * local version of endian.h - byte order defines
@@ -6274,7 +6274,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/b
+ ((uint16)( \
+ (((uint16)(val) & (uint16)0x00ffU) << 8) | \
+ (((uint16)(val) & (uint16)0xff00U) >> 8) ))
-+
++
+/* Byte swap a 32 bit value */
+#define BCMSWAP32(val) \
+ ((uint32)( \
@@ -6282,13 +6282,13 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/b
+ (((uint32)(val) & (uint32)0x0000ff00UL) << 8) | \
+ (((uint32)(val) & (uint32)0x00ff0000UL) >> 8) | \
+ (((uint32)(val) & (uint32)0xff000000UL) >> 24) ))
-+
++
+/* 2 Byte swap a 32 bit value */
+#define BCMSWAP32BY16(val) \
+ ((uint32)( \
+ (((uint32)(val) & (uint32)0x0000ffffUL) << 16) | \
+ (((uint32)(val) & (uint32)0xffff0000UL) >> 16) ))
-+
++
+
+static INLINE uint16
+bcmswap16(uint16 val)
@@ -6402,9 +6402,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/b
+)
+
+#endif /* _BCMENDIAN_H_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bcm947xx/include/bcmnvram.h
---- linux.old/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/bcmnvram.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.19/arch/mips/bcm947xx/include/bcmnvram.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmnvram.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,95 @@
+/*
+ * NVRAM variable manipulation
@@ -6457,7 +6457,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bc
+ */
+extern char *nvram_get(const char *name);
+
-+/*
++/*
+ * Get the value of an NVRAM variable.
+ * @param name name of variable to get
+ * @return value of variable or NUL if undefined
@@ -6501,9 +6501,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bc
+#define NVRAM_MAX_PARAM_LEN 64
+
+#endif /* _bcmnvram_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/bcmsrom.h linux.dev/arch/mips/bcm947xx/include/bcmsrom.h
---- linux.old/arch/mips/bcm947xx/include/bcmsrom.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/bcmsrom.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmsrom.h linux-2.6.19/arch/mips/bcm947xx/include/bcmsrom.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmsrom.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmsrom.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,23 @@
+/*
+ * Misc useful routines to access NIC local SROM/OTP .
@@ -6528,9 +6528,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmsrom.h linux.dev/arch/mips/bcm
+extern int srom_write(uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf);
+
+#endif /* _bcmsrom_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bcm947xx/include/bcmutils.h
---- linux.old/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/bcmutils.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.19/arch/mips/bcm947xx/include/bcmutils.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmutils.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,308 @@
+/*
+ * Misc useful os-independent macros and functions.
@@ -6560,7 +6560,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc
+#define _BCM_X 0x40 /* hex digit */
+#define _BCM_SP 0x80 /* hard space (0x20) */
+
-+#define GPIO_PIN_NOTDEFINED 0x20
++#define GPIO_PIN_NOTDEFINED 0x20
+
+extern unsigned char bcm_ctype[];
+#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)])
@@ -6642,12 +6642,12 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc
+#define VALID_BCMERROR(e) ((e <= 0) && (e >= BCME_LAST))
+
+
-+/*
-+ * error codes could be added but the defined ones shouldn't be changed/deleted
-+ * these error codes are exposed to the user code
-+ * when ever a new error code is added to this list
-+ * please update errorstring table with the related error string and
-+ * update osl files with os specific errorcode map
++/*
++ * error codes could be added but the defined ones shouldn't be changed/deleted
++ * these error codes are exposed to the user code
++ * when ever a new error code is added to this list
++ * please update errorstring table with the related error string and
++ * update osl files with os specific errorcode map
+*/
+
+#define BCME_ERROR -1 /* Error generic */
@@ -6663,9 +6663,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc
+#define BCME_NOCLK -11 /* No Clock*/
+#define BCME_BADRATESET -12 /* BAD RateSet*/
+#define BCME_BADBAND -13 /* BAD Band */
-+#define BCME_BUFTOOSHORT -14 /* Buffer too short */
-+#define BCME_BUFTOOLONG -15 /* Buffer too Long */
-+#define BCME_BUSY -16 /* Busy*/
++#define BCME_BUFTOOSHORT -14 /* Buffer too short */
++#define BCME_BUFTOOLONG -15 /* Buffer too Long */
++#define BCME_BUSY -16 /* Busy*/
+#define BCME_NOTASSOCIATED -17 /* Not associated*/
+#define BCME_BADSSIDLEN -18 /* BAD SSID Len */
+#define BCME_OUTOFRANGECHAN -19 /* Out of Range Channel*/
@@ -6680,7 +6680,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc
+#define BCME_ASSOCIATED -28 /* Associated */
+#define BCME_RANGE -29 /* Range Error*/
+#define BCME_NOTFOUND -30 /* Not found */
-+#define BCME_LAST BCME_NOTFOUND
++#define BCME_LAST BCME_NOTFOUND
+
+#ifndef ABS
+#define ABS(a) (((a)<0)?-(a):(a))
@@ -6840,9 +6840,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc
+extern uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint len);
+
+#endif /* _bcmutils_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/bitfuncs.h linux.dev/arch/mips/bcm947xx/include/bitfuncs.h
---- linux.old/arch/mips/bcm947xx/include/bitfuncs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/bitfuncs.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bitfuncs.h linux-2.6.19/arch/mips/bcm947xx/include/bitfuncs.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bitfuncs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/bitfuncs.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,85 @@
+/*
+ * bit manipulation utility functions
@@ -6929,9 +6929,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bitfuncs.h linux.dev/arch/mips/bc
+#endif
+
+#endif /* _BITFUNCS_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm947xx/include/flash.h
---- linux.old/arch/mips/bcm947xx/include/flash.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/flash.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/flash.h linux-2.6.19/arch/mips/bcm947xx/include/flash.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/flash.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/flash.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,188 @@
+/*
+ * flash.h: Common definitions for flash access.
@@ -6991,7 +6991,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94
+
+
+#ifdef DECLARE_FLASHES
-+flash_cmds_t sflash_cmd_t =
++flash_cmds_t sflash_cmd_t =
+ { SFLASH, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+flash_cmds_t flash_cmds[] = {
@@ -7068,7 +7068,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94
+};
+
+
-+flash_desc_t sflash_desc =
++flash_desc_t sflash_desc =
+ { 0, 0, 0, 0, SFLASH, 0, 0, 0, 0, 0, NULL, "SFLASH" };
+
+flash_desc_t flashes[] = {
@@ -7107,7 +7107,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94
+ { 0x0004, 0x22F6, 0x0400000, 2, AMD, 0x10000, 64, 0, 62, 4, amd4112, "MBM29LV320TE 2Mx16 TopB" },
+ { 0x0004, 0x22F9, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "MBM29LV320BE 2Mx16 BotB" },
+ { 0x0098, 0x009A, 0x0400000, 2, AMD, 0x10000, 64, 0, 62, 4, amd4112, "TC58FVT321 2Mx16 TopB" },
-+ { 0x0098, 0x009C, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "TC58FVB321 2Mx16 BotB" },
++ { 0x0098, 0x009C, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "TC58FVB321 2Mx16 BotB" },
+ { 0x00C2, 0x22A7, 0x0400000, 2, AMD, 0x10000, 64, 0, 62, 4, amd4112, "MX29LV320T 2Mx16 TopB" },
+ { 0x00C2, 0x22A8, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "MX29LV320B 2Mx16 BotB" },
+ { 0x00BF, 0x2783, 0x0400000, 2, SST, 0x10000, 64, 0, 63, 0, NULL, "SST39VF320 2Mx16" },
@@ -7121,9 +7121,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94
+extern flash_desc_t flashes[];
+
+#endif
-diff -urN linux.old/arch/mips/bcm947xx/include/flashutl.h linux.dev/arch/mips/bcm947xx/include/flashutl.h
---- linux.old/arch/mips/bcm947xx/include/flashutl.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/flashutl.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/flashutl.h linux-2.6.19/arch/mips/bcm947xx/include/flashutl.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/flashutl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/flashutl.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,27 @@
+/*
+ * BCM47XX FLASH driver interface
@@ -7152,9 +7152,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flashutl.h linux.dev/arch/mips/bc
+#endif /* _LANGUAGE_ASSEMBLY */
+
+#endif /* _flashutl_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm947xx/include/hndmips.h
---- linux.old/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/hndmips.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/hndmips.h linux-2.6.19/arch/mips/bcm947xx/include/hndmips.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/hndmips.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,16 @@
+/*
+ * Alternate include file for HND sbmips.h since CFE also ships with
@@ -7162,7 +7162,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm
+ *
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
-+ *
++ *
+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
@@ -7172,9 +7172,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm
+ */
+
+#include "sbmips.h"
-diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/bcm947xx/include/linux_osl.h
---- linux.old/arch/mips/bcm947xx/include/linux_osl.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/linux_osl.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.19/arch/mips/bcm947xx/include/linux_osl.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/linux_osl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/linux_osl.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,331 @@
+/*
+ * Linux OS Independent Layer
@@ -7205,7 +7205,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b
+#define ASSERT(exp) do {} while (0)
+#else
+/* ASSERT could causes segmentation fault on GCC3.1, use empty instead*/
-+#define ASSERT(exp)
++#define ASSERT(exp)
+#endif
+#endif
+
@@ -7279,7 +7279,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b
+
+/* register access macros */
+#if !defined(BCMJTAG)
-+#ifndef IL_BIGENDIAN
++#ifndef IL_BIGENDIAN
+#define R_REG(r) ( \
+ sizeof(*(r)) == sizeof(uint8) ? readb((volatile uint8*)(r)) : \
+ sizeof(*(r)) == sizeof(uint16) ? readw((volatile uint16*)(r)) : \
@@ -7380,7 +7380,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b
+extern void *osl_pktget(osl_t *osh, uint len, bool send);
+extern void osl_pktfree(void *skb);
+
-+#else /* BINOSL */
++#else /* BINOSL */
+
+/* string library */
+#ifndef LINUX_OSL
@@ -7507,9 +7507,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b
+#define PKTBUFSZ 2048
+
+#endif /* _linux_osl_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bcm947xx/include/linuxver.h
---- linux.old/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/linuxver.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/linuxver.h linux-2.6.19/arch/mips/bcm947xx/include/linuxver.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/linuxver.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,389 @@
+/*
+ * Linux-specific abstractions to gain some independence from linux kernel versions.
@@ -7517,19 +7517,19 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc
+ *
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
-+ *
++ *
+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
-+ *
++ *
+ * $Id$
+ */
+
+#ifndef _linuxver_h_
+#define _linuxver_h_
+
-+#include <linux/config.h>
++#include <linux/autoconf.h>
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
@@ -7550,8 +7550,8 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc
+#endif
+
+
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-+#define module_param(_name_, _type_, _perm_) MODULE_PARM(_name_, "i")
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
++#define module_param(_name_, _type_, _perm_) MODULE_PARM(_name_, "i")
+#define module_param_string(_name_, _string_, _size_, _perm_) MODULE_PARM(_string_, "c" __MODULE_STRING(_size_))
+#endif
+
@@ -7844,7 +7844,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc
+ return 0;
+}
+
-+static inline int
++static inline int
+pci_restore_state(struct pci_dev *dev, u32 *buffer)
+{
+ int i;
@@ -7858,7 +7858,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc
+ * This works around a problem where warm-booting from Windows
+ * combined with a D3(hot)->D0 transition causes PCI config
+ * header data to be forgotten.
-+ */
++ */
+ else {
+ for (i = 0; i < 6; i ++)
+ pci_write_config_dword(dev,
@@ -7900,9 +7900,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc
+#endif
+
+#endif /* _linuxver_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm947xx/include/mipsinc.h
---- linux.old/arch/mips/bcm947xx/include/mipsinc.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/mipsinc.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.19/arch/mips/bcm947xx/include/mipsinc.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/mipsinc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/mipsinc.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,552 @@
+/*
+ * HND Run Time Environment for standalone MIPS programs.
@@ -7966,7 +7966,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm
+
+
+/*
-+ * CP0 Registers
++ * CP0 Registers
+ */
+
+#define C0_INX $0
@@ -8037,7 +8037,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm
+
+
+/*
-+ * CP0 Registers
++ * CP0 Registers
+ */
+
+#define C0_INX 0 /* CP0: TLB Index */
@@ -8331,7 +8331,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm
+#define PFC_I_AND_D_NOPF (PFC_INST_NOPF | PFC_DATA_NOPF)
+
+
-+/*
++/*
+ * These are the UART port assignments, expressed as offsets from the base
+ * register. These assignments should hold for any serial port based on
+ * a 8250, 16450, or 16550(A).
@@ -8456,9 +8456,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm
+#endif /* !_LANGUAGE_ASSEMBLY */
+
+#endif /* _MISPINC_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/osl.h linux.dev/arch/mips/bcm947xx/include/osl.h
---- linux.old/arch/mips/bcm947xx/include/osl.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/osl.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/osl.h linux-2.6.19/arch/mips/bcm947xx/include/osl.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/osl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/osl.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,42 @@
+/*
+ * OS Abstraction Layer
@@ -8502,9 +8502,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/osl.h linux.dev/arch/mips/bcm947x
+#define MAXPRIO 7 /* 0-7 */
+
+#endif /* _osl_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm947xx/include/pcicfg.h
---- linux.old/arch/mips/bcm947xx/include/pcicfg.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/pcicfg.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.19/arch/mips/bcm947xx/include/pcicfg.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/pcicfg.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/pcicfg.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,398 @@
+/*
+ * pcicfg.h: PCI configuration constants and structures.
@@ -8846,7 +8846,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm9
+#define PCI_CAP_POWERMGMTCAP_ID 0x01
+#define PCI_CAP_MSICAP_ID 0x05
+
-+/* Data structure to define the Message Signalled Interrupt facility
++/* Data structure to define the Message Signalled Interrupt facility
+ * Valid for PCI and PCIE configurations */
+typedef struct _pciconfig_cap_msi {
+ unsigned char capID;
@@ -8861,7 +8861,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm9
+ unsigned char capID;
+ unsigned char nextptr;
+ unsigned short pme_cap;
-+ unsigned short pme_sts_ctrl;
++ unsigned short pme_sts_ctrl;
+ unsigned char pme_bridge_ext;
+ unsigned char data;
+} pciconfig_cap_pwrmgmt;
@@ -8904,9 +8904,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm9
+#define PCI_CFG_CMD_STAT_TA 0x08000000 /* target abort status */
+
+#endif
-diff -urN linux.old/arch/mips/bcm947xx/include/proto/ethernet.h linux.dev/arch/mips/bcm947xx/include/proto/ethernet.h
---- linux.old/arch/mips/bcm947xx/include/proto/ethernet.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/proto/ethernet.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/proto/ethernet.h linux-2.6.19/arch/mips/bcm947xx/include/proto/ethernet.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/proto/ethernet.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/proto/ethernet.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * $Id$
@@ -9053,9 +9053,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/proto/ethernet.h linux.dev/arch/m
+#undef PACKED
+
+#endif /* _NET_ETHERNET_H_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/s5.h linux.dev/arch/mips/bcm947xx/include/s5.h
---- linux.old/arch/mips/bcm947xx/include/s5.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/s5.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/s5.h linux-2.6.19/arch/mips/bcm947xx/include/s5.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/s5.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/s5.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,103 @@
+#ifndef _S5_H_
+#define _S5_H_
@@ -9072,7 +9072,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/s5.h linux.dev/arch/mips/bcm947xx
+ * LICENSE.
+ *
+ * $Id: s5.h,v 1.3 2003/06/10 18:54:51 jfd Exp $
-+ *
++ *
+ */
+
+/* BCM5365 Address map */
@@ -9160,9 +9160,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/s5.h linux.dev/arch/mips/bcm947xx
+
+
+#endif /*!_S5_H_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm947xx/include/sbchipc.h
---- linux.old/arch/mips/bcm947xx/include/sbchipc.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbchipc.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.19/arch/mips/bcm947xx/include/sbchipc.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbchipc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbchipc.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,440 @@
+/*
+ * SiliconBackplane Chipcommon core hardware definitions.
@@ -9174,7 +9174,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm
+ * $Id$
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
-+ *
++ *
+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
@@ -9420,7 +9420,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm
+#define CLKD_OTP 0x000f0000
+#define CLKD_OTP_SHIFT 16
+#define CLKD_JTAG 0x00000f00
-+#define CLKD_JTAG_SHIFT 8
++#define CLKD_JTAG_SHIFT 8
+#define CLKD_UART 0x000000ff
+
+/* intstatus/intmask */
@@ -9604,9 +9604,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm
+#define OTP_MAGIC 0x4e56
+
+#endif /* _SBCHIPC_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/bcm947xx/include/sbconfig.h
---- linux.old/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbconfig.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbconfig.h linux-2.6.19/arch/mips/bcm947xx/include/sbconfig.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbconfig.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,342 @@
+/*
+ * Broadcom SiliconBackplane hardware register definitions.
@@ -9950,9 +9950,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/bc
+#define BISZ_SIZE 7 /* descriptor size in 32-bit intergers */
+
+#endif /* _SBCONFIG_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm947xx/include/sbextif.h
---- linux.old/arch/mips/bcm947xx/include/sbextif.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbextif.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbextif.h linux-2.6.19/arch/mips/bcm947xx/include/sbextif.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbextif.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbextif.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,242 @@
+/*
+ * Hardware-specific External Interface I/O core definitions
@@ -9968,13 +9968,13 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm
+ * The external interface core also contains 2 on-chip 16550 UARTs, clock
+ * frequency control, a watchdog interrupt timer, and a GPIO interface.
+ *
-+ * Copyright 2005, Broadcom Corporation
-+ * All Rights Reserved.
-+ *
-+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
-+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
-+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
-+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
++ * Copyright 2005, Broadcom Corporation
++ * All Rights Reserved.
++ *
++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
+ * $Id$
+ */
+
@@ -10196,9 +10196,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm
+#define CC_CLOCK_BASE 24000000 /* Half the clock freq. in the 4710 */
+
+#endif /* _SBEXTIF_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm947xx/include/sbmemc.h
---- linux.old/arch/mips/bcm947xx/include/sbmemc.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbmemc.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmemc.h linux-2.6.19/arch/mips/bcm947xx/include/sbmemc.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmemc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbmemc.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,148 @@
+/*
+ * BCM47XX Sonics SiliconBackplane DDR/SDRAM controller core hardware definitions.
@@ -10348,9 +10348,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm9
+#define MEMC_CONFIG_DDR 0x00000001
+
+#endif /* _SBMEMC_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm947xx/include/sbmips.h
---- linux.old/arch/mips/bcm947xx/include/sbmips.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbmips.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmips.h linux-2.6.19/arch/mips/bcm947xx/include/sbmips.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmips.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbmips.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,63 @@
+/*
+ * Broadcom SiliconBackplane MIPS definitions
@@ -10363,7 +10363,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm9
+ *
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
-+ *
++ *
+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
@@ -10415,9 +10415,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm9
+#endif /* _LANGUAGE_ASSEMBLY */
+
+#endif /* _SBMIPS_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm947xx/include/sbpci.h
---- linux.old/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbpci.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbpci.h linux-2.6.19/arch/mips/bcm947xx/include/sbpci.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbpci.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,122 @@
+/*
+ * BCM47XX Sonics SiliconBackplane PCI core hardware definitions.
@@ -10472,7 +10472,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm94
+#define PCI_RST_OE 0x01 /* When set, drives PCI_RESET out to pin */
+#define PCI_RST 0x02 /* Value driven out to pin */
+#define PCI_CLK_OE 0x04 /* When set, drives clock as gated by PCI_CLK out to pin */
-+#define PCI_CLK 0x08 /* Gate for clock driven out to pin */
++#define PCI_CLK 0x08 /* Gate for clock driven out to pin */
+
+/* PCI arbiter control */
+#define PCI_INT_ARB 0x01 /* When set, use an internal arbiter */
@@ -10541,9 +10541,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm94
+#endif /* !_LANGUAGE_ASSEMBLY */
+
+#endif /* _SBPCI_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bcm947xx/include/sbsdram.h
---- linux.old/arch/mips/bcm947xx/include/sbsdram.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbsdram.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbsdram.h linux-2.6.19/arch/mips/bcm947xx/include/sbsdram.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbsdram.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbsdram.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,75 @@
+/*
+ * BCM47XX Sonics SiliconBackplane SDRAM controller core hardware definitions.
@@ -10620,9 +10620,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bcm
+#define MEM8MX16X2 0xc29 /* 32 MB */
+
+#endif /* _SBSDRAM_H */
-diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm947xx/include/sbutils.h
---- linux.old/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sbutils.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbutils.h linux-2.6.19/arch/mips/bcm947xx/include/sbutils.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sbutils.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,136 @@
+/*
+ * Misc utility routines for accessing chip-specific features
@@ -10630,7 +10630,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm
+ *
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
-+ *
++ *
+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
@@ -10642,9 +10642,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm
+#ifndef _sbutils_h_
+#define _sbutils_h_
+
-+/*
-+ * Datastructure to export all chip specific common variables
-+ * public (read-only) portion of sbutils handle returned by
++/*
++ * Datastructure to export all chip specific common variables
++ * public (read-only) portion of sbutils handle returned by
+ * sb_attach()/sb_kattach()
+*/
+
@@ -10730,7 +10730,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm
+extern void sb_register_intr_callback(sb_t *sbh, void *intrsoff_fn,
+ void *intrsrestore_fn, void *intrsenabled_fn, void *intr_arg);
+extern uint32 sb_set_initiator_to(sb_t *sbh, uint32 to);
-+extern void sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice,
++extern void sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice,
+ uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif);
+extern uint32 sb_gpiotimerval(sb_t *sbh, uint32 mask, uint32 val);
+
@@ -10760,9 +10760,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm
+#define SB_DEVPATH_BUFSZ 16 /* min buffer size in bytes */
+
+#endif /* _sbutils_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/sflash.h linux.dev/arch/mips/bcm947xx/include/sflash.h
---- linux.old/arch/mips/bcm947xx/include/sflash.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/sflash.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sflash.h linux-2.6.19/arch/mips/bcm947xx/include/sflash.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sflash.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/sflash.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,36 @@
+/*
+ * Broadcom SiliconBackplane chipcommon serial flash interface
@@ -10800,9 +10800,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sflash.h linux.dev/arch/mips/bcm9
+extern struct sflash * sflash_init(chipcregs_t *cc);
+
+#endif /* _sflash_h_ */
-diff -urN linux.old/arch/mips/bcm947xx/include/trxhdr.h linux.dev/arch/mips/bcm947xx/include/trxhdr.h
---- linux.old/arch/mips/bcm947xx/include/trxhdr.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/trxhdr.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/trxhdr.h linux-2.6.19/arch/mips/bcm947xx/include/trxhdr.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/trxhdr.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/trxhdr.h 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,33 @@
+/*
+ * TRX image file header format.
@@ -10837,10 +10837,10 @@ diff -urN linux.old/arch/mips/bcm947xx/include/trxhdr.h linux.dev/arch/mips/bcm9
+
+/* Compatibility */
+typedef struct trx_header TRXHDR, *PTRXHDR;
-diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bcm947xx/include/typedefs.h
---- linux.old/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/include/typedefs.h 2006-11-03 21:10:13.000000000 +0100
-@@ -0,0 +1,326 @@
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/typedefs.h linux-2.6.19/arch/mips/bcm947xx/include/typedefs.h
+--- linux-2.6.19.ref/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/include/typedefs.h 2006-12-04 21:33:48.000000000 +0100
+@@ -0,0 +1,322 @@
+/*
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
@@ -10972,7 +10972,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc
+
+#else
+
-+#include <sys/types.h>
++#include <sys/types.h>
+
+#endif
+
@@ -10996,10 +10996,6 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc
+#ifdef USE_TYPEDEF_DEFAULTS
+#undef USE_TYPEDEF_DEFAULTS
+
-+#ifndef TYPEDEF_BOOL
-+typedef /*@abstract@*/ unsigned char bool;
-+#endif
-+
+/*----------------------- define uchar, ushort, uint, ulong ------------------*/
+
+#ifndef TYPEDEF_UCHAR
@@ -11109,14 +11105,14 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc
+/* Reclaiming text and data :
+ The following macros specify special linker sections that can be reclaimed
+ after a system is considered 'up'.
-+ */
++ */
+#if defined(__GNUC__) && defined(BCMRECLAIM)
+extern bool bcmreclaimed;
-+#define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data##_ini
++#define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data##_ini
+#define BCMINITFN(_fn) __attribute__ ((__section__ (".textini." #_fn))) _fn##_ini
+#define BCMINIT(_id) _id##_ini
-+#else
-+#define BCMINITDATA(_data) _data
++#else
++#define BCMINITDATA(_data) _data
+#define BCMINITFN(_fn) _fn
+#define BCMINIT(_id) _id
+#define bcmreclaimed 0
@@ -11167,9 +11163,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc
+#endif /* USE_TYPEDEF_DEFAULTS */
+
+#endif /* _TYPEDEFS_H_ */
-diff -urN linux.old/arch/mips/bcm947xx/irq.c linux.dev/arch/mips/bcm947xx/irq.c
---- linux.old/arch/mips/bcm947xx/irq.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/irq.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/irq.c linux-2.6.19/arch/mips/bcm947xx/irq.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/irq.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/irq.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
@@ -11195,7 +11191,7 @@ diff -urN linux.old/arch/mips/bcm947xx/irq.c linux.dev/arch/mips/bcm947xx/irq.c
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
-+#include <linux/config.h>
++#include <linux/autoconf.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
@@ -11218,26 +11214,26 @@ diff -urN linux.old/arch/mips/bcm947xx/irq.c linux.dev/arch/mips/bcm947xx/irq.c
+ clear_c0_status(cause);
+
+ if (cause & CAUSEF_IP7)
-+ do_IRQ(7, regs);
++ do_IRQ(7);
+ if (cause & CAUSEF_IP2)
-+ do_IRQ(2, regs);
++ do_IRQ(2);
+ if (cause & CAUSEF_IP3)
-+ do_IRQ(3, regs);
++ do_IRQ(3);
+ if (cause & CAUSEF_IP4)
-+ do_IRQ(4, regs);
++ do_IRQ(4);
+ if (cause & CAUSEF_IP5)
-+ do_IRQ(5, regs);
++ do_IRQ(5);
+ if (cause & CAUSEF_IP6)
-+ do_IRQ(6, regs);
++ do_IRQ(6);
+}
+
+void __init arch_init_irq(void)
+{
+ mips_cpu_irq_init(0);
+}
-diff -urN linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Makefile
---- linux.old/arch/mips/bcm947xx/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/Makefile 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/Makefile linux-2.6.19/arch/mips/bcm947xx/Makefile
+--- linux-2.6.19.ref/arch/mips/bcm947xx/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/Makefile 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,6 @@
+#
+# Makefile for the BCM47xx specific kernel interface routines
@@ -11245,9 +11241,9 @@ diff -urN linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Mak
+#
+
+obj-y := irq.o prom.o setup.o time.o pci.o
-diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
---- linux.old/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/pci.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/pci.c linux-2.6.19/arch/mips/bcm947xx/pci.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/pci.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,227 @@
+#include <linux/kernel.h>
+#include <linux/init.h>
@@ -11276,7 +11272,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+{
+ int ret;
+ unsigned long flags;
-+
++
+ spin_lock_irqsave(&sbh_lock, flags);
+ ret = sbpci_read_config(sbh, bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), reg, val, size);
+ spin_unlock_irqrestore(&sbh_lock, flags);
@@ -11290,7 +11286,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+{
+ int ret;
+ unsigned long flags;
-+
++
+ spin_lock_irqsave(&sbh_lock, flags);
+ ret = sbpci_write_config(sbh, bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), reg, &val, size);
+ spin_unlock_irqrestore(&sbh_lock, flags);
@@ -11348,7 +11344,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+void bcm47xx_pci_init(void)
+{
+ unsigned long flags;
-+
++
+ spin_lock_irqsave(&sbh_lock, flags);
+ sbpci_init(sbh);
+ spin_unlock_irqrestore(&sbh_lock, flags);
@@ -11364,7 +11360,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+ unsigned long flags;
+ u8 irq;
+ uint idx;
-+
++
+ /* external: use the irq of the pci core */
+ if (dev->bus->number >= 1) {
+ spin_lock_irqsave(&sbh_lock, flags);
@@ -11373,10 +11369,10 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+ irq = sb_irq(sbh);
+ sb_setcoreidx(sbh, idx);
+ spin_unlock_irqrestore(&sbh_lock, flags);
-+
++
+ return irq + 2;
+ }
-+
++
+ /* internal */
+ pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+ return irq + 2;
@@ -11393,7 +11389,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+
+ if (d->bus->number == 0)
+ return;
-+
++
+ printk("PCI: Fixing up device %s\n", pci_name(d));
+
+ /* Fix up resource bases */
@@ -11424,13 +11420,13 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+{
+ if (dev->bus->number != 1 || PCI_SLOT(dev->devfn) != 0)
+ return;
-+
++
+ printk("PCI: fixing up bridge\n");
+
+ /* Enable PCI bridge bus mastering and memory space */
+ pci_set_master(dev);
+ pcibios_enable_device(dev, ~0);
-+
++
+ /* Enable PCI bridge BAR1 prefetch and burst */
+ pci_write_config_dword(dev, PCI_BAR1_CONTROL, 3);
+}
@@ -11440,7 +11436,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+{
+ uint coreidx;
+ unsigned long flags;
-+
++
+ bcm47xx_fixup_device(dev);
+
+ /* These cores come out of reset enabled */
@@ -11455,7 +11451,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+ spin_lock_irqsave(&sbh_lock, flags);
+ coreidx = sb_coreidx(sbh);
+ if (sb_setcoreidx(sbh, PCI_SLOT(dev->devfn)) && (sb_coreid(sbh) == SB_USB)) {
-+ /*
++ /*
+ * The USB core requires a special bit to be set during core
+ * reset to enable host (OHCI) mode. Resetting the SB core in
+ * pcibios_enable_device() is a hack for compatibility with
@@ -11476,9 +11472,9 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, bcm47xx_fixup_bridge);
-diff -urN linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom.c
---- linux.old/arch/mips/bcm947xx/prom.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/prom.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/prom.c linux-2.6.19/arch/mips/bcm947xx/prom.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/prom.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/prom.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
@@ -11527,7 +11523,7 @@ diff -urN linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom.
+
+ /* Figure out memory size by finding aliases */
+ for (mem = (1 << 20); mem < (128 << 20); mem += (1 << 20)) {
-+ if (*(unsigned long *)((unsigned long)(prom_init) + mem) ==
++ if (*(unsigned long *)((unsigned long)(prom_init) + mem) ==
+ *(unsigned long *)(prom_init))
+ break;
+ }
@@ -11539,10 +11535,10 @@ diff -urN linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom.
+{
+ return 0;
+}
-diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setup.c
---- linux.old/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/setup.c 2006-11-03 21:10:13.000000000 +0100
-@@ -0,0 +1,158 @@
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/setup.c linux-2.6.19/arch/mips/bcm947xx/setup.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/setup.c 2006-12-04 21:33:48.000000000 +0100
+@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
+ * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
@@ -11592,7 +11588,6 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu
+
+extern void bcm47xx_pci_init(void);
+extern void bcm47xx_time_init(void);
-+extern void bcm47xx_timer_setup(struct irqaction *irq);
+void *sbh;
+spinlock_t sbh_lock = SPIN_LOCK_UNLOCKED;
+int boardflags;
@@ -11627,7 +11622,7 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu
+ uint baud_base;
+ uint reg_shift;
+ struct uart_port s;
-+
++
+ regs = port->regs;
+ irq = port->irq;
+ baud_base = port->baud_base;
@@ -11651,7 +11646,7 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu
+static void bcm47xx_machine_restart(char *command)
+{
+ printk("Please stand by while rebooting the system...\n");
-+
++
+ /* Set the watchdog timer to reset immediately */
+ local_irq_disable();
+ sb_watchdog(sbh, 1);
@@ -11666,11 +11661,11 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu
+ while (1);
+}
+
-+void __init plat_setup(void)
++void __init plat_mem_setup(void)
+{
+ char *s;
+ int i;
-+
++
+ sbh = (void *) sb_kattach();
+ sb_mips_init(sbh);
+
@@ -11695,15 +11690,14 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu
+ pm_power_off = bcm47xx_machine_halt;
+
+ board_time_init = bcm47xx_time_init;
-+ board_timer_setup = bcm47xx_timer_setup;
+}
+
+EXPORT_SYMBOL(sbh);
+EXPORT_SYMBOL(sbh_lock);
+EXPORT_SYMBOL(boardflags);
-diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time.c
---- linux.old/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/arch/mips/bcm947xx/time.c 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/time.c linux-2.6.19/arch/mips/bcm947xx/time.c
+--- linux-2.6.19.ref/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/arch/mips/bcm947xx/time.c 2006-12-04 21:33:48.000000000 +0100
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
@@ -11729,7 +11723,7 @@ diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time.
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
-+#include <linux/config.h>
++#include <linux/autoconf.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -11765,15 +11759,15 @@ diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time.
+}
+
+void __init
-+bcm47xx_timer_setup(struct irqaction *irq)
++plat_timer_setup(struct irqaction *irq)
+{
+ /* Enable the timer interrupt */
+ setup_irq(7, irq);
+}
-diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
---- linux.old/arch/mips/Kconfig 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/arch/mips/Kconfig 2006-11-03 21:10:13.000000000 +0100
-@@ -245,6 +245,17 @@
+diff -urN linux-2.6.19.ref/arch/mips/Kconfig linux-2.6.19/arch/mips/Kconfig
+--- linux-2.6.19.ref/arch/mips/Kconfig 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/arch/mips/Kconfig 2006-12-04 21:33:48.000000000 +0100
+@@ -222,6 +222,17 @@
Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and
Olivetti M700-10 workstations.
@@ -11791,10 +11785,10 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
config LASAT
bool "LASAT Networks platforms"
select DMA_NONCOHERENT
-diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-probe.c
---- linux.old/arch/mips/kernel/cpu-probe.c 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/arch/mips/kernel/cpu-probe.c 2006-11-03 21:10:13.000000000 +0100
-@@ -691,6 +691,28 @@
+diff -urN linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c linux-2.6.19/arch/mips/kernel/cpu-probe.c
+--- linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/arch/mips/kernel/cpu-probe.c 2006-12-04 21:33:48.000000000 +0100
+@@ -723,6 +723,28 @@
}
@@ -11823,7 +11817,7 @@ diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-
__init void cpu_probe(void)
{
struct cpuinfo_mips *c = &current_cpu_data;
-@@ -713,6 +735,9 @@
+@@ -745,6 +767,9 @@
case PRID_COMP_SIBYTE:
cpu_probe_sibyte(c);
break;
@@ -11833,9 +11827,9 @@ diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-
case PRID_COMP_SANDCRAFT:
cpu_probe_sandcraft(c);
break;
-diff -urN linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S
---- linux.old/arch/mips/kernel/head.S 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/arch/mips/kernel/head.S 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/arch/mips/kernel/head.S linux-2.6.19/arch/mips/kernel/head.S
+--- linux-2.6.19.ref/arch/mips/kernel/head.S 2006-12-04 21:30:35.000000000 +0100
++++ linux-2.6.19/arch/mips/kernel/head.S 2006-12-04 21:33:48.000000000 +0100
@@ -133,6 +133,11 @@
j kernel_entry
nop
@@ -11848,10 +11842,10 @@ diff -urN linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S
/*
* Reserved space for exception handlers.
* Necessary for machines which link their kernels at KSEG0.
-diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c
---- linux.old/arch/mips/kernel/proc.c 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/arch/mips/kernel/proc.c 2006-11-03 21:10:13.000000000 +0100
-@@ -84,6 +84,8 @@
+diff -urN linux-2.6.19.ref/arch/mips/kernel/proc.c linux-2.6.19/arch/mips/kernel/proc.c
+--- linux-2.6.19.ref/arch/mips/kernel/proc.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/arch/mips/kernel/proc.c 2006-12-04 21:33:48.000000000 +0100
+@@ -83,6 +83,8 @@
[CPU_VR4181] = "NEC VR4181",
[CPU_VR4181A] = "NEC VR4181A",
[CPU_SR71000] = "Sandcraft SR71000",
@@ -11860,10 +11854,10 @@ diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c
[CPU_PR4450] = "Philips PR4450",
};
-diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
---- linux.old/arch/mips/Makefile 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/arch/mips/Makefile 2006-11-03 21:10:13.000000000 +0100
-@@ -565,6 +565,13 @@
+diff -urN linux-2.6.19.ref/arch/mips/Makefile linux-2.6.19/arch/mips/Makefile
+--- linux-2.6.19.ref/arch/mips/Makefile 2006-12-04 21:31:44.000000000 +0100
++++ linux-2.6.19/arch/mips/Makefile 2006-12-04 21:33:48.000000000 +0100
+@@ -571,6 +571,13 @@
load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000
#
@@ -11877,10 +11871,10 @@ diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
# SNI RM200 PCI
#
core-$(CONFIG_SNI_RM200_PCI) += arch/mips/sni/
-diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
---- linux.old/arch/mips/mm/tlbex.c 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/arch/mips/mm/tlbex.c 2006-11-03 21:15:12.000000000 +0100
-@@ -882,6 +882,8 @@
+diff -urN linux-2.6.19.ref/arch/mips/mm/tlbex.c linux-2.6.19/arch/mips/mm/tlbex.c
+--- linux-2.6.19.ref/arch/mips/mm/tlbex.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/arch/mips/mm/tlbex.c 2006-12-04 21:33:48.000000000 +0100
+@@ -880,6 +880,8 @@
case CPU_4KSC:
case CPU_20KC:
case CPU_25KF:
@@ -11889,12 +11883,12 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
tlbw(p);
break;
-diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h
---- linux.old/include/asm-mips/bootinfo.h 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/include/asm-mips/bootinfo.h 2006-11-03 21:10:13.000000000 +0100
-@@ -218,6 +218,12 @@
- #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */
- #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */
+diff -urN linux-2.6.19.ref/include/asm-mips/bootinfo.h linux-2.6.19/include/asm-mips/bootinfo.h
+--- linux-2.6.19.ref/include/asm-mips/bootinfo.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/include/asm-mips/bootinfo.h 2006-12-04 21:33:48.000000000 +0100
+@@ -212,6 +212,12 @@
+ #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */
+ #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */
+/*
+ * Valid machtype for group Broadcom
@@ -11905,9 +11899,9 @@ diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/booti
#define CL_SIZE COMMAND_LINE_SIZE
const char *get_system_type(void);
-diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h
---- linux.old/include/asm-mips/cpu.h 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/include/asm-mips/cpu.h 2006-11-03 21:10:13.000000000 +0100
+diff -urN linux-2.6.19.ref/include/asm-mips/cpu.h linux-2.6.19/include/asm-mips/cpu.h
+--- linux-2.6.19.ref/include/asm-mips/cpu.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/include/asm-mips/cpu.h 2006-12-04 21:33:48.000000000 +0100
@@ -104,6 +104,13 @@
#define PRID_IMP_SR71000 0x0400
@@ -11933,20 +11927,20 @@ diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h
/*
* ISA Level encodings
-diff -urN linux.old/include/linux/pci_ids.h linux.dev/include/linux/pci_ids.h
---- linux.old/include/linux/pci_ids.h 2006-11-03 21:16:21.000000000 +0100
-+++ linux.dev/include/linux/pci_ids.h 2006-11-03 21:10:13.000000000 +0100
-@@ -1906,6 +1906,7 @@
- #define PCI_DEVICE_ID_TIGON3_5901_2 0x170e
+diff -urN linux-2.6.19.ref/include/linux/pci_ids.h linux-2.6.19/include/linux/pci_ids.h
+--- linux-2.6.19.ref/include/linux/pci_ids.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/include/linux/pci_ids.h 2006-12-04 21:33:48.000000000 +0100
+@@ -1950,6 +1950,7 @@
+ #define PCI_DEVICE_ID_TIGON3_5906M 0x1713
#define PCI_DEVICE_ID_BCM4401 0x4401
#define PCI_DEVICE_ID_BCM4401B0 0x4402
+#define PCI_DEVICE_ID_BCM4713 0x4713
#define PCI_VENDOR_ID_TOPIC 0x151f
#define PCI_DEVICE_ID_TOPIC_TP560 0x0000
-diff -urN linux.old/lib/kobject_uevent.c linux.dev/lib/kobject_uevent.c
---- linux.old/lib/kobject_uevent.c 2006-06-18 03:49:35.000000000 +0200
-+++ linux.dev/lib/kobject_uevent.c 2006-11-03 21:44:56.000000000 +0100
+diff -urN linux-2.6.19.ref/lib/kobject_uevent.c linux-2.6.19/lib/kobject_uevent.c
+--- linux-2.6.19.ref/lib/kobject_uevent.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/lib/kobject_uevent.c 2006-12-04 21:33:48.000000000 +0100
@@ -29,6 +29,7 @@
u64 uevent_seqnum;
char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug";
diff --git a/target/linux/brcm-2.6/patches/002-flash-map.patch b/target/linux/brcm-2.6/patches/002-flash-map.patch
index a1cbe03290..3c805cb4c9 100644
--- a/target/linux/brcm-2.6/patches/002-flash-map.patch
+++ b/target/linux/brcm-2.6/patches/002-flash-map.patch
@@ -1,6 +1,6 @@
-diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/bcm47xx-flash.c
---- linux.old/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c 2006-06-23 19:54:06.000000000 +0200
+diff -urN linux-2.6.19.ref/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.19/drivers/mtd/maps/bcm47xx-flash.c
+--- linux-2.6.19.ref/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19/drivers/mtd/maps/bcm47xx-flash.c 2006-12-04 21:33:58.000000000 +0100
@@ -0,0 +1,490 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
@@ -45,7 +45,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/wait.h>
-+#include <linux/config.h>
++#include <linux/autoconf.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#ifdef CONFIG_MTD_PARTITIONS
@@ -133,7 +133,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ /*
+ * Read into buffer
+ */
-+ if (MTD_READ(mtd, off, sizeof(buf), &len, buf) ||
++ if (mtd->read(mtd, off, sizeof(buf), &len, buf) ||
+ len != sizeof(buf))
+ continue;
+
@@ -195,7 +195,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ set_current_state(TASK_INTERRUPTIBLE);
+ add_wait_queue(&wait_q, &wait);
+
-+ ret = MTD_ERASE(mtd, &erase);
++ ret = mtd->erase(mtd, &erase);
+ if (ret) {
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&wait_q, &wait);
@@ -212,7 +212,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ * Next, writhe data to flash.
+ */
+
-+ ret = MTD_WRITE (mtd, pos, len, &retlen, buf);
++ ret = mtd->write(mtd, pos, len, &retlen, buf);
+ if (ret)
+ return ret;
+ if (retlen != len)
@@ -243,7 +243,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ /*
+ * Read into buffer
+ */
-+ if (MTD_READ(mtd, off, sizeof(trx), &len, (char *) &trx) ||
++ if (mtd->read(mtd, off, sizeof(trx), &len, (char *) &trx) ||
+ len != sizeof(trx))
+ continue;
+
@@ -269,7 +269,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ if (part->size == 0)
+ return 0;
+
-+ if (MTD_READ(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf))
++ if (mtd->read(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf))
+ return 0;
+
+ if (*((__u32 *) buf) == SQUASHFS_MAGIC) {
@@ -297,7 +297,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+
+ /* Update the trx crc32 */
+ for (i = (u32) &(((struct trx_header *)NULL)->flag_version); i <= trx.len; i += sizeof(buf)) {
-+ if (MTD_READ(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf))
++ if (mtd->read(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf))
+ return 0;
+ crc = crc32_le(crc, buf, min(sizeof(buf), trx.len - i));
+ }
@@ -306,7 +306,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ /* read first eraseblock from the trx */
+ block = kmalloc(mtd->erasesize, GFP_KERNEL);
+ trx2 = (struct trx_header *) block;
-+ if (MTD_READ(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) {
++ if (mtd->read(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) {
+ printk("Error accessing the first trx eraseblock\n");
+ return 0;
+ }
@@ -492,9 +492,9 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+
+module_init(init_bcm947xx_map);
+module_exit(cleanup_bcm947xx_map);
-diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig
---- linux.old/drivers/mtd/maps/Kconfig 2006-06-23 19:13:51.000000000 +0200
-+++ linux.dev/drivers/mtd/maps/Kconfig 2006-06-23 18:47:58.000000000 +0200
+diff -urN linux-2.6.19.ref/drivers/mtd/maps/Kconfig linux-2.6.19/drivers/mtd/maps/Kconfig
+--- linux-2.6.19.ref/drivers/mtd/maps/Kconfig 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/drivers/mtd/maps/Kconfig 2006-12-04 21:33:58.000000000 +0100
@@ -299,6 +299,12 @@
Mapping for the Flaga digital module. If you don't have one, ignore
this setting.
@@ -508,10 +508,10 @@ diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig
config MTD_BEECH
tristate "CFI Flash device mapped on IBM 405LP Beech"
depends on MTD_CFI && BEECH
-diff -urN linux.old/drivers/mtd/maps/Makefile linux.dev/drivers/mtd/maps/Makefile
---- linux.old/drivers/mtd/maps/Makefile 2006-06-23 19:13:51.000000000 +0200
-+++ linux.dev/drivers/mtd/maps/Makefile 2006-06-23 18:47:58.000000000 +0200
-@@ -30,6 +30,7 @@
+diff -urN linux-2.6.19.ref/drivers/mtd/maps/Makefile linux-2.6.19/drivers/mtd/maps/Makefile
+--- linux-2.6.19.ref/drivers/mtd/maps/Makefile 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/drivers/mtd/maps/Makefile 2006-12-04 21:33:58.000000000 +0100
+@@ -29,6 +29,7 @@
obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o
obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o
diff --git a/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch b/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch
index d0487fb926..d9e4dd78bb 100644
--- a/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch
+++ b/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch
@@ -1,6 +1,6 @@
-diff -ur linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S
---- linux.old/arch/mips/kernel/genex.S 2006-10-16 19:09:36.000000000 +0200
-+++ linux.dev/arch/mips/kernel/genex.S 2006-10-16 19:06:50.000000000 +0200
+diff -urN linux-2.6.19.ref/arch/mips/kernel/genex.S linux-2.6.19/arch/mips/kernel/genex.S
+--- linux-2.6.19.ref/arch/mips/kernel/genex.S 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/arch/mips/kernel/genex.S 2006-12-04 21:34:09.000000000 +0100
@@ -73,6 +73,10 @@
.set push
.set mips3
@@ -12,10 +12,10 @@ diff -ur linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S
mfc0 k1, CP0_CAUSE
li k0, 31<<2
andi k1, k1, 0x7c
-diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
---- linux.old/arch/mips/mm/c-r4k.c 2006-10-16 19:09:36.000000000 +0200
-+++ linux.dev/arch/mips/mm/c-r4k.c 2006-10-16 19:08:46.000000000 +0200
-@@ -14,6 +14,15 @@
+diff -urN linux-2.6.19.ref/arch/mips/mm/c-r4k.c linux-2.6.19/arch/mips/mm/c-r4k.c
+--- linux-2.6.19.ref/arch/mips/mm/c-r4k.c 2006-12-04 21:34:04.000000000 +0100
++++ linux-2.6.19/arch/mips/mm/c-r4k.c 2006-12-04 21:34:09.000000000 +0100
+@@ -13,6 +13,15 @@
#include <linux/mm.h>
#include <linux/bitops.h>
@@ -31,7 +31,7 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
#include <asm/bcache.h>
#include <asm/bootinfo.h>
#include <asm/cache.h>
-@@ -30,6 +39,9 @@
+@@ -29,6 +38,9 @@
#include <asm/cacheflush.h> /* for run_uncached() */
@@ -41,40 +41,37 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
/*
* Special Variant of smp_call_function for use by cache functions:
*
-@@ -94,7 +106,9 @@
+@@ -93,6 +105,9 @@
{
unsigned long dc_lsize = cpu_dcache_line_size();
-- if (dc_lsize == 16)
+ if (bcm4710)
+ r4k_blast_dcache_page = blast_dcache_page;
-+ else if (dc_lsize == 16)
- r4k_blast_dcache_page = blast_dcache16_page;
- else if (dc_lsize == 32)
- r4k_blast_dcache_page = r4k_blast_dcache_page_dc32;
-@@ -106,7 +120,9 @@
++ else
+ if (dc_lsize == 0)
+ r4k_blast_dcache_page = (void *)cache_noop;
+ else if (dc_lsize == 16)
+@@ -107,6 +122,9 @@
{
unsigned long dc_lsize = cpu_dcache_line_size();
-- if (dc_lsize == 16)
+ if (bcm4710)
+ r4k_blast_dcache_page_indexed = blast_dcache_page_indexed;
-+ else if (dc_lsize == 16)
- r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed;
- else if (dc_lsize == 32)
- r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed;
-@@ -118,7 +134,9 @@
++ else
+ if (dc_lsize == 0)
+ r4k_blast_dcache_page_indexed = (void *)cache_noop;
+ else if (dc_lsize == 16)
+@@ -121,6 +139,9 @@
{
unsigned long dc_lsize = cpu_dcache_line_size();
-- if (dc_lsize == 16)
+ if (bcm4710)
+ r4k_blast_dcache = blast_dcache;
-+ else if (dc_lsize == 16)
- r4k_blast_dcache = blast_dcache16;
- else if (dc_lsize == 32)
- r4k_blast_dcache = blast_dcache32;
-@@ -527,6 +545,9 @@
++ else
+ if (dc_lsize == 0)
+ r4k_blast_dcache = (void *)cache_noop;
+ else if (dc_lsize == 16)
+@@ -538,6 +559,9 @@
r4k_blast_icache();
else
protected_blast_icache_range(start, end);
@@ -84,17 +81,17 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
}
static void r4k_flush_icache_range(unsigned long start, unsigned long end)
-@@ -683,6 +704,8 @@
+@@ -618,6 +642,8 @@
unsigned long addr = (unsigned long) arg;
R4600_HIT_CACHEOP_WAR_IMPL;
+ BCM4710_PROTECTED_FILL_TLB(addr);
+ BCM4710_PROTECTED_FILL_TLB(addr + 4);
- protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
+ if (dc_lsize)
+ protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
if (!cpu_icache_snoops_remote_store && scache_size)
- protected_writeback_scache_line(addr & ~(sc_lsize - 1));
-@@ -1189,6 +1212,16 @@
- static inline void coherency_setup(void)
+@@ -1135,6 +1161,16 @@
+ static void __init coherency_setup(void)
{
change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT);
+#ifdef CONFIG_BCM947XX
@@ -110,7 +107,7 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
/*
* c0_status.cu=0 specifies that updates by the sc instruction use
-@@ -1227,6 +1260,15 @@
+@@ -1173,6 +1209,15 @@
/* Default cache error handler for R4000 and R5000 family */
set_uncached_handler (0x100, &except_vec2_generic, 0x80);
@@ -126,21 +123,21 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
probe_pcache();
setup_scache();
-diff -ur linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
---- linux.old/arch/mips/mm/tlbex.c 2006-10-16 19:09:36.000000000 +0200
-+++ linux.dev/arch/mips/mm/tlbex.c 2006-10-16 19:06:50.000000000 +0200
-@@ -38,6 +38,10 @@
-
- /* #define DEBUG_TLB */
+diff -urN linux-2.6.19.ref/arch/mips/mm/tlbex.c linux-2.6.19/arch/mips/mm/tlbex.c
+--- linux-2.6.19.ref/arch/mips/mm/tlbex.c 2006-12-04 21:33:48.000000000 +0100
++++ linux-2.6.19/arch/mips/mm/tlbex.c 2006-12-04 21:34:09.000000000 +0100
+@@ -1174,6 +1174,10 @@
+ #endif
+ }
+#ifdef CONFIG_BCM947XX
+extern int bcm4710;
+#endif
+
- static __init int __attribute__((unused)) r45k_bvahwbug(void)
+ static void __init build_r4000_tlb_refill_handler(void)
{
- /* XXX: We should probe for the presence of this bug, but we don't. */
-@@ -1184,6 +1188,12 @@
+ u32 *p = tlb_handler;
+@@ -1188,6 +1192,12 @@
memset(relocs, 0, sizeof(relocs));
memset(final_handler, 0, sizeof(final_handler));
@@ -153,9 +150,9 @@ diff -ur linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
/*
* create the plain linear handler
*/
-diff -ur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcache.h
---- linux.old/include/asm-mips/r4kcache.h 2006-10-16 19:09:36.000000000 +0200
-+++ linux.dev/include/asm-mips/r4kcache.h 2006-10-16 19:09:11.000000000 +0200
+diff -urN linux-2.6.19.ref/include/asm-mips/r4kcache.h linux-2.6.19/include/asm-mips/r4kcache.h
+--- linux-2.6.19.ref/include/asm-mips/r4kcache.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/include/asm-mips/r4kcache.h 2006-12-04 21:34:09.000000000 +0100
@@ -17,6 +17,18 @@
#include <asm/cpu-features.h>
#include <asm/mipsmtregs.h>
@@ -356,10 +353,10 @@ diff -ur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcac
+__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD,,, )
#endif /* _ASM_R4KCACHE_H */
-diff -ur linux.old/include/asm-mips/stackframe.h linux.dev/include/asm-mips/stackframe.h
---- linux.old/include/asm-mips/stackframe.h 2006-10-16 19:09:36.000000000 +0200
-+++ linux.dev/include/asm-mips/stackframe.h 2006-10-16 19:06:50.000000000 +0200
-@@ -361,6 +361,10 @@
+diff -urN linux-2.6.19.ref/include/asm-mips/stackframe.h linux-2.6.19/include/asm-mips/stackframe.h
+--- linux-2.6.19.ref/include/asm-mips/stackframe.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/include/asm-mips/stackframe.h 2006-12-04 21:34:09.000000000 +0100
+@@ -334,6 +334,10 @@
.macro RESTORE_SP_AND_RET
LONG_L sp, PT_R29(sp)
.set mips3
diff --git a/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch b/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch
index 15e4297a81..d327670978 100644
--- a/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch
+++ b/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch
@@ -1,6 +1,6 @@
-diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
---- linux-2.6.17/drivers/net/b44.c 2006-06-18 03:49:35.000000000 +0200
-+++ linux-2.6.17-owrt/drivers/net/b44.c 2006-06-18 16:24:14.000000000 +0200
+diff -urN linux-2.6.19.ref/drivers/net/b44.c linux-2.6.19/drivers/net/b44.c
+--- linux-2.6.19.ref/drivers/net/b44.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/drivers/net/b44.c 2006-12-04 21:34:14.000000000 +0100
@@ -1,7 +1,9 @@
-/* b44.c: Broadcom 4400 device driver.
+/* b44.c: Broadcom 4400/47xx device driver.
@@ -14,8 +14,8 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
*
* Distribute under GPL.
@@ -32,6 +34,28 @@
- #define DRV_MODULE_VERSION "1.00"
- #define DRV_MODULE_RELDATE "Apr 7, 2006"
+ #define DRV_MODULE_VERSION "1.01"
+ #define DRV_MODULE_RELDATE "Jun 16, 2006"
+#ifdef CONFIG_BCM947XX
+extern char *nvram_get(char *name);
@@ -42,7 +42,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
#define B44_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \
NETIF_MSG_PROBE | \
-@@ -78,8 +102,8 @@
+@@ -87,8 +111,8 @@
static char version[] __devinitdata =
DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -53,7 +53,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION);
-@@ -94,6 +118,10 @@
+@@ -103,6 +127,10 @@
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B1,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
@@ -64,7 +64,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
{ } /* terminate list with empty entry */
};
-@@ -132,17 +160,6 @@
+@@ -141,17 +169,6 @@
dma_desc_sync_size, dir);
}
@@ -82,7 +82,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
static int b44_wait_bit(struct b44 *bp, unsigned long reg,
u32 bit, unsigned long timeout, const int clear)
{
-@@ -269,6 +286,10 @@
+@@ -278,6 +295,10 @@
break;
};
#endif
@@ -93,7 +93,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
return 0;
}
-@@ -278,6 +299,30 @@
+@@ -287,6 +308,30 @@
== SBTMSLOW_CLOCK);
}
@@ -124,7 +124,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index)
{
u32 val;
-@@ -314,14 +359,14 @@
+@@ -323,14 +368,14 @@
bw32(bp, B44_IMASK, bp->imask);
}
@@ -141,7 +141,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
(reg << MDIO_DATA_RA_SHIFT) |
(MDIO_TA_VALID << MDIO_DATA_TA_SHIFT)));
err = b44_wait_bit(bp, B44_EMAC_ISTAT, EMAC_INT_MII, 100, 0);
-@@ -330,18 +375,34 @@
+@@ -339,18 +384,34 @@
return err;
}
@@ -178,7 +178,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
/* miilib interface */
/* FIXME FIXME: phy_id is ignored, bp->phy_addr use is unconditional
* due to code existing before miilib use was added to this driver.
-@@ -370,6 +431,8 @@
+@@ -379,6 +440,8 @@
u32 val;
int err;
@@ -187,7 +187,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
err = b44_writephy(bp, MII_BMCR, BMCR_RESET);
if (err)
return err;
-@@ -433,6 +496,22 @@
+@@ -442,6 +505,22 @@
u32 val;
int err;
@@ -210,7 +210,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0)
goto out;
if ((err = b44_writephy(bp, B44_MII_ALEDCTRL,
-@@ -528,6 +607,19 @@
+@@ -537,6 +616,19 @@
{
u32 bmsr, aux;
@@ -230,7 +230,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
if (!b44_readphy(bp, MII_BMSR, &bmsr) &&
!b44_readphy(bp, B44_MII_AUXCTRL, &aux) &&
(bmsr != 0xffff)) {
-@@ -1282,9 +1374,10 @@
+@@ -1292,9 +1384,10 @@
bw32(bp, B44_DMARX_CTRL, 0);
bp->rx_prod = bp->rx_cons = 0;
} else {
@@ -244,7 +244,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
}
ssb_core_reset(bp);
-@@ -1292,8 +1385,14 @@
+@@ -1302,8 +1395,14 @@
b44_clear_stats(bp);
/* Make PHY accessible. */
@@ -260,7 +260,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
br32(bp, B44_MDIO_CTRL);
if (!(br32(bp, B44_DEVCTRL) & DEVCTRL_IPP)) {
-@@ -1837,18 +1936,297 @@
+@@ -2034,18 +2133,297 @@
.get_perm_addr = ethtool_op_get_perm_addr,
};
@@ -447,7 +447,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
+
+ b44_halt(bp);
+ b44_init_rings(bp);
-+ b44_init_hw(bp);
++ b44_init_hw(bp, 1);
+ netif_wake_queue(bp->dev);
+ spin_unlock_irq(&bp->lock);
+
@@ -490,7 +490,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
+ if (bp->flags & B44_FLAG_PAUSE_AUTO) {
+ b44_halt(bp);
+ b44_init_rings(bp);
-+ b44_init_hw(bp);
++ b44_init_hw(bp, 1);
+ } else {
+ __b44_set_flow_ctrl(bp, bp->flags);
+ }
@@ -562,7 +562,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
out:
return err;
}
-@@ -1868,27 +2246,60 @@
+@@ -2065,27 +2443,60 @@
static int __devinit b44_get_invariants(struct b44 *bp)
{
u8 eeprom[128];
@@ -639,7 +639,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
/* With this, plus the rx_header prepended to the data by the
* hardware, we'll land the ethernet header on a 2-byte boundary.
-@@ -1898,7 +2309,6 @@
+@@ -2095,7 +2506,6 @@
bp->imask = IMASK_DEF;
bp->core_unit = ssb_core_unit(bp);
@@ -647,7 +647,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
/* XXX - really required?
bp->flags |= B44_FLAG_BUGGY_TXPTR;
-@@ -2048,11 +2458,17 @@
+@@ -2246,11 +2656,17 @@
*/
b44_chip_reset(bp);
@@ -666,10 +666,10 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
return 0;
err_out_iounmap:
-diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
---- linux-2.6.17/drivers/net/b44.h 2006-06-18 03:49:35.000000000 +0200
-+++ linux-2.6.17-owrt/drivers/net/b44.h 2006-06-18 16:01:10.000000000 +0200
-@@ -292,6 +292,10 @@
+diff -urN linux-2.6.19.ref/drivers/net/b44.h linux-2.6.19/drivers/net/b44.h
+--- linux-2.6.19.ref/drivers/net/b44.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/drivers/net/b44.h 2006-12-04 21:34:14.000000000 +0100
+@@ -297,6 +297,10 @@
#define SSB_PCI_MASK1 0xfc000000
#define SSB_PCI_MASK2 0xc0000000
@@ -680,7 +680,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
/* 4400 PHY registers */
#define B44_MII_AUXCTRL 24 /* Auxiliary Control */
#define MII_AUXCTRL_DUPLEX 0x0001 /* Full Duplex */
-@@ -345,6 +349,8 @@
+@@ -350,6 +354,8 @@
};
#define B44_MCAST_TABLE_SIZE 32
@@ -689,11 +689,11 @@ diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
#define B44_STAT_REG_DECLARE \
_B44(tx_good_octets) \
-@@ -420,6 +426,7 @@
-
- u32 dma_offset;
- u32 flags;
-+#define B44_FLAG_INIT_COMPLETE 0x00000001
+@@ -428,6 +434,7 @@
+ #define B44_FLAG_B0_ANDLATER 0x00000001
#define B44_FLAG_BUGGY_TXPTR 0x00000002
#define B44_FLAG_REORDER_BUG 0x00000004
++#define B44_FLAG_INIT_COMPLETE 0x00000008
#define B44_FLAG_PAUSE_AUTO 0x00008000
+ #define B44_FLAG_FULL_DUPLEX 0x00010000
+ #define B44_FLAG_100_BASE_T 0x00020000
diff --git a/target/linux/brcm-2.6/patches/005-remove_scache.patch b/target/linux/brcm-2.6/patches/005-remove_scache.patch
new file mode 100644
index 0000000000..f56f72f176
--- /dev/null
+++ b/target/linux/brcm-2.6/patches/005-remove_scache.patch
@@ -0,0 +1,94 @@
+diff -urN linux-2.6.19.ref/arch/mips/Kconfig linux-2.6.19/arch/mips/Kconfig
+--- linux-2.6.19.ref/arch/mips/Kconfig 2006-12-04 21:33:48.000000000 +0100
++++ linux-2.6.19/arch/mips/Kconfig 2006-12-04 21:34:04.000000000 +0100
+@@ -283,7 +283,6 @@
+ select I8259
+ select MIPS_BOARDS_GEN
+ select MIPS_BONITO64
+- select MIPS_CPU_SCACHE
+ select MIPS_GT64120
+ select MIPS_MSC
+ select SWAP_IO_SPACE
+@@ -1434,13 +1433,6 @@
+ bool
+ select BOARD_SCACHE
+
+-#
+-# Support for a MIPS32 / MIPS64 style S-caches
+-#
+-config MIPS_CPU_SCACHE
+- bool
+- select BOARD_SCACHE
+-
+ config R5000_CPU_SCACHE
+ bool
+ select BOARD_SCACHE
+diff -urN linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c linux-2.6.19/arch/mips/kernel/cpu-probe.c
+--- linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c 2006-12-04 21:33:48.000000000 +0100
++++ linux-2.6.19/arch/mips/kernel/cpu-probe.c 2006-12-04 21:34:04.000000000 +0100
+@@ -631,6 +631,8 @@
+ break;
+ case PRID_IMP_25KF:
+ c->cputype = CPU_25KF;
++ /* Probe for L2 cache */
++ c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
+ break;
+ case PRID_IMP_34K:
+ c->cputype = CPU_34K;
+diff -urN linux-2.6.19.ref/arch/mips/mm/c-r4k.c linux-2.6.19/arch/mips/mm/c-r4k.c
+--- linux-2.6.19.ref/arch/mips/mm/c-r4k.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/arch/mips/mm/c-r4k.c 2006-12-04 21:34:04.000000000 +0100
+@@ -1038,7 +1038,6 @@
+
+ extern int r5k_sc_init(void);
+ extern int rm7k_sc_init(void);
+-extern int mips_sc_init(void);
+
+ static void __init setup_scache(void)
+ {
+@@ -1086,29 +1085,17 @@
+ return;
+
+ default:
+- if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
+- c->isa_level == MIPS_CPU_ISA_M32R2 ||
+- c->isa_level == MIPS_CPU_ISA_M64R1 ||
+- c->isa_level == MIPS_CPU_ISA_M64R2) {
+-#ifdef CONFIG_MIPS_CPU_SCACHE
+- if (mips_sc_init ()) {
+- scache_size = c->scache.ways * c->scache.sets * c->scache.linesz;
+- printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n",
+- scache_size >> 10,
+- way_string[c->scache.ways], c->scache.linesz);
+- }
+-#else
+- if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
+- panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
+-#endif
+- return;
+- }
+ sc_present = 0;
+ }
+
+ if (!sc_present)
+ return;
+
++ if ((c->isa_level == MIPS_CPU_ISA_M32R1 ||
++ c->isa_level == MIPS_CPU_ISA_M64R1) &&
++ !(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
++ panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
++
+ /* compute a couple of other cache variables */
+ c->scache.waysize = scache_size / c->scache.ways;
+
+diff -urN linux-2.6.19.ref/arch/mips/mm/Makefile linux-2.6.19/arch/mips/mm/Makefile
+--- linux-2.6.19.ref/arch/mips/mm/Makefile 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19/arch/mips/mm/Makefile 2006-12-04 21:34:04.000000000 +0100
+@@ -30,7 +30,6 @@
+ obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
+ obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
+ obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o
+-obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o
+
+ #
+ # Choose one DMA coherency model
diff --git a/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch b/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch
index 51206296bc..2a9282aa0b 100644
--- a/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch
+++ b/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch
@@ -1,16 +1,7 @@
---- linux-2.6.17.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200
-+++ linux-2.6.17/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200
-@@ -122,6 +122,7 @@
- #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
- #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
- #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
-+#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
- #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
- #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
- #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
---- linux-2.6.17.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200
-+++ linux-2.6.17/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200
-@@ -1435,6 +1435,7 @@
+diff -urN linux-2.6.19.ref/drivers/net/b44.c linux-2.6.19/drivers/net/b44.c
+--- linux-2.6.19.ref/drivers/net/b44.c 2006-12-04 21:34:14.000000000 +0100
++++ linux-2.6.19/drivers/net/b44.c 2006-12-04 21:34:19.000000000 +0100
+@@ -1445,6 +1445,7 @@
{
struct b44 *bp = netdev_priv(dev);
struct sockaddr *addr = p;
@@ -18,20 +9,20 @@
if (netif_running(dev))
return -EBUSY;
-@@ -1445,7 +1446,11 @@
+@@ -1455,7 +1456,11 @@
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
spin_lock_irq(&bp->lock);
- __b44_set_mac_addr(bp);
-+
++
+ val = br32(bp, B44_RXCONFIG);
+ if (!(val & RXCONFIG_CAM_ABSENT))
+ __b44_set_mac_addr(bp);
-+
++
spin_unlock_irq(&bp->lock);
return 0;
-@@ -1641,7 +1646,7 @@
+@@ -1797,7 +1802,7 @@
val = br32(bp, B44_RXCONFIG);
val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
@@ -40,3 +31,14 @@
val |= RXCONFIG_PROMISC;
bw32(bp, B44_RXCONFIG, val);
} else {
+diff -urN linux-2.6.19.ref/drivers/net/b44.h linux-2.6.19/drivers/net/b44.h
+--- linux-2.6.19.ref/drivers/net/b44.h 2006-12-04 21:34:14.000000000 +0100
++++ linux-2.6.19/drivers/net/b44.h 2006-12-04 21:34:19.000000000 +0100
+@@ -129,6 +129,7 @@
+ #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
+ #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
+ #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
++#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
+ #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
+ #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
+ #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */