-diff -urN linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.17-brcm63xx/drivers/mtd/maps/bcm963xx-flash.c
---- linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.17-brcm63xx/drivers/mtd/maps/bcm963xx-flash.c 2006-11-06 22:43:59.000000000 +0000
+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
+@@ -224,6 +224,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, CFE support coming soon.
++
+ 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
+@@ -70,3 +70,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/maps/Makefile.orig linux-2.6.19.new/drivers/mtd/maps/Makefile.orig
+--- linux-2.6.19/drivers/mtd/maps/Makefile.orig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19.new/drivers/mtd/maps/Makefile.orig 2006-11-29 22:57:37.000000000 +0100
+@@ -0,0 +1,72 @@
++#
++# linux/drivers/maps/Makefile
++#
++# $Id: Makefile.common,v 1.34 2005/11/07 11:14:26 gleixner Exp $
++
++ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y)
++obj-$(CONFIG_MTD) += map_funcs.o
++endif
++
++# Chip mappings
++obj-$(CONFIG_MTD_CDB89712) += cdb89712.o
++obj-$(CONFIG_MTD_ARM_INTEGRATOR)+= integrator-flash.o
++obj-$(CONFIG_MTD_BAST) += bast-flash.o
++obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o
++obj-$(CONFIG_MTD_CSTM_MIPS_IXX) += cstm_mips_ixx.o
++obj-$(CONFIG_MTD_DC21285) += dc21285.o
++obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o
++obj-$(CONFIG_MTD_L440GX) += l440gx.o
++obj-$(CONFIG_MTD_AMD76XROM) += amd76xrom.o
++obj-$(CONFIG_MTD_ICHXROM) += ichxrom.o
++obj-$(CONFIG_MTD_TSUNAMI) += tsunami_flash.o
++obj-$(CONFIG_MTD_LUBBOCK) += lubbock-flash.o
++obj-$(CONFIG_MTD_MAINSTONE) += mainstone-flash.o
++obj-$(CONFIG_MTD_MBX860) += mbx860.o
++obj-$(CONFIG_MTD_CEIVA) += ceiva.o
++obj-$(CONFIG_MTD_OCTAGON) += octagon-5066.o
++obj-$(CONFIG_MTD_PHYSMAP) += physmap.o
++obj-$(CONFIG_MTD_PNC2000) += pnc2000.o
++obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
++obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o
++obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o
++obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o
++obj-$(CONFIG_MTD_IPAQ) += ipaq-flash.o
++obj-$(CONFIG_MTD_SBC_GXX) += sbc_gxx.o
++obj-$(CONFIG_MTD_SC520CDP) += sc520cdp.o
++obj-$(CONFIG_MTD_NETSC520) += netsc520.o
++obj-$(CONFIG_MTD_TS5500) += ts5500_flash.o
++obj-$(CONFIG_MTD_SUN_UFLASH) += sun_uflash.o
++obj-$(CONFIG_MTD_VMAX) += vmax301.o
++obj-$(CONFIG_MTD_SCx200_DOCFLASH)+= scx200_docflash.o
++obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o
++obj-$(CONFIG_MTD_OCELOT) += ocelot.o
++obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
++obj-$(CONFIG_MTD_PCI) += pci.o
++obj-$(CONFIG_MTD_ALCHEMY) += alchemy-flash.o
++obj-$(CONFIG_MTD_LASAT) += lasat.o
++obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o
++obj-$(CONFIG_MTD_EDB7312) += edb7312.o
++obj-$(CONFIG_MTD_IMPA7) += impa7.o
++obj-$(CONFIG_MTD_FORTUNET) += fortunet.o
++obj-$(CONFIG_MTD_REDWOOD) += redwood.o
++obj-$(CONFIG_MTD_UCLINUX) += uclinux.o
++obj-$(CONFIG_MTD_NETtel) += nettel.o
++obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o
++obj-$(CONFIG_MTD_EBONY) += ebony.o
++obj-$(CONFIG_MTD_OCOTEA) += ocotea.o
++obj-$(CONFIG_MTD_BEECH) += beech-mtd.o
++obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o
++obj-$(CONFIG_MTD_WALNUT) += walnut.o
++obj-$(CONFIG_MTD_H720X) += h720x-flash.o
++obj-$(CONFIG_MTD_SBC8240) += sbc8240.o
++obj-$(CONFIG_MTD_NOR_TOTO) += omap-toto-flash.o
++obj-$(CONFIG_MTD_MPC1211) += mpc1211.o
++obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o
++obj-$(CONFIG_MTD_IXP2000) += ixp2000.o
++obj-$(CONFIG_MTD_WRSBC8260) += wr_sbc82xx_flash.o
++obj-$(CONFIG_MTD_DMV182) += dmv182.o
++obj-$(CONFIG_MTD_SHARP_SL) += sharpsl-flash.o
++obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o
++obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o
++obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o
++obj-$(CONFIG_MTD_TQM834x) += tqm834x.o
+diff -urN linux-2.6.19/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.19.new/drivers/mtd/maps/bcm963xx-flash.c
+--- linux-2.6.19/drivers/mtd/maps/bcm963xx-flash.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.19.new/drivers/mtd/maps/bcm963xx-flash.c 2006-12-18 17:21:07.000000000 +0100
@@ -0,0 +1,276 @@
+/*
+ * $Id$
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
-diff -urN linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-brcm63xx/drivers/mtd/maps/Kconfig
---- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200
-+++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Kconfig 2006-08-30 13:03:06.000000000 +0200
-@@ -224,6 +224,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, CFE support coming soon.
-+
- 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.17/drivers/mtd/maps/Makefile linux-2.6.17-brcm63xx/drivers/mtd/maps/Makefile
---- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200
-+++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Makefile 2006-08-30 13:03:06.000000000 +0200
-@@ -71,3 +71,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.17/drivers/mtd/redboot.c linux-2.6.17-brcm63xx/drivers/mtd/redboot.c
---- linux-2.6.17/drivers/mtd/redboot.c 2006-06-18 03:49:35.000000000 +0200
-+++ linux-2.6.17-brcm63xx/drivers/mtd/redboot.c 2006-08-30 13:03:06.000000000 +0200
+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;
}
struct mtd_partition **pparts,
unsigned long fis_origin)
{
-@@ -120,11 +120,19 @@
+@@ -132,6 +132,14 @@
goto out;
}
for (i = 0; i < numslots; i++) {
struct fis_list *new_fl, **prev;
- if (buf[i].name[0] == 0xff)
-- continue;
-+ break;
- if (!redboot_checksum(&buf[i]))
- break;
-
-@@ -135,11 +143,10 @@
- goto out;
- }
+@@ -154,9 +162,8 @@
new_fl->img = &buf[i];
-- if (fis_origin) {
-- buf[i].flash_base -= fis_origin;
+ if (fis_origin) {
+ buf[i].flash_base -= fis_origin;
- } else {
- buf[i].flash_base &= master->size-1;
-- }
-+ if (fis_origin) {
-+ buf[i].flash_base -= fis_origin;
-+ }
+ }
+ buf[i].flash_base &= (master->size << 1) - 1;
/* I'm sure the JFFS2 code has done me permanent damage.