2008-05-19 08:33:22 +00:00
|
|
|
Index: linux-2.6.24.7/drivers/mtd/maps/Kconfig
|
|
|
|
===================================================================
|
|
|
|
--- linux-2.6.24.7.orig/drivers/mtd/maps/Kconfig
|
|
|
|
+++ linux-2.6.24.7/drivers/mtd/maps/Kconfig
|
|
|
|
@@ -269,6 +269,13 @@ config MTD_MTX1
|
2006-12-18 16:33:54 +00:00
|
|
|
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
|
2007-01-05 15:32:41 +00:00
|
|
|
+ RedBoot and CFE.
|
2006-12-18 16:33:54 +00:00
|
|
|
+
|
|
|
|
config MTD_DILNETPC
|
|
|
|
tristate "CFI Flash device mapped on DIL/Net PC"
|
|
|
|
depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT
|
2008-05-19 08:33:22 +00:00
|
|
|
Index: linux-2.6.24.7/drivers/mtd/redboot.c
|
|
|
|
===================================================================
|
|
|
|
--- linux-2.6.24.7.orig/drivers/mtd/redboot.c
|
|
|
|
+++ linux-2.6.24.7/drivers/mtd/redboot.c
|
|
|
|
@@ -39,7 +39,7 @@ static inline int redboot_checksum(struc
|
2006-08-03 14:43:03 +00:00
|
|
|
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)
|
|
|
|
{
|
2008-05-19 08:33:22 +00:00
|
|
|
@@ -146,6 +146,14 @@ static int parse_redboot_partitions(stru
|
2006-08-03 14:43:03 +00:00
|
|
|
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;
|
|
|
|
|
2008-05-19 08:33:22 +00:00
|
|
|
@@ -168,9 +176,8 @@ static int parse_redboot_partitions(stru
|
2006-08-03 14:43:03 +00:00
|
|
|
new_fl->img = &buf[i];
|
2006-12-18 16:30:04 +00:00
|
|
|
if (fis_origin) {
|
|
|
|
buf[i].flash_base -= fis_origin;
|
2006-08-03 14:43:03 +00:00
|
|
|
- } else {
|
|
|
|
- buf[i].flash_base &= master->size-1;
|
2006-12-18 16:30:04 +00:00
|
|
|
}
|
2006-08-03 14:43:03 +00:00
|
|
|
+ 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_
|
2008-05-19 08:33:22 +00:00
|
|
|
Index: linux-2.6.24.7/drivers/mtd/maps/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- linux-2.6.24.7.orig/drivers/mtd/maps/Makefile
|
|
|
|
+++ linux-2.6.24.7/drivers/mtd/maps/Makefile
|
|
|
|
@@ -69,3 +69,4 @@ obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o
|
2008-02-13 17:31:17 +00:00
|
|
|
obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o
|
|
|
|
obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o
|
|
|
|
obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o
|
|
|
|
+obj-$(CONFIG_MTD_BCM963XX) += bcm963xx-flash.o
|