1 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
2 --- linux-2.6.17/drivers/mtd/chips/cfi_cmdset_0001.c 2006-06-17 18:49:35.000000000 -0700
3 +++ linux-2.6.17-patched/drivers/mtd/chips/cfi_cmdset_0001.c 2006-09-25 11:27:06.000000000 -0700
5 /* #define CMDSET0001_DISABLE_WRITE_SUSPEND */
7 // debugging, turns off buffer write mode if set to 1
8 -#define FORCE_WORD_WRITE 0
9 +#define FORCE_WORD_WRITE 1
11 #define MANUFACTURER_INTEL 0x0089
12 #define I82802AB 0x00ad
13 diff -Nurb linux-2.6.17/drivers/mtd/maps/lubbock-flash.c linux-2.6.17-patched/drivers/mtd/maps/lubbock-flash.c
14 --- linux-2.6.17/drivers/mtd/maps/lubbock-flash.c 2006-06-17 18:49:35.000000000 -0700
15 +++ linux-2.6.17-patched/drivers/mtd/maps/lubbock-flash.c 2006-09-25 10:50:08.000000000 -0700
17 #include <asm/hardware.h>
18 #include <asm/arch/pxa-regs.h>
19 #include <asm/arch/lubbock.h>
20 +#include <linux/mtd/concat.h>
23 #define ROM_ADDR 0x00000000
25 .inval_cache = lubbock_map_inval_cache,
28 -static struct mtd_partition lubbock_partitions[] = {
29 +static struct mtd_partition lubbock_partitions[] =
32 - .name = "Bootloader",
35 - .mask_flags = MTD_WRITEABLE /* force read-only */
39 - .offset = 0x00040000,
41 - .name = "Filesystem",
42 - .size = MTDPART_SIZ_FULL,
43 - .offset = 0x00140000
46 + .offset = 0x00410000
51 + .offset = 0x000B0000
54 + .name = "bootloader",
56 + .offset = 0x00000000
61 static struct mtd_info *mymtds[2];
62 +static struct mtd_info *merged_mtd;
63 static struct mtd_partition *parsed_parts[2];
64 static int nr_parsed_parts[2];
67 printk(KERN_NOTICE "Lubbock configured to boot from %s (bank %d)\n",
68 flashboot?"Flash":"ROM", flashboot);
70 - lubbock_maps[flashboot^1].name = "Lubbock Application Flash";
71 - lubbock_maps[flashboot].name = "Lubbock Boot ROM";
72 + lubbock_maps[flashboot^1].name = "Flash-1";
73 + lubbock_maps[flashboot].name = "Flash-0";
75 for (i = 0; i < 2; i++) {
76 lubbock_maps[i].virt = ioremap(lubbock_maps[i].phys, WINDOW_SIZE);
78 if (!mymtds[0] && !mymtds[1])
81 - for (i = 0; i < 2; i++) {
83 - printk(KERN_WARNING "%s is absent. Skipping\n", lubbock_maps[i].name);
84 - } else if (nr_parsed_parts[i]) {
85 - add_mtd_partitions(mymtds[i], parsed_parts[i], nr_parsed_parts[i]);
87 - printk("Using static partitions on %s\n", lubbock_maps[i].name);
88 - add_mtd_partitions(mymtds[i], lubbock_partitions, ARRAY_SIZE(lubbock_partitions));
90 - printk("Registering %s as whole device\n", lubbock_maps[i].name);
91 - add_mtd_device(mymtds[i]);
94 + if (mymtds[0] && mymtds[1]) {
95 + merged_mtd = mtd_concat_create(mymtds, 2, "Concated Flash #1 and #2");
97 + add_mtd_partitions(merged_mtd, lubbock_partitions, ARRAY_SIZE(lubbock_partitions));
99 + printk("YoKu: Failed to concate\n");
104 static void __exit cleanup_lubbock(void)
108 + del_mtd_partitions(merged_mtd);
109 + map_destroy(merged_mtd);
111 for (i = 0; i < 2; i++) {