diff options
| author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-04-10 21:46:29 +0000 | 
|---|---|---|
| committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-04-10 21:46:29 +0000 | 
| commit | 5a834359ace359edaac1ac3d73b3f61bfef78c00 (patch) | |
| tree | 0953091dc5ddee39b2121bed1252fb74383cf595 /target/linux/easygate-2.6/patches/040-bcm963xx_flashmap.patch | |
| parent | 49b4a0fb8b7cdefa708764b682c8b4acdbc8a98f (diff) | |
Ajoute le support easygate
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6926 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/easygate-2.6/patches/040-bcm963xx_flashmap.patch')
| -rw-r--r-- | target/linux/easygate-2.6/patches/040-bcm963xx_flashmap.patch | 63 | 
1 files changed, 63 insertions, 0 deletions
diff --git a/target/linux/easygate-2.6/patches/040-bcm963xx_flashmap.patch b/target/linux/easygate-2.6/patches/040-bcm963xx_flashmap.patch new file mode 100644 index 000000000..82a2c9405 --- /dev/null +++ b/target/linux/easygate-2.6/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 +@@ -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 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 +@@ -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/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) + { +@@ -132,6 +132,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; +  +@@ -154,9 +162,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_  | 
