-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-08-03 16:29:52.000000000 +0200
-@@ -0,0 +1,116 @@
-+/*
-+ * $Id$
-+ * Copyright (C) 2006 Florian Fainelli
-+ * Copyright (C) $Date$ $Author$
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/* This is the BCM963xx flash map driver, in its actual state it only supports BCM96348 devices
-+ * this driver is able to manage both bootloader we found on these boards : CFE and RedBoot
-+ *
-+ * RedBoot :
-+ * - this bootloader allows us to parse partitions and therefore deduce the MTD partition table
-+ *
-+ * CFE :
-+ * - we have to use a "physically mapped flash" defined bellow
-+ *
-+ */
-+
-+#include <asm/io.h>
-+#include <linux/init.h>
-+#include <linux/mtd/map.h>
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
-+
-+#define WINDOW_ADDR 0x1e400000 /* Real address of the flash */
-+#define WINDOW_SIZE 0x800000 /* Size of flash */
-+#define BUSWIDTH 2 /* Buswidth */
-+
-+extern int boot_loader_type; /* For RedBoot / CFE detection */
-+extern int parse_redboot_partitions(struct mtd_info *master, struct mtd_partition **pparts, unsigned long fis_origin);
-+static struct mtd_partition *parsed_parts;
-+
-+static void __exit bcm963xx_mtd_cleanup(void);
-+
-+static struct mtd_info *bcm963xx_mtd_info;
-+
-+static struct map_info bcm963xx_map = {
-+ .name = "bcm963xx",
-+ .size = WINDOW_SIZE,
-+ .bankwidth = BUSWIDTH,
-+ .phys = WINDOW_ADDR,
-+};
-+
-+static struct mtd_partition bcm963xx_parts[] = {
-+ { name: "bootloader", size: 0, offset: 0, mask_flags: MTD_WRITEABLE },
-+ { name: "rootfs", size: 0, offset: 0},
-+ { name: "jffs2", size: 5 * 0x10000, offset: 57*0x10000}
-+};
-+
-+static int __init bcm963xx_mtd_init(void)
-+{
-+ printk("bcm963xx: 0x%08x at 0x%08x\n", WINDOW_SIZE, WINDOW_ADDR);
-+ bcm963xx_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
-+
-+ if (!bcm963xx_map.virt) {
-+ printk("bcm963xx: Failed to ioremap\n");
-+ return -EIO;
-+ }
-+
-+ simple_map_init(&bcm963xx_map);
-+
-+ bcm963xx_mtd_info = do_map_probe("cfi_probe", &bcm963xx_map);
-+
-+ if (bcm963xx_mtd_info) {
-+ bcm963xx_mtd_info->owner = THIS_MODULE;
-+ int parsed_nr_parts = 0;
-+ char * part_type;
-+
-+#ifdef CONFIG_MTD_REDBOOT_PARTS
-+ if (parsed_nr_parts == 0) {
-+ int ret = parse_redboot_partitions(bcm963xx_mtd_info, &parsed_parts, 0);
-+ if (ret > 0) {
-+ part_type = "RedBoot";
-+ parsed_nr_parts = ret;
-+ }
-+ }
-+#endif
-+ add_mtd_partitions(bcm963xx_mtd_info, parsed_parts, parsed_nr_parts);
-+
-+ return 0;
-+ }
-+ iounmap(bcm963xx_map.virt);
-+ return -ENXIO;
-+}
-+
-+static void __exit bcm963xx_mtd_cleanup(void)
-+{
-+ if (bcm963xx_mtd_info) {
-+ del_mtd_partitions(bcm963xx_mtd_info);
-+ map_destroy(bcm963xx_mtd_info);
-+ }
-+
-+ if (bcm963xx_map.virt) {
-+ iounmap(bcm963xx_map.virt);
-+ bcm963xx_map.virt = 0;
-+ }
-+}
-+
-+module_init(bcm963xx_mtd_init);
-+module_exit(bcm963xx_mtd_cleanup);
-+
-+MODULE_LICENSE("GPL");
-+MODULE_AUTHOR("Florian Fainelli");
-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-03 16:32:05.000000000 +0200