Update brcm63xx flash map driver for 2.6.19
[openwrt.git] / target / linux / brcm-2.6 / patches / 001-bcm947xx.patch
index c6f63a2..c935ac8 100644 (file)
@@ -1,6 +1,6 @@
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmsrom.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmsrom.c    2006-03-21 09:30:59.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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/a
 +              /* 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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/a
 +              *vars = NULL;
 +              *count = 0;
 +      }
-+      
++
 +      return 0;
 +}
 +
@@ -213,7 +213,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/a
 +      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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/a
 +      /* bcm4401 sroms misprogrammed */
 +      if (sromrev == 0x10)
 +              sromrev = 1;
-+      
++
 +      /* srom version check */
 +      if (sromrev > 3)
 +              return (-2);
@@ -415,7 +415,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/a
 +              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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/a
 +      return err;
 +}
 +
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmutils.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c        1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmutils.c   2006-03-21 09:31:00.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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/
 +{
 +      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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/
 +      } 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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/
 +* 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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/
 + *       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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/
 +#define CNBUFS                5
 +
 +#endif
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/cfe_env.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/cfe_env.c    2006-03-21 09:31:00.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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 + * $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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 + *
 + * 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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 + * 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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +
 +/*  *********************************************************************
 +    *  _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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +{
 +    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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 + * @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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +    unsigned int rectype;
 +    int offset;
 +    int flg;
-+    
++
 +    size = NVRAM_SIZE;
 +    buffer = &_nvdata[0];
 +
@@ -1002,7 +1002,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +    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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +      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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +                  *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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +                      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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a
 +
 +}
 +
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/linux_osl.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c       1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/linux_osl.c  2006-03-21 09:31:00.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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt
 +#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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt
 +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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt
 +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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt
 +              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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt
 +      }
 +}
 +
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/Makefile linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/Makefile
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/Makefile  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/Makefile     2006-03-21 09:31:00.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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/Makefile linux-2.6.16-owrt/ar
 +#
 + 
 +obj-y := sbutils.o linux_osl.o bcmsrom.o bcmutils.o sbmips.o sbpci.o sflash.o nvram.o cfe_env.o
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/nvram.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/nvram.c      2006-03-21 09:31:00.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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arc
 + * $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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arc
 +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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arc
 +      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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arc
 +
 +      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,10 +1393,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arc
 +}
 +
 +EXPORT_SYMBOL(nvram_get);
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbmips.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbmips.c     2006-03-21 09:31:00.000000000 +0100
-@@ -0,0 +1,1055 @@
+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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/ar
 +              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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/ar
 +                      }
 +              }
 +              // 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 */
@@ -1829,22 +1829,22 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/ar
 +              BCMINIT(sb_setirq)(sbh, 0, SB_CODEC, 0);
 +              BCMINIT(sb_setirq)(sbh, 0, SB_EXTIF, 0);
 +              BCMINIT(sb_setirq)(sbh, 2, SB_ENET, 1);
-+              BCMINIT(sb_setirq)(sbh, 3, SB_ILINE20, 0);
++              // BCMINIT(sb_setirq)(sbh, 3, SB_ILINE20, 0); /* seems to be unused */
 +              BCMINIT(sb_setirq)(sbh, 4, SB_PCI, 0);
 +              ASSERT(eir);
 +              value = BCMINIT(early_nvram_get)("et0phyaddr");
 +              if (value && !strcmp(value, "31")) {
 +                      /* Enable internal UART */
 +                      W_REG(&eir->corecontrol, CC_UE);
-+                      /* Give USB its own interrupt */
-+                      BCMINIT(sb_setirq)(sbh, 1, SB_USB, 0);
 +              } else {
 +                      /* Disable internal UART */
 +                      W_REG(&eir->corecontrol, 0);
 +                      /* Give Ethernet its own interrupt */
 +                      BCMINIT(sb_setirq)(sbh, 1, SB_ENET, 0);
-+                      BCMINIT(sb_setirq)(sbh, 0, SB_USB, 0);
 +              }
++              /* 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 -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/ar
 +      } 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
@@ -2452,9 +2452,69 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/ar
 +      return ret;
 +}
 +
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbpci.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sbpci.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbpci.c      2006-03-21 09:31:00.000000000 +0100
++uint32
++BCMINITFN(sb_cpu_clock)(sb_t *sbh)
++{
++      extifregs_t *eir;
++      chipcregs_t *cc;
++      uint32 n, m;
++      uint idx;
++      uint32 pll_type, rate = 0;
++
++      /* get index of the current core */
++      idx = sb_coreidx(sbh);
++      pll_type = PLL_TYPE1;
++
++      /* switch to extif or chipc core */
++      if ((eir = (extifregs_t *) sb_setcore(sbh, SB_EXTIF, 0))) {
++              n = R_REG(&eir->clockcontrol_n);
++              m = R_REG(&eir->clockcontrol_sb);
++      } else if ((cc = (chipcregs_t *) sb_setcore(sbh, SB_CC, 0))) {
++              pll_type = R_REG(&cc->capabilities) & CAP_PLL_MASK;
++              n = R_REG(&cc->clockcontrol_n);
++              if ((pll_type == PLL_TYPE2) ||
++                  (pll_type == PLL_TYPE4) ||
++                  (pll_type == PLL_TYPE6) ||
++                  (pll_type == PLL_TYPE7))
++                      m = R_REG(&cc->clockcontrol_mips);
++              else if (pll_type == PLL_TYPE5) {
++                      rate = 200000000;
++                      goto out;
++              }
++              else if (pll_type == PLL_TYPE3) {
++                      if (sb_chip(sbh) == 0x5365) {
++                              rate = 200000000;
++                              goto out;
++                      }
++                      /* 5350 uses m2 to control mips */
++                      else
++                              m = R_REG(&cc->clockcontrol_m2);
++              } else
++                      m = R_REG(&cc->clockcontrol_sb);
++      } else
++              goto out;
++
++
++      /* calculate rate */
++      if (BCMINIT(sb_chip)(sbh) == 0x5365)
++              rate = 100000000;
++      else
++              rate = sb_clock_rate(pll_type, n, m);
++
++      if (pll_type == PLL_TYPE6)
++              rate = SB2MIPS_T6(rate);
++
++out:
++      /* switch back to previous core */
++      sb_setcoreidx(sbh, idx);
++
++      return rate;
++}
++
++EXPORT_SYMBOL(sb_irq);
+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
@@ -2795,7 +2855,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.16-owrt/arc
 +              /* Enable PCI interrupts */
 +              W_REG(&pci->intmask, PCI_INTA);
 +      }
-+      
++
 +      return 0;
 +}
 +
@@ -2990,17 +3050,17 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.16-owrt/arc
 +      return 0;
 +}
 +
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbutils.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbutils.c    2006-03-21 09:31:00.000000000 +0100
-@@ -0,0 +1,2370 @@
+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
 + * of the SiliconBackplane-based Broadcom chips.
 + *
 + * 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
@@ -3082,7 +3142,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +#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)
@@ -3145,7 +3205,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +static sb_info_t ksi;
 +
 +/* generic kernel variant of sb_attach() */
-+sb_t * 
++sb_t *
 +BCMINITFN(sb_kattach)()
 +{
 +      uint32 *regs;
@@ -3177,7 +3237,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +}
 +#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)
 +{
@@ -3284,13 +3344,13 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +                      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
@@ -3337,7 +3397,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      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);
 +      }
 +
@@ -3503,9 +3563,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      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;
 +
@@ -3624,7 +3684,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +              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;
@@ -3632,8 +3692,8 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      }
 +      if (pci) {
 +              si->sb.buscoretype = SB_PCI;
-+              si->sb.buscorerev = pcirev; 
-+              si->sb.buscoreidx = pciidx; 
++              si->sb.buscorerev = pcirev;
++              si->sb.buscoreidx = pciidx;
 +      }
 +
 +      /*
@@ -3741,8 +3801,8 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      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
 + */
@@ -3756,7 +3816,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +
 +      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.
@@ -3797,8 +3857,8 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      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
 + */
@@ -4130,7 +4190,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      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;
@@ -4416,10 +4476,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +              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)
@@ -4499,8 +4559,8 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +                      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);
@@ -4512,13 +4572,13 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +              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)
@@ -4682,8 +4742,8 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +}
 +
 +/* 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
 +*/
 +
@@ -4706,7 +4766,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +              ASSERT((gpio_bitmask) && !((gpio_bitmask) & (gpio_bitmask - 1)));
 +              return -1;
 +      }
-+      
++
 +      /* already released */
 +      if (!(sb_gpioreservation & gpio_bitmask))
 +              return -1;
@@ -4833,7 +4893,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +}
 +
 +/* mask&set gpio timer val */
-+uint32 
++uint32
 +sb_gpiotimerval(sb_t *sbh, uint32 mask, uint32 gpiotimerval)
 +{
 +      sb_info_t *si;
@@ -4944,7 +5004,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      chipcregs_t *cc;
 +      uint intr_val = 0;
 +      uint err = 0;
-+      
++
 +      si = SB_INFO(sbh);
 +
 +      /* chipcommon cores prior to rev6 don't support slowclkcontrol */
@@ -4957,12 +5017,12 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +
 +      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;
@@ -5000,7 +5060,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      /* 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:
@@ -5200,14 +5260,14 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +
 +
 +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);
@@ -5216,7 +5276,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +      chippkg = BCMINIT(sb_chippkg)(sbh);
 +
 +      progif = 0;
-+      
++
 +      /* Known vendor translations */
 +      switch (vendor) {
 +      case SB_VEND_BCM:
@@ -5352,6 +5412,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +
 +EXPORT_SYMBOL(sb_boardtype);
 +EXPORT_SYMBOL(sb_boardvendor);
++EXPORT_SYMBOL(sb_corereg);
++EXPORT_SYMBOL(sb_coreidx);
++EXPORT_SYMBOL(sb_setcore);
++EXPORT_SYMBOL(sb_setcoreidx);
 +EXPORT_SYMBOL(sb_gpiocontrol);
 +EXPORT_SYMBOL(sb_gpioin);
 +EXPORT_SYMBOL(sb_gpiointmask);
@@ -5364,9 +5428,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a
 +EXPORT_SYMBOL(sb_gpiosetcore);
 +EXPORT_SYMBOL(sb_gpiotimerval);
 +EXPORT_SYMBOL(sb_watchdog);
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sflash.c
---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sflash.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sflash.c     2006-03-21 09:31:00.000000000 +0100
++EXPORT_SYMBOL(sb_kattach);
+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
@@ -5736,7 +5801,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.16-owrt/ar
 +
 +                              /* 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;
@@ -5786,9 +5851,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.16-owrt/ar
 +      return ret;
 +}
 +
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmdevs.h
---- linux-2.6.16/arch/mips/bcm947xx/include/bcmdevs.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmdevs.h     2006-03-21 09:31:00.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.
@@ -5870,7 +5935,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.16-owrt/ar
 +
 +#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 */
@@ -6181,9 +6246,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.16-owrt/ar
 +#define GPIO_NUMPINS          16
 +
 +#endif /* _BCMDEVS_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmendian.h
---- linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h        1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmendian.h   2006-03-21 09:31:00.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
@@ -6209,7 +6274,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.16-owrt/
 +      ((uint16)( \
 +              (((uint16)(val) & (uint16)0x00ffU) << 8) | \
 +              (((uint16)(val) & (uint16)0xff00U) >> 8) ))
-+      
++
 +/* Byte swap a 32 bit value */
 +#define BCMSWAP32(val) \
 +      ((uint32)( \
@@ -6217,13 +6282,13 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.16-owrt/
 +              (((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)
@@ -6337,9 +6402,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.16-owrt/
 +)
 +
 +#endif /* _BCMENDIAN_H_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmnvram.h
---- linux-2.6.16/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmnvram.h    2006-03-21 09:31:00.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
@@ -6392,7 +6457,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.16-owrt/a
 + */
 +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
@@ -6436,9 +6501,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.16-owrt/a
 +#define NVRAM_MAX_PARAM_LEN 64
 +
 +#endif /* _bcmnvram_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmsrom.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmsrom.h
---- linux-2.6.16/arch/mips/bcm947xx/include/bcmsrom.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmsrom.h     2006-03-21 09:31:00.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 .
@@ -6463,9 +6528,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmsrom.h linux-2.6.16-owrt/ar
 +extern int srom_write(uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf);
 +
 +#endif        /* _bcmsrom_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmutils.h
---- linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmutils.h    2006-03-21 09:31:00.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.
@@ -6495,7 +6560,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/a
 +#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)])
@@ -6577,12 +6642,12 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/a
 +#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 */
@@ -6598,9 +6663,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/a
 +#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*/
@@ -6615,7 +6680,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/a
 +#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))
@@ -6775,9 +6840,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/a
 +extern uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint len);
 +
 +#endif        /* _bcmutils_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bitfuncs.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bitfuncs.h
---- linux-2.6.16/arch/mips/bcm947xx/include/bitfuncs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bitfuncs.h    2006-03-21 09:31:00.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
@@ -6864,9 +6929,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bitfuncs.h linux-2.6.16-owrt/a
 +#endif
 +
 +#endif /* _BITFUNCS_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flash.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/flash.h
---- linux-2.6.16/arch/mips/bcm947xx/include/flash.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/flash.h       2006-03-21 09:31:00.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.
@@ -6926,7 +6991,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flash.h linux-2.6.16-owrt/arch
 +
 +
 +#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[] = {
@@ -7003,7 +7068,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flash.h linux-2.6.16-owrt/arch
 +};
 +
 +
-+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[] = {
@@ -7042,7 +7107,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flash.h linux-2.6.16-owrt/arch
 +      { 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" },
@@ -7056,9 +7121,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flash.h linux-2.6.16-owrt/arch
 +extern flash_desc_t flashes[];
 +
 +#endif
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flashutl.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/flashutl.h
---- linux-2.6.16/arch/mips/bcm947xx/include/flashutl.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/flashutl.h    2006-03-21 09:31:00.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
@@ -7087,9 +7152,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flashutl.h linux-2.6.16-owrt/a
 +#endif        /* _LANGUAGE_ASSEMBLY */
 +
 +#endif /* _flashutl_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/hndmips.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/hndmips.h
---- linux-2.6.16/arch/mips/bcm947xx/include/hndmips.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/hndmips.h     2006-03-21 09:31:00.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
@@ -7097,7 +7162,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/hndmips.h linux-2.6.16-owrt/ar
 + *
 + * 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
@@ -7107,9 +7172,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/hndmips.h linux-2.6.16-owrt/ar
 + */
 +
 +#include "sbmips.h"
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/linux_osl.h
---- linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h        1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/linux_osl.h   2006-03-21 09:31:00.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
@@ -7140,7 +7205,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.16-owrt/
 +#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
 +
@@ -7214,7 +7279,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.16-owrt/
 +
 +/* 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)) : \
@@ -7315,7 +7380,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.16-owrt/
 +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
@@ -7442,9 +7507,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.16-owrt/
 +#define       PKTBUFSZ        2048
 +
 +#endif        /* _linux_osl_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/linuxver.h
---- linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/linuxver.h    2006-03-21 09:31:00.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.
@@ -7452,19 +7517,19 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/a
 + *
 + * 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))
@@ -7485,8 +7550,8 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/a
 +#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
 +
@@ -7779,7 +7844,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/a
 +      return 0;
 +}
 +
-+static inline int 
++static inline int
 +pci_restore_state(struct pci_dev *dev, u32 *buffer)
 +{
 +      int i;
@@ -7793,7 +7858,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/a
 +       * 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,
@@ -7835,9 +7900,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/a
 +#endif
 +
 +#endif /* _linuxver_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/mipsinc.h
---- linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/mipsinc.h     2006-03-21 09:31:00.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.
@@ -7901,7 +7966,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.16-owrt/ar
 +
 +
 +/*
-+ * CP0 Registers 
++ * CP0 Registers
 + */
 +
 +#define C0_INX                $0
@@ -7972,7 +8037,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.16-owrt/ar
 +
 +
 +/*
-+ * CP0 Registers 
++ * CP0 Registers
 + */
 +
 +#define C0_INX                0               /* CP0: TLB Index */
@@ -8266,7 +8331,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.16-owrt/ar
 +#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).
@@ -8391,9 +8456,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.16-owrt/ar
 +#endif /* !_LANGUAGE_ASSEMBLY */
 +
 +#endif        /* _MISPINC_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/osl.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/osl.h
---- linux-2.6.16/arch/mips/bcm947xx/include/osl.h      1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/osl.h 2006-03-21 09:31:00.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
@@ -8437,9 +8502,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/osl.h linux-2.6.16-owrt/arch/m
 +#define       MAXPRIO         7       /* 0-7 */
 +
 +#endif        /* _osl_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/pcicfg.h
---- linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/pcicfg.h      2006-03-21 09:31:00.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.
@@ -8781,7 +8846,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.16-owrt/arc
 +#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;
@@ -8796,7 +8861,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.16-owrt/arc
 +      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;
@@ -8839,9 +8904,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.16-owrt/arc
 +#define PCI_CFG_CMD_STAT_TA   0x08000000      /* target abort status */
 +
 +#endif
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/proto/ethernet.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/proto/ethernet.h
---- linux-2.6.16/arch/mips/bcm947xx/include/proto/ethernet.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/proto/ethernet.h      2006-03-21 09:31:00.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$
@@ -8988,9 +9053,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/proto/ethernet.h linux-2.6.16-
 +#undef PACKED
 +
 +#endif /* _NET_ETHERNET_H_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/s5.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/s5.h
---- linux-2.6.16/arch/mips/bcm947xx/include/s5.h       1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/s5.h  2006-03-21 09:31:00.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_
@@ -9007,7 +9072,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/s5.h linux-2.6.16-owrt/arch/mi
 + *   LICENSE.
 + *
 + *   $Id: s5.h,v 1.3 2003/06/10 18:54:51 jfd Exp $
-+ * 
++ *
 + */
 +
 +/* BCM5365 Address map */
@@ -9095,9 +9160,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/s5.h linux-2.6.16-owrt/arch/mi
 +
 +
 +#endif /*!_S5_H_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbchipc.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbchipc.h     2006-03-21 09:31:00.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.
@@ -9109,7 +9174,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.16-owrt/ar
 + * $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
@@ -9355,7 +9420,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.16-owrt/ar
 +#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 */
@@ -9539,9 +9604,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.16-owrt/ar
 +#define       OTP_MAGIC       0x4e56
 +
 +#endif        /* _SBCHIPC_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbconfig.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbconfig.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbconfig.h    2006-03-21 09:31:00.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.
@@ -9885,9 +9950,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbconfig.h linux-2.6.16-owrt/a
 +#define BISZ_SIZE             7               /* descriptor size in 32-bit intergers */
 +
 +#endif        /* _SBCONFIG_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbextif.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbextif.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbextif.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbextif.h     2006-03-21 09:31:00.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
@@ -9903,13 +9968,13 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbextif.h linux-2.6.16-owrt/ar
 + * 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$
 + */
 +
@@ -10131,9 +10196,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbextif.h linux-2.6.16-owrt/ar
 +#define       CC_CLOCK_BASE   24000000        /* Half the clock freq. in the 4710 */
 +
 +#endif        /* _SBEXTIF_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmemc.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmemc.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbmemc.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmemc.h      2006-03-21 09:31:00.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.
@@ -10283,10 +10348,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmemc.h linux-2.6.16-owrt/arc
 +#define MEMC_CONFIG_DDR               0x00000001
 +
 +#endif        /* _SBMEMC_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmips.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmips.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbmips.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmips.h      2006-03-21 09:31:00.000000000 +0100
-@@ -0,0 +1,62 @@
+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
 + *
@@ -10298,7 +10363,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmips.h linux-2.6.16-owrt/arc
 + *
 + * 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
@@ -10344,14 +10409,15 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmips.h linux-2.6.16-owrt/arc
 +extern bool BCMINIT(sb_mips_setclock)(sb_t *sbh, uint32 mipsclock, uint32 sbclock, uint32 pciclock);
 +extern void BCMINIT(enable_pfc)(uint32 mode);
 +extern uint32 BCMINIT(sb_memc_get_ncdl)(sb_t *sbh);
++extern uint32 BCMINIT(sb_cpu_clock)(sb_t *sbh);
 +
 +
 +#endif /* _LANGUAGE_ASSEMBLY */
 +
 +#endif        /* _SBMIPS_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbpci.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbpci.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbpci.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbpci.h       2006-03-21 09:31:00.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.
@@ -10406,7 +10472,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbpci.h linux-2.6.16-owrt/arch
 +#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 */
@@ -10475,9 +10541,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbpci.h linux-2.6.16-owrt/arch
 +#endif /* !_LANGUAGE_ASSEMBLY */
 +
 +#endif        /* _SBPCI_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbsdram.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbsdram.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbsdram.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbsdram.h     2006-03-21 09:31:00.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.
@@ -10554,9 +10620,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbsdram.h linux-2.6.16-owrt/ar
 +#define MEM8MX16X2    0xc29   /* 32 MB */
 +
 +#endif        /* _SBSDRAM_H */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbutils.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbutils.h     2006-03-21 09:31:00.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
@@ -10564,7 +10630,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h linux-2.6.16-owrt/ar
 + *
 + * 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
@@ -10576,9 +10642,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h linux-2.6.16-owrt/ar
 +#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()
 +*/
 +
@@ -10664,7 +10730,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h linux-2.6.16-owrt/ar
 +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);
 +
@@ -10694,9 +10760,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h linux-2.6.16-owrt/ar
 +#define SB_DEVPATH_BUFSZ      16      /* min buffer size in bytes */
 +
 +#endif        /* _sbutils_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sflash.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sflash.h
---- linux-2.6.16/arch/mips/bcm947xx/include/sflash.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sflash.h      2006-03-21 09:31:00.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
@@ -10734,9 +10800,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sflash.h linux-2.6.16-owrt/arc
 +extern struct sflash * sflash_init(chipcregs_t *cc);
 +
 +#endif /* _sflash_h_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/trxhdr.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/trxhdr.h
---- linux-2.6.16/arch/mips/bcm947xx/include/trxhdr.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/trxhdr.h      2006-03-21 09:31:00.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.
@@ -10771,10 +10837,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/trxhdr.h linux-2.6.16-owrt/arc
 +
 +/* Compatibility */
 +typedef struct trx_header TRXHDR, *PTRXHDR;
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/typedefs.h
---- linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/typedefs.h    2006-03-21 09:31:00.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.      
@@ -10906,7 +10972,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h linux-2.6.16-owrt/a
 +
 +#else
 +
-+#include <sys/types.h>        
++#include <sys/types.h>
 +
 +#endif
 +
@@ -10930,10 +10996,6 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h linux-2.6.16-owrt/a
 +#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
@@ -11043,14 +11105,14 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h linux-2.6.16-owrt/a
 +/* 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
@@ -11101,62 +11163,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h linux-2.6.16-owrt/a
 +#endif /* USE_TYPEDEF_DEFAULTS */
 +
 +#endif /* _TYPEDEFS_H_ */
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/int-handler.S linux-2.6.16-owrt/arch/mips/bcm947xx/int-handler.S
---- linux-2.6.16/arch/mips/bcm947xx/int-handler.S      1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/int-handler.S 2006-03-21 09:31:00.000000000 +0100
-@@ -0,0 +1,48 @@
-+/*
-+ *  Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
-+ *
-+ *  This program is free software; you can redistribute  it and/or modify it
-+ *  under  the terms of  the GNU General  Public License as published by the
-+ *  Free Software Foundation;  either version 2 of the  License, or (at your
-+ *  option) any later version.
-+ *
-+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
-+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
-+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
-+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
-+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
-+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
-+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ *
-+ *  You should have received a copy of the  GNU General Public License along
-+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
-+ *  675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+#include <asm/asm.h>
-+#include <asm/mipsregs.h>
-+#include <asm/regdef.h>
-+#include <asm/stackframe.h>
-+
-+      .text
-+      .set    noreorder
-+      .set    noat
-+      .align  5
-+
-+      NESTED(bcm47xx_irq_handler, PT_SIZE, sp)
-+      SAVE_ALL
-+      CLI
-+
-+      .set    at
-+      .set    noreorder
-+
-+      jal     bcm47xx_irq_dispatch
-+      move    a0, sp
-+
-+      j       ret_from_irq
-+      nop
-+              
-+      END(bcm47xx_irq_handler)
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/irq.c linux-2.6.16-owrt/arch/mips/bcm947xx/irq.c
---- linux-2.6.16/arch/mips/bcm947xx/irq.c      1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/irq.c 2006-03-21 09:31:00.000000000 +0100
-@@ -0,0 +1,67 @@
+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)
 + *
@@ -11181,7 +11191,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/irq.c linux-2.6.16-owrt/arch/mips/bcm9
 + *  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>
@@ -11195,9 +11205,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/irq.c linux-2.6.16-owrt/arch/mips/bcm9
 +#include <asm/irq.h>
 +#include <asm/irq_cpu.h>
 +
-+extern asmlinkage void bcm47xx_irq_handler(void);
-+
-+void bcm47xx_irq_dispatch(struct pt_regs *regs)
++void plat_irq_dispatch(struct pt_regs *regs)
 +{
 +      u32 cause;
 +
@@ -11206,38 +11214,37 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/irq.c linux-2.6.16-owrt/arch/mips/bcm9
 +      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)
 +{
-+      set_except_vector(0, bcm47xx_irq_handler);
 +      mips_cpu_irq_init(0);
 +}
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/Makefile linux-2.6.16-owrt/arch/mips/bcm947xx/Makefile
---- linux-2.6.16/arch/mips/bcm947xx/Makefile   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/Makefile      2006-03-21 09:31:00.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
 +# under Linux.
 +#
 +
-+obj-y := irq.o int-handler.o prom.o setup.o time.o pci.o
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm947xx/pci.c
---- linux-2.6.16/arch/mips/bcm947xx/pci.c      1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/pci.c 2006-03-21 09:31:00.000000000 +0100
-@@ -0,0 +1,215 @@
++obj-y := irq.o prom.o setup.o time.o pci.o
+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>
 +#include <linux/pci.h>
@@ -11265,7 +11272,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +{
 +      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);
@@ -11279,7 +11286,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +{
 +      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);
@@ -11323,7 +11330,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +static struct resource ext_pci_io_resource = {
 +      .name   = "Ext PCI I/O resources",
 +      .start  = 0x100,
-+      .end    = 0x1FF,
++      .end    = 0x7FF,
 +      .flags  = IORESOURCE_IO,
 +};
 +
@@ -11337,7 +11344,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +void bcm47xx_pci_init(void)
 +{
 +      unsigned long flags;
-+      
++
 +      spin_lock_irqsave(&sbh_lock, flags);
 +      sbpci_init(sbh);
 +      spin_unlock_irqrestore(&sbh_lock, flags);
@@ -11350,11 +11357,23 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +
 +int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 +{
++      unsigned long flags;
 +      u8 irq;
-+      
-+      if (dev->bus->number == 1)
-+              return 2;
++      uint idx;
++
++      /* external: use the irq of the pci core */
++      if (dev->bus->number >= 1) {
++              spin_lock_irqsave(&sbh_lock, flags);
++              idx = sb_coreidx(sbh);
++              sb_setcore(sbh, SB_PCI, 0);
++              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;
 +}
@@ -11370,7 +11389,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +
 +      if (d->bus->number == 0)
 +              return;
-+      
++
 +      printk("PCI: Fixing up device %s\n", pci_name(d));
 +
 +      /* Fix up resource bases */
@@ -11401,13 +11420,13 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +{
 +      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);
 +}
@@ -11417,7 +11436,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +{
 +      uint coreidx;
 +      unsigned long flags;
-+      
++
 +      bcm47xx_fixup_device(dev);
 +
 +      /* These cores come out of reset enabled */
@@ -11432,7 +11451,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +      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
@@ -11453,9 +11472,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9
 +}
 +
 +DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, bcm47xx_fixup_bridge);
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/prom.c linux-2.6.16-owrt/arch/mips/bcm947xx/prom.c
---- linux-2.6.16/arch/mips/bcm947xx/prom.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/prom.c        2006-03-21 09:31:00.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)
@@ -11504,7 +11523,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/prom.c linux-2.6.16-owrt/arch/mips/bcm
 +
 +      /* 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;
 +      }
@@ -11516,10 +11535,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/prom.c linux-2.6.16-owrt/arch/mips/bcm
 +{
 +      return 0;
 +}
-diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bcm947xx/setup.c
---- linux-2.6.16/arch/mips/bcm947xx/setup.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/setup.c       2006-03-21 09:31:00.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>
@@ -11569,7 +11588,6 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bc
 +
 +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;
@@ -11604,7 +11622,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bc
 +      uint baud_base;
 +      uint reg_shift;
 +      struct uart_port s;
-+      
++
 +      regs = port->regs;
 +      irq = port->irq;
 +      baud_base = port->baud_base;
@@ -11616,7 +11634,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bc
 +      s.membase = regs;
 +      s.irq = irq + 2;
 +      s.uartclk = baud_base;
-+      s.flags = ASYNC_BOOT_AUTOCONF;
++      s.flags = ASYNC_BOOT_AUTOCONF | UPF_SHARE_IRQ;
 +      s.iotype = SERIAL_IO_MEM;
 +      s.regshift = reg_shift;
 +
@@ -11628,7 +11646,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bc
 +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);
@@ -11643,11 +11661,11 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bc
 +      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);
 +
@@ -11672,16 +11690,15 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bc
 +      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 -Nur linux-2.6.16/arch/mips/bcm947xx/time.c linux-2.6.16-owrt/arch/mips/bcm947xx/time.c
---- linux-2.6.16/arch/mips/bcm947xx/time.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/bcm947xx/time.c        2006-03-21 09:31:00.000000000 +0100
-@@ -0,0 +1,59 @@
+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)
 + *
@@ -11706,7 +11723,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/time.c linux-2.6.16-owrt/arch/mips/bcm
 + *  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>
@@ -11715,6 +11732,12 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/time.c linux-2.6.16-owrt/arch/mips/bcm
 +#include <asm/addrspace.h>
 +#include <asm/io.h>
 +#include <asm/time.h>
++#include <typedefs.h>
++#include <osl.h>
++#include <sbutils.h>
++#include <sbmips.h>
++
++extern sb_t *sbh;
 +
 +void __init
 +bcm47xx_time_init(void)
@@ -11728,7 +11751,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/time.c linux-2.6.16-owrt/arch/mips/bcm
 +      write_c0_count(0);
 +      write_c0_compare(0xffff);
 +
-+      hz = 200 * 1000 * 1000;
++      hz = sb_cpu_clock(sbh);
 +
 +      /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */
 +      mips_hpt_frequency = hz / 2;
@@ -11736,15 +11759,15 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/time.c linux-2.6.16-owrt/arch/mips/bcm
 +}
 +
 +void __init
-+bcm47xx_timer_setup(struct irqaction *irq)
++plat_timer_setup(struct irqaction *irq)
 +{
 +      /* Enable the timer interrupt */
 +      setup_irq(7, irq);
 +}
-diff -Nur linux-2.6.16/arch/mips/Kconfig linux-2.6.16-owrt/arch/mips/Kconfig
---- linux-2.6.16/arch/mips/Kconfig     2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/Kconfig        2006-03-21 09:31:00.000000000 +0100
-@@ -244,6 +244,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.
  
@@ -11760,12 +11783,12 @@ diff -Nur linux-2.6.16/arch/mips/Kconfig linux-2.6.16-owrt/arch/mips/Kconfig
 +       Support for BCM947xx based boards
 +
  config LASAT
-       bool "Support for LASAT Networks platforms"
+       bool "LASAT Networks platforms"
        select DMA_NONCOHERENT
-diff -Nur linux-2.6.16/arch/mips/kernel/cpu-probe.c linux-2.6.16-owrt/arch/mips/kernel/cpu-probe.c
---- linux-2.6.16/arch/mips/kernel/cpu-probe.c  2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/kernel/cpu-probe.c     2006-03-21 09:32:48.000000000 +0100
-@@ -678,6 +678,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 @@
  }
  
  
@@ -11794,7 +11817,7 @@ diff -Nur linux-2.6.16/arch/mips/kernel/cpu-probe.c linux-2.6.16-owrt/arch/mips/
  __init void cpu_probe(void)
  {
        struct cpuinfo_mips *c = &current_cpu_data;
-@@ -700,6 +722,9 @@
+@@ -745,6 +767,9 @@
        case PRID_COMP_SIBYTE:
                cpu_probe_sibyte(c);
                break;
@@ -11804,12 +11827,12 @@ diff -Nur linux-2.6.16/arch/mips/kernel/cpu-probe.c linux-2.6.16-owrt/arch/mips/
        case PRID_COMP_SANDCRAFT:
                cpu_probe_sandcraft(c);
                break;
-diff -Nur linux-2.6.16/arch/mips/kernel/head.S linux-2.6.16-owrt/arch/mips/kernel/head.S
---- linux-2.6.16/arch/mips/kernel/head.S       2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/kernel/head.S  2006-03-21 09:31:00.000000000 +0100
-@@ -107,6 +107,11 @@
- #endif
-       .endm
+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
  
 +#ifdef CONFIG_BCM4710
 +#undef eret
@@ -11819,10 +11842,10 @@ diff -Nur linux-2.6.16/arch/mips/kernel/head.S linux-2.6.16-owrt/arch/mips/kerne
        /*
         * Reserved space for exception handlers.
         * Necessary for machines which link their kernels at KSEG0.
-diff -Nur linux-2.6.16/arch/mips/kernel/proc.c linux-2.6.16-owrt/arch/mips/kernel/proc.c
---- linux-2.6.16/arch/mips/kernel/proc.c       2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/kernel/proc.c  2006-03-21 09:31:00.000000000 +0100
-@@ -82,6 +82,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",
@@ -11831,10 +11854,10 @@ diff -Nur linux-2.6.16/arch/mips/kernel/proc.c linux-2.6.16-owrt/arch/mips/kerne
        [CPU_PR4450]    = "Philips PR4450",
  };
  
-diff -Nur linux-2.6.16/arch/mips/Makefile linux-2.6.16-owrt/arch/mips/Makefile
---- linux-2.6.16/arch/mips/Makefile    2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/Makefile       2006-03-21 09:31:00.000000000 +0100
-@@ -710,6 +710,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
  
  #
@@ -11848,10 +11871,10 @@ diff -Nur linux-2.6.16/arch/mips/Makefile linux-2.6.16-owrt/arch/mips/Makefile
  # SNI RM200 PCI
  #
  core-$(CONFIG_SNI_RM200_PCI)  += arch/mips/sni/
-diff -Nur linux-2.6.16/arch/mips/mm/tlbex.c linux-2.6.16-owrt/arch/mips/mm/tlbex.c
---- linux-2.6.16/arch/mips/mm/tlbex.c  2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/arch/mips/mm/tlbex.c     2006-03-21 09:31:00.000000000 +0100
-@@ -858,6 +858,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:
@@ -11860,12 +11883,12 @@ diff -Nur linux-2.6.16/arch/mips/mm/tlbex.c linux-2.6.16-owrt/arch/mips/mm/tlbex
                tlbw(p);
                break;
  
-diff -Nur linux-2.6.16/include/asm-mips/bootinfo.h linux-2.6.16-owrt/include/asm-mips/bootinfo.h
---- linux-2.6.16/include/asm-mips/bootinfo.h   2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/include/asm-mips/bootinfo.h      2006-03-21 09:31:00.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
@@ -11876,10 +11899,10 @@ diff -Nur linux-2.6.16/include/asm-mips/bootinfo.h linux-2.6.16-owrt/include/asm
  #define CL_SIZE                       COMMAND_LINE_SIZE
  
  const char *get_system_type(void);
-diff -Nur linux-2.6.16/include/asm-mips/cpu.h linux-2.6.16-owrt/include/asm-mips/cpu.h
---- linux-2.6.16/include/asm-mips/cpu.h        2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/include/asm-mips/cpu.h   2006-03-21 09:31:00.000000000 +0100
-@@ -102,6 +102,13 @@
+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
  
  /*
@@ -11893,37 +11916,36 @@ diff -Nur linux-2.6.16/include/asm-mips/cpu.h linux-2.6.16-owrt/include/asm-mips
   * Definitions for 7:0 on legacy processors
   */
  
-@@ -196,7 +203,9 @@
- #define CPU_34K                       60
- #define CPU_PR4450            61
+@@ -200,7 +207,9 @@
  #define CPU_SB1A              62
--#define CPU_LAST              62
-+#define CPU_BCM3302           63
-+#define CPU_BCM4710           64
-+#define CPU_LAST              64
+ #define CPU_74K                       63
+ #define CPU_R14000            64
+-#define CPU_LAST              64
++#define CPU_BCM3302           65
++#define CPU_BCM4710           66
++#define CPU_LAST              66
  
  /*
   * ISA Level encodings
-diff -Nur linux-2.6.16/include/linux/init.h linux-2.6.16-owrt/include/linux/init.h
---- linux-2.6.16/include/linux/init.h  2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/include/linux/init.h     2006-03-21 09:31:00.000000000 +0100
-@@ -86,6 +86,8 @@
-       static initcall_t __initcall_##fn __attribute_used__ \
-       __attribute__((__section__(".initcall" level ".init"))) = fn
-+#define early_initcall(fn)            __define_initcall(".early1",fn)
-+
- #define core_initcall(fn)             __define_initcall("1",fn)
- #define postcore_initcall(fn)         __define_initcall("2",fn)
- #define arch_initcall(fn)             __define_initcall("3",fn)
-diff -Nur linux-2.6.16/include/linux/pci_ids.h linux-2.6.16-owrt/include/linux/pci_ids.h
---- linux-2.6.16/include/linux/pci_ids.h       2006-03-20 06:53:29.000000000 +0100
-+++ linux-2.6.16-owrt/include/linux/pci_ids.h  2006-03-21 09:31:00.000000000 +0100
-@@ -1885,6 +1885,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-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";
+ static DEFINE_SPINLOCK(sequence_lock);
++EXPORT_SYMBOL(uevent_helper);
+ #if defined(CONFIG_NET)
+ static struct sock *uevent_sock;
+ #endif
This page took 0.12535 seconds and 4 git commands to generate.