diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-09-06 16:27:37 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-09-06 16:27:37 +0000 |
commit | 92558d67a463bfbb351d30e28648de03b635f024 (patch) | |
tree | a5d41b991a151e72663527a96fbc6c494565d65c /target/linux/pxa/patches/005-mtd.patch | |
parent | e1dbce411cd2a3a067f387cee011cd889486a07d (diff) | |
download | master-187ad058-92558d67a463bfbb351d30e28648de03b635f024.tar.gz master-187ad058-92558d67a463bfbb351d30e28648de03b635f024.tar.bz2 master-187ad058-92558d67a463bfbb351d30e28648de03b635f024.zip |
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/pxa/patches/005-mtd.patch')
-rw-r--r-- | target/linux/pxa/patches/005-mtd.patch | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/target/linux/pxa/patches/005-mtd.patch b/target/linux/pxa/patches/005-mtd.patch new file mode 100644 index 0000000000..6156b6a930 --- /dev/null +++ b/target/linux/pxa/patches/005-mtd.patch @@ -0,0 +1,111 @@ +diff -Nurb linux-2.6.17/drivers/mtd/chips/cfi_cmdset_0001.c linux-2.6.17-patched/drivers/mtd/chips/cfi_cmdset_0001.c +--- linux-2.6.17/drivers/mtd/chips/cfi_cmdset_0001.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-patched/drivers/mtd/chips/cfi_cmdset_0001.c 2006-09-25 11:27:06.000000000 -0700 +@@ -40,7 +40,7 @@ + /* #define CMDSET0001_DISABLE_WRITE_SUSPEND */ + + // debugging, turns off buffer write mode if set to 1 +-#define FORCE_WORD_WRITE 0 ++#define FORCE_WORD_WRITE 1 + + #define MANUFACTURER_INTEL 0x0089 + #define I82802AB 0x00ad +diff -Nurb linux-2.6.17/drivers/mtd/maps/lubbock-flash.c linux-2.6.17-patched/drivers/mtd/maps/lubbock-flash.c +--- linux-2.6.17/drivers/mtd/maps/lubbock-flash.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-patched/drivers/mtd/maps/lubbock-flash.c 2006-09-25 10:50:08.000000000 -0700 +@@ -26,6 +26,7 @@ + #include <asm/hardware.h> + #include <asm/arch/pxa-regs.h> + #include <asm/arch/lubbock.h> ++#include <linux/mtd/concat.h> + + + #define ROM_ADDR 0x00000000 +@@ -48,24 +49,27 @@ + .inval_cache = lubbock_map_inval_cache, + } }; + +-static struct mtd_partition lubbock_partitions[] = { ++static struct mtd_partition lubbock_partitions[] = ++{ + { +- .name = "Bootloader", +- .size = 0x00040000, +- .offset = 0, +- .mask_flags = MTD_WRITEABLE /* force read-only */ +- },{ +- .name = "Kernel", +- .size = 0x00100000, +- .offset = 0x00040000, +- },{ +- .name = "Filesystem", +- .size = MTDPART_SIZ_FULL, +- .offset = 0x00140000 +- } ++ .name = "root", ++ .offset = 0x00410000 ++ }, ++ { ++ .name = "kernel", ++ .size = 0x00150000, ++ .offset = 0x000B0000 ++ }, ++ { ++ .name = "bootloader", ++ .size = 0x000B0000, ++ .offset = 0x00000000 ++ }, + }; + ++ + static struct mtd_info *mymtds[2]; ++static struct mtd_info *merged_mtd; + static struct mtd_partition *parsed_parts[2]; + static int nr_parsed_parts[2]; + +@@ -83,8 +87,8 @@ + printk(KERN_NOTICE "Lubbock configured to boot from %s (bank %d)\n", + flashboot?"Flash":"ROM", flashboot); + +- lubbock_maps[flashboot^1].name = "Lubbock Application Flash"; +- lubbock_maps[flashboot].name = "Lubbock Boot ROM"; ++ lubbock_maps[flashboot^1].name = "Flash-1"; ++ lubbock_maps[flashboot].name = "Flash-0"; + + for (i = 0; i < 2; i++) { + lubbock_maps[i].virt = ioremap(lubbock_maps[i].phys, WINDOW_SIZE); +@@ -125,25 +129,23 @@ + if (!mymtds[0] && !mymtds[1]) + return ret; + +- for (i = 0; i < 2; i++) { +- if (!mymtds[i]) { +- printk(KERN_WARNING "%s is absent. Skipping\n", lubbock_maps[i].name); +- } else if (nr_parsed_parts[i]) { +- add_mtd_partitions(mymtds[i], parsed_parts[i], nr_parsed_parts[i]); +- } else if (!i) { +- printk("Using static partitions on %s\n", lubbock_maps[i].name); +- add_mtd_partitions(mymtds[i], lubbock_partitions, ARRAY_SIZE(lubbock_partitions)); +- } else { +- printk("Registering %s as whole device\n", lubbock_maps[i].name); +- add_mtd_device(mymtds[i]); +- } +- } ++ if (mymtds[0] && mymtds[1]) { ++ merged_mtd = mtd_concat_create(mymtds, 2, "Concated Flash #1 and #2"); ++ if(merged_mtd) ++ add_mtd_partitions(merged_mtd, lubbock_partitions, ARRAY_SIZE(lubbock_partitions)); ++ else ++ printk("YoKu: Failed to concate\n"); + return 0; ++ } + } + + static void __exit cleanup_lubbock(void) + { + int i; ++ ++ del_mtd_partitions(merged_mtd); ++ map_destroy(merged_mtd); ++ + for (i = 0; i < 2; i++) { |