summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 16:27:37 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 16:27:37 +0000
commit17c7b6c3fdc48301e50d22cc6138ede16bd1be24 (patch)
treea5d41b991a151e72663527a96fbc6c494565d65c /target/linux/brcm63xx/patches
parent5389989abaa52926b22f9f030d1481df1e73d745 (diff)
strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX_<ver>_<board> becomes CONFIG_TARGET_<board>, same for profiles.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8653 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches')
-rw-r--r--target/linux/brcm63xx/patches/001-bcm963xx.patch222
-rw-r--r--target/linux/brcm63xx/patches/002-bcm963xx_serial.patch8
-rw-r--r--target/linux/brcm63xx/patches/040-bcm963xx_flashmap.patch63
-rw-r--r--target/linux/brcm63xx/patches/100-atm_hacks.patch186
-rw-r--r--target/linux/brcm63xx/patches/150-sst_flash.patch36
5 files changed, 515 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches/001-bcm963xx.patch b/target/linux/brcm63xx/patches/001-bcm963xx.patch
new file mode 100644
index 000000000..f85ceb9c8
--- /dev/null
+++ b/target/linux/brcm63xx/patches/001-bcm963xx.patch
@@ -0,0 +1,222 @@
+diff -urN linux-2.6.19/arch/mips/Kconfig linux-2.6.19.new/arch/mips/Kconfig
+--- linux-2.6.19/arch/mips/Kconfig 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/arch/mips/Kconfig 2006-12-16 18:46:31.000000000 +0100
+@@ -4,6 +4,10 @@
+ # Horrible source of confusion. Die, die, die ...
+ select EMBEDDED
+
++config CFE
++ bool
++ # Common Firmware Environment
++
+ mainmenu "Linux/MIPS Kernel Configuration"
+
+ menu "Machine selection"
+@@ -15,6 +15,18 @@
+ prompt "System type"
+ default SGI_IP22
+
++config BCM963XX
++ bool "Support for Broadcom BCM963xx SoC"
++ select SYS_SUPPORTS_32BIT_KERNEL
++ select SYS_SUPPORTS_BIG_ENDIAN
++ select SYS_HAS_CPU_MIPS32_R1
++ select HW_HAS_PCI
++ select DMA_NONCOHERENT
++ select IRQ_CPU
++ select CFE
++ help
++ This is a fmaily of boards based on the Broadcom MIPS32
++
+ config MACH_ALCHEMY
+ bool "Alchemy processor based machines"
+
+diff -urN linux-2.6.19/arch/mips/Makefile linux-2.6.19.new/arch/mips/Makefile
+--- linux-2.6.19/arch/mips/Makefile 2006-12-16 17:36:29.000000000 +0100
++++ linux-2.6.19.new/arch/mips/Makefile 2006-12-16 18:46:31.000000000 +0100
+@@ -158,6 +158,19 @@
+ #
+
+ #
++# Broadcom BCM963xx SoC
++#
++core-$(CONFIG_BCM963XX) += arch/mips/bcm963xx/
++cflags-$(CONFIG_BCM963XX) += -Iinclude/asm-mips/mach-bcm963xx
++load-$(CONFIG_BCM963XX) += 0xffffffff80010000
++
++
++#
++# Common Firmware Environment
++#
++core-$(CONFIG_CFE) += arch/mips/cfe/
++
++#
+ # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
+ #
+ core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
+diff -urN linux-2.6.19/arch/mips/kernel/cpu-probe.c linux-2.6.19.new/arch/mips/kernel/cpu-probe.c
+--- linux-2.6.19/arch/mips/kernel/cpu-probe.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/arch/mips/kernel/cpu-probe.c 2006-12-16 18:46:31.000000000 +0100
+@@ -590,6 +590,28 @@
+ return;
+ }
+
++static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
++{
++ decode_configs(c);
++ switch (c->processor_id & 0xff00) {
++ case PRID_IMP_BCM6338:
++ c->cputype = CPU_BCM6338;
++ break;
++ case PRID_IMP_BCM6345:
++ c->cputype = CPU_BCM6345;
++ break;
++ case PRID_IMP_BCM6348:
++ c->cputype = CPU_BCM6348;
++ break;
++ case PRID_IMP_BCM6358:
++ c->cputype = CPU_BCM6358;
++ break;
++ default:
++ c->cputype = CPU_UNKNOWN;
++ break;
++ }
++}
++
+ static inline void cpu_probe_mips(struct cpuinfo_mips *c)
+ {
+ decode_configs(c);
+@@ -724,6 +743,9 @@
+ case PRID_COMP_LEGACY:
+ cpu_probe_legacy(c);
+ break;
++ case PRID_COMP_BROADCOM:
++ cpu_probe_broadcom(c);
++ break;
+ case PRID_COMP_MIPS:
+ cpu_probe_mips(c);
+ break;
+diff -urN linux-2.6.19/arch/mips/kernel/proc.c linux-2.6.19.new/arch/mips/kernel/proc.c
+--- linux-2.6.19/arch/mips/kernel/proc.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/arch/mips/kernel/proc.c 2006-12-16 18:46:31.000000000 +0100
+@@ -84,6 +84,10 @@
+ [CPU_VR4181A] = "NEC VR4181A",
+ [CPU_SR71000] = "Sandcraft SR71000",
+ [CPU_PR4450] = "Philips PR4450",
++ [CPU_BCM6338] = "BCM6338",
++ [CPU_BCM6345] = "BCM6345",
++ [CPU_BCM6348] = "BCM6348",
++ [CPU_BCM6358] = "BCM6358",
+ };
+
+
+diff -urN linux-2.6.19/arch/mips/mm/c-r4k.c linux-2.6.19.new/arch/mips/mm/c-r4k.c
+--- linux-2.6.19/arch/mips/mm/c-r4k.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/arch/mips/mm/c-r4k.c 2006-12-16 18:46:31.000000000 +0100
+@@ -852,6 +852,13 @@
+ if (!(config & MIPS_CONF_M))
+ panic("Don't know how to probe P-caches on this cpu.");
+
++ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348 || c->cputype == CPU_BCM6358)
++ {
++ printk("bcm963xx: enabling icache and dcache...\n");
++ /* Enable caches */
++ write_c0_diag(read_c0_diag() | 0xC0000000);
++ }
++
+ /*
+ * So we seem to be a MIPS32 or MIPS64 CPU
+ * So let's probe the I-cache ...
+diff -urN linux-2.6.19/arch/mips/mm/tlbex.c linux-2.6.19.new/arch/mips/mm/tlbex.c
+--- linux-2.6.19/arch/mips/mm/tlbex.c 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/arch/mips/mm/tlbex.c 2006-12-16 18:46:31.000000000 +0100
+@@ -892,6 +892,10 @@
+ case CPU_4KSC:
+ case CPU_20KC:
+ case CPU_25KF:
++ case CPU_BCM6338:
++ case CPU_BCM6345:
++ case CPU_BCM6348:
++ case CPU_BCM6358:
+ tlbw(p);
+ break;
+
+diff -urN linux-2.6.19/arch/mips/pci/Makefile linux-2.6.19.new/arch/mips/pci/Makefile
+--- linux-2.6.19/arch/mips/pci/Makefile 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/arch/mips/pci/Makefile 2006-12-16 18:48:18.000000000 +0100
+@@ -16,6 +16,7 @@
+ obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o
+ obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o
+ obj-$(CONFIG_MARKEINS) += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
++obj-$(CONFIG_BCM963XX) += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o
+
+ #
+ # These are still pretty much in the old state, watch, go blind.
+diff -urN linux-2.6.19/include/asm-mips/bootinfo.h linux-2.6.19.new/include/asm-mips/bootinfo.h
+--- linux-2.6.19/include/asm-mips/bootinfo.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/include/asm-mips/bootinfo.h 2006-12-16 18:46:31.000000000 +0100
+@@ -213,6 +213,15 @@
+ #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */
+ #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */
+
++/*
++ * Valid machtype for group BRCM
++ */
++#define MACH_GROUP_BRCM 23 /* Broadcom boards */
++#define MACH_BCM96338 0
++#define MACH_BCM96345 1
++#define MACH_BCM96348 2
++#define MACH_BCM96358 3
++
+ #define CL_SIZE COMMAND_LINE_SIZE
+
+ const char *get_system_type(void);
+diff -urN linux-2.6.19/include/asm-mips/cpu.h linux-2.6.19.new/include/asm-mips/cpu.h
+--- linux-2.6.19/include/asm-mips/cpu.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/include/asm-mips/cpu.h 2006-12-16 18:46:31.000000000 +0100
+@@ -103,6 +103,14 @@
+
+ #define PRID_IMP_SR71000 0x0400
+
++/* These are the PRID's for when 23:16 == PRID_COMP_BROADCOM
++ */
++
++#define PRID_IMP_BCM6338 0x9000
++#define PRID_IMP_BCM6345 0x8000
++#define PRID_IMP_BCM6348 0x9100
++#define PRID_IMP_BCM6358 0xA000
++
+ /*
+ * Definitions for 7:0 on legacy processors
+ */
+@@ -200,7 +207,11 @@
+ #define CPU_SB1A 62
+ #define CPU_74K 63
+ #define CPU_R14000 64
+-#define CPU_LAST 64
++#define CPU_BCM6338 65
++#define CPU_BCM6345 66
++#define CPU_BCM6348 67
++#define CPU_BCM6358 68
++#define CPU_LAST 68
+
+ /*
+ * ISA Level encodings
+diff -urN linux-2.6.19/include/asm-mips/module.h linux-2.6.19.new/include/asm-mips/module.h
+--- linux-2.6.19/include/asm-mips/module.h 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/include/asm-mips/module.h 2006-12-16 19:03:22.000000000 +0100
+@@ -112,6 +112,14 @@
+ #define MODULE_PROC_FAMILY "RM9000 "
+ #elif defined CONFIG_CPU_SB1
+ #define MODULE_PROC_FAMILY "SB1 "
++#elif defined CONFIG_CPU_BCM6338
++#define MODULE_PROC_FAMILY "BCM6338 "
++#elif defined CONFIG_CPU_BCM6345
++#define MODULE_PROC_FAMILY "BCM6345 "
++#elif defined CONFIG_CPU_BCM6348
++#define MODULE_PROC_FAMILY "BCM6348 "
++#elif defined CONFIG_CPU_BCM6358
++#define MODULE_PROC_FAMILY "BCM6358 "
+ #else
+ #error MODULE_PROC_FAMILY undefined for your processor configuration
+ #endif
diff --git a/target/linux/brcm63xx/patches/002-bcm963xx_serial.patch b/target/linux/brcm63xx/patches/002-bcm963xx_serial.patch
new file mode 100644
index 000000000..69dadf038
--- /dev/null
+++ b/target/linux/brcm63xx/patches/002-bcm963xx_serial.patch
@@ -0,0 +1,8 @@
+diff -urN linux-2.6.21.1/drivers/serial/Makefile linux-2.6.21.1.new/drivers/serial/Makefile
+--- linux-2.6.21.1/drivers/serial/Makefile 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21.1.new/drivers/serial/Makefile 2007-05-30 20:32:27.000000000 +0200
+@@ -62,3 +62,4 @@
+ obj-$(CONFIG_SERIAL_NETX) += netx-serial.o
+ obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o
+ obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o
++obj-$(CONFIG_BCM963XX) += bcm63xx_cons.o
diff --git a/target/linux/brcm63xx/patches/040-bcm963xx_flashmap.patch b/target/linux/brcm63xx/patches/040-bcm963xx_flashmap.patch
new file mode 100644
index 000000000..08c91bea1
--- /dev/null
+++ b/target/linux/brcm63xx/patches/040-bcm963xx_flashmap.patch
@@ -0,0 +1,63 @@
+diff -urN linux-2.6.19/drivers/mtd/maps/Kconfig linux-2.6.19.new/drivers/mtd/maps/Kconfig
+--- linux-2.6.19/drivers/mtd/maps/Kconfig 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/drivers/mtd/maps/Kconfig 2006-12-18 17:21:07.000000000 +0100
+@@ -283,6 +283,13 @@
+ Flash memory access on 4G Systems MTX-1 Board. If you have one of
+ these boards and would like to use the flash chips on it, say 'Y'.
+
++config MTD_BCM963XX
++ tristate "BCM963xx Flash device"
++ depends on MIPS && BCM963XX
++ help
++ Flash memory access on BCM963xx boards. Currently only works with
++ RedBoot and CFE.
++
+ config MTD_DILNETPC
+ tristate "CFI Flash device mapped on DIL/Net PC"
+ depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT
+diff -urN linux-2.6.19/drivers/mtd/maps/Makefile linux-2.6.19.new/drivers/mtd/maps/Makefile
+--- linux-2.6.19/drivers/mtd/maps/Makefile 2006-11-29 22:57:37.000000000 +0100
++++ linux-2.6.19.new/drivers/mtd/maps/Makefile 2006-12-18 17:21:07.000000000 +0100
+@@ -72,3 +72,4 @@
+ obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o
+ obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o
+ obj-$(CONFIG_MTD_TQM834x) += tqm834x.o
++obj-$(CONFIG_MTD_BCM963XX) += bcm963xx-flash.o
+diff -urN linux-2.6.19/drivers/mtd/redboot.c linux-2.6.19.new/drivers/mtd/redboot.c
+--- linux-2.6.19/drivers/mtd/redboot.c 2006-12-18 17:09:14.000000000 +0100
++++ linux-2.6.19.new/drivers/mtd/redboot.c 2006-12-18 17:14:26.000000000 +0100
+@@ -39,7 +39,7 @@
+ return 1;
+ }
+
+-static int parse_redboot_partitions(struct mtd_info *master,
++int parse_redboot_partitions(struct mtd_info *master,
+ struct mtd_partition **pparts,
+ unsigned long fis_origin)
+ {
+@@ -146,6 +146,14 @@
+ goto out;
+ }
+
++ if (!fis_origin) {
++ for (i = 0; i < numslots; i++) {
++ if (!strncmp(buf[i].name, "RedBoot", 8)) {
++ fis_origin = (buf[i].flash_base & (master->size << 1) - 1);
++ }
++ }
++ }
++
+ for (i = 0; i < numslots; i++) {
+ struct fis_list *new_fl, **prev;
+
+@@ -168,9 +176,8 @@
+ new_fl->img = &buf[i];
+ if (fis_origin) {
+ buf[i].flash_base -= fis_origin;
+- } else {
+- buf[i].flash_base &= master->size-1;
+ }
++ buf[i].flash_base &= (master->size << 1) - 1;
+
+ /* I'm sure the JFFS2 code has done me permanent damage.
+ * I now think the following is _normal_
diff --git a/target/linux/brcm63xx/patches/100-atm_hacks.patch b/target/linux/brcm63xx/patches/100-atm_hacks.patch
new file mode 100644
index 000000000..7535c223e
--- /dev/null
+++ b/target/linux/brcm63xx/patches/100-atm_hacks.patch
@@ -0,0 +1,186 @@
+diff -urN linux-2.6.19.1/include/linux/atm.h linux-2.6.19.1.new/include/linux/atm.h
+--- linux-2.6.19.1/include/linux/atm.h 2006-12-11 20:32:53.000000000 +0100
++++ linux-2.6.19.1.new/include/linux/atm.h 2007-01-07 18:38:50.000000000 +0100
+@@ -48,6 +48,9 @@
+ #define ATM_AAL2 2 /* AAL2 (VBR) */
+ #define ATM_AAL34 3 /* AAL3/4 (data) */
+ #define ATM_AAL5 5 /* AAL5 (data) */
++#if defined(CONFIG_MIPS_BCM963XX)
++#define ATM_BCM_AAL0 14 /* "raw" ATM cells */
++#endif
+
+ /*
+ * socket option name coding functions
+diff -urN linux-2.6.19.1/include/linux/atmbr2684.h linux-2.6.19.1.new/include/linux/atmbr2684.h
+--- linux-2.6.19.1/include/linux/atmbr2684.h 2006-12-11 20:32:53.000000000 +0100
++++ linux-2.6.19.1.new/include/linux/atmbr2684.h 2007-01-07 18:24:01.000000000 +0100
+@@ -78,6 +78,10 @@
+ __u8 vpn_id[7];
+ int send_padding; /* unsupported */
+ int min_size; /* we will pad smaller packets than this */
++#if defined(CONFIG_MIPS_BCM963XX)
++#define FILTER_PPPOE 1
++ int proto_filter; /* protocol filter flag, current only PPPoE */
++#endif
+ };
+
+ /*
+diff -urN linux-2.6.19.1/include/linux/atmdev.h linux-2.6.19.1.new/include/linux/atmdev.h
+--- linux-2.6.19.1/include/linux/atmdev.h 2006-12-11 20:32:53.000000000 +0100
++++ linux-2.6.19.1.new/include/linux/atmdev.h 2007-01-07 18:37:34.000000000 +0100
+@@ -29,6 +29,10 @@
+ #define ATM_DS3_PCR (8000*12)
+ /* DS3: 12 cells in a 125 usec time slot */
+
++#if defined(CONFIG_MIPS_BCM963XX)
++#define atm_sk(__sk) ((struct atm_vcc *)(__sk)->sk_protinfo)
++#define ATM_SD(s) (atm_sk((s)->sk))
++#endif
+
+ #define __AAL_STAT_ITEMS \
+ __HANDLE_ITEM(tx); /* TX okay */ \
+@@ -111,6 +115,9 @@
+ #define ATM_BACKEND_RAW 0
+ #define ATM_BACKEND_PPP 1 /* PPPoATM - RFC2364 */
+ #define ATM_BACKEND_BR2684 2 /* Bridged RFC1483/2684 */
++#if defined(CONFIG_MIPS_BCM963XX)
++#define ATM_BACKEND_RT2684 3 /* Routed RFC1483/2684 */
++#endif
+
+ /* for ATM_GETTYPE */
+ #define ATM_ITFTYP_LEN 8 /* maximum length of interface type name */
+@@ -274,6 +281,9 @@
+
+
+ enum {
++#if defined(CONFIG_MIPS_BCM963XX)
++ ATM_DF_CLOSE, /* close device when last VCC is closed */
++#endif
+ ATM_DF_REMOVED, /* device was removed from atm_devs list */
+ };
+
+@@ -285,8 +295,10 @@
+ #define ATM_ATMOPT_CLP 1 /* set CLP bit */
+
+ struct atm_vcc {
++#if !defined(CONFIG_MIPS_BCM963XX)
+ /* struct sock has to be the first member of atm_vcc */
+ struct sock sk;
++#endif
+ unsigned long flags; /* VCC flags (ATM_VF_*) */
+ short vpi; /* VPI and VCI (types must be equal */
+ /* with sockaddr) */
+@@ -303,6 +315,9 @@
+ void *dev_data; /* per-device data */
+ void *proto_data; /* per-protocol data */
+ struct k_atm_aal_stats *stats; /* pointer to AAL stats group */
++#if defined(CONFIG_MIPS_BCM963XX)
++ struct sock *sk; /* socket backpointer */
++#endif
+ /* SVC part --- may move later ------------------------------------- */
+ short itf; /* interface number */
+ struct sockaddr_atmsvc local;
+@@ -332,7 +347,11 @@
+
+ struct atm_dev_addr {
+ struct sockaddr_atmsvc addr; /* ATM address */
++#if defined(CONFIG_MIPS_BCM963XX)
++ struct atm_dev_addr *next; /* next address */
++#else
+ struct list_head entry; /* next address */
++#endif
+ };
+
+ enum atm_addr_type_t { ATM_ADDR_LOCAL, ATM_ADDR_LECS };
+@@ -346,8 +365,12 @@
+ void *dev_data; /* per-device data */
+ void *phy_data; /* private PHY date */
+ unsigned long flags; /* device flags (ATM_DF_*) */
++#if defined(CONFIG_MIPS_BCM963XX)
++ struct atm_dev_addr *local; /* local ATM addresses */
++#else
+ struct list_head local; /* local ATM addresses */
+ struct list_head lecs; /* LECS ATM addresses learned via ILMI */
++#endif
+ unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */
+ struct atm_cirange ci_range; /* VPI/VCI range */
+ struct k_atm_dev_stats stats; /* statistics */
+@@ -359,7 +382,9 @@
+ struct proc_dir_entry *proc_entry; /* proc entry */
+ char *proc_name; /* proc entry name */
+ #endif
++#if !defined(CONFIG_MIPS_BCM963XX)
+ struct class_device class_dev; /* sysfs class device */
++#endif
+ struct list_head dev_list; /* linkage */
+ };
+
+@@ -416,7 +441,13 @@
+ int number,unsigned long *flags); /* number == -1: pick first available */
+ struct atm_dev *atm_dev_lookup(int number);
+ void atm_dev_deregister(struct atm_dev *dev);
++#if defined(CONFIG_MIPS_BCM963XX)
++void shutdown_atm_dev(struct atm_dev *dev);
++#endif
+ void vcc_insert_socket(struct sock *sk);
++#if defined(CONFIG_MIPS_BCM963XX)
++void vcc_remove_socket(struct sock *sk);
++#endif
+
+
+ /*
+@@ -432,20 +463,33 @@
+
+ static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
+ {
++#if defined(CONFIG_MIPS_BCM963XX)
++ atomic_add(truesize, &vcc->sk->sk_rmem_alloc);
++#else
+ atomic_add(truesize, &sk_atm(vcc)->sk_rmem_alloc);
++#endif
+ }
+
+
+ static inline void atm_return(struct atm_vcc *vcc,int truesize)
+ {
++#if defined(CONFIG_MIPS_BCM963XX)
++ atomic_sub(truesize, &vcc->sk->sk_rmem_alloc);
++#else
+ atomic_sub(truesize, &sk_atm(vcc)->sk_rmem_alloc);
++#endif
+ }
+
+
+ static inline int atm_may_send(struct atm_vcc *vcc,unsigned int size)
+ {
++#if defined(CONFIG_MIPS_BCM963XX)
++ return (size + atomic_read(&vcc->sk->sk_wmem_alloc)) <
++ vcc->sk->sk_sndbuf;
++#else
+ return (size + atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) <
+ sk_atm(vcc)->sk_sndbuf;
++#endif
+ }
+
+
+@@ -457,12 +501,20 @@
+
+ static inline void atm_dev_put(struct atm_dev *dev)
+ {
++#if defined(CONFIG_MIPS_BCM963XX)
++ atomic_dec(&dev->refcnt);
++
++ if ((atomic_read(&dev->refcnt) == 1) &&
++ test_bit(ATM_DF_CLOSE,&dev->flags))
++ shutdown_atm_dev(dev);
++#else
+ if (atomic_dec_and_test(&dev->refcnt)) {
+ BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags));
+ if (dev->ops->dev_close)
+ dev->ops->dev_close(dev);
+ class_device_put(&dev->class_dev);
+ }
++#endif
+ }
+
+
diff --git a/target/linux/brcm63xx/patches/150-sst_flash.patch b/target/linux/brcm63xx/patches/150-sst_flash.patch
new file mode 100644
index 000000000..ba9fcb9c3
--- /dev/null
+++ b/target/linux/brcm63xx/patches/150-sst_flash.patch
@@ -0,0 +1,36 @@
+diff -urN linux-2.6.19.2/drivers/mtd/chips/jedec_probe.c linux-2.6.19.2.new/drivers/mtd/chips/jedec_probe.c
+--- linux-2.6.19.2/drivers/mtd/chips/jedec_probe.c 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2.new/drivers/mtd/chips/jedec_probe.c 2007-04-09 22:33:05.000000000 +0200
+@@ -158,6 +158,7 @@
+ #define SST49LF030A 0x001C
+ #define SST49LF040A 0x0051
+ #define SST49LF080A 0x005B
++#define SST39VF6402B 0x236C
+
+ /* Toshiba */
+ #define TC58FVT160 0x00C2
+@@ -1494,7 +1495,23 @@
+ ERASEINFO(0x1000,256),
+ ERASEINFO(0x1000,256)
+ }
+-
++ }, {
++ .mfr_id = MANUFACTURER_SST,
++ .dev_id = SST39VF6402B,
++ .name = "SST 39VF6402B",
++ .uaddr = {
++ [0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */
++ [1] = MTD_UADDR_0x5555_0x2AAA /* x16 */
++ },
++ .DevSize = SIZE_8MiB,
++ .CmdSet = P_ID_AMD_STD,
++ .NumEraseRegions= 4,
++ .regions = {
++ ERASEINFO(0x2000,256),
++ ERASEINFO(0x2000,256),
++ ERASEINFO(0x2000,256),
++ ERASEINFO(0x2000,256)
++ }
+ }, {
+ .mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */
+ .dev_id = M29W800DT,