summaryrefslogtreecommitdiffstats
path: root/target/linux/pxa/patches/005-mtd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/pxa/patches/005-mtd.patch')
-rw-r--r--target/linux/pxa/patches/005-mtd.patch111
1 files changed, 0 insertions, 111 deletions
diff --git a/target/linux/pxa/patches/005-mtd.patch b/target/linux/pxa/patches/005-mtd.patch
deleted file mode 100644
index 6156b6a93..000000000
--- a/target/linux/pxa/patches/005-mtd.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-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++) {