summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-17 17:20:29 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-17 17:20:29 +0000
commit35b2614c4cdfb4eb5fe99e58adcfbb8ddccb5d05 (patch)
treebcd12c81d1ed18be43ec8415dcf66f11197126a3 /target
parentb123f2edc5c437ba5139b9a37c35fa5b3bd752fd (diff)
[rdc] fix bifferboard flash map, thanks bifferos (#7622)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22258 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/rdc/patches-2.6.32/100-rdc_boards.patch44
1 files changed, 16 insertions, 28 deletions
diff --git a/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch b/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch
index dded04e8d..66ebcfe3f 100644
--- a/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch
+++ b/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch
@@ -384,7 +384,7 @@
+arch_initcall(ar525w_setup);
--- /dev/null
+++ b/arch/x86/mach-rdc321x/boards/bifferboard.c
-@@ -0,0 +1,81 @@
+@@ -0,0 +1,69 @@
+/*
+ * Bifferboard RDC321x platform devices
+ *
@@ -421,38 +421,26 @@
+ u32 kernel_len;
+ u16 tmp;
+
-+ if (master->size == 0x100000)
-+ kernel_len = master->size - 0x10000;
-+ else {
-+ res = master->read(master, 0x4000 + 1036, 2, &len, (char *) &tmp);
-+ if (res)
-+ return res;
-+ kernel_len = tmp * master->erasesize;
-+ }
++ res = master->read(master, 0x4000 + 1036, 2, &len, (char *) &tmp);
++ if (res)
++ return res;
++ kernel_len = tmp * master->erasesize;
+
-+ rdc_flash_parts = kzalloc(sizeof(struct mtd_partition) * 4, GFP_KERNEL);
++ rdc_flash_parts = kzalloc(sizeof(struct mtd_partition) * 3, GFP_KERNEL);
+
+ *pparts = rdc_flash_parts;
+
-+ rdc_flash_parts[0].name = "biffboot";
-+ rdc_flash_parts[0].offset = master->size - 0x10000;
-+ rdc_flash_parts[0].size = 0x10000;
-+ rdc_flash_parts[0].mask_flags = MTD_WRITEABLE;
-+ rdc_flash_parts[1].name = "firmware";
-+ rdc_flash_parts[1].offset = 0;
-+ rdc_flash_parts[1].size = rdc_flash_parts[0].offset;
-+ rdc_flash_parts[2].name = "kernel";
-+ rdc_flash_parts[2].offset = 0x00000000;
-+ rdc_flash_parts[2].size = kernel_len;
-+
-+ if (master->size == 0x100000)
-+ return 2;
-+
-+ rdc_flash_parts[3].name = "rootfs";
-+ rdc_flash_parts[3].offset = MTDPART_OFS_APPEND;
-+ rdc_flash_parts[3].size = rdc_flash_parts[1].size - rdc_flash_parts[2].size;
++ rdc_flash_parts[0].name = "kernel";
++ rdc_flash_parts[0].offset = 0;
++ rdc_flash_parts[0].size = kernel_len;
++ rdc_flash_parts[1].name = "rootfs";
++ rdc_flash_parts[1].offset = kernel_len;
++ rdc_flash_parts[1].size = master->size - kernel_len - 0x10000;
++ rdc_flash_parts[2].name = "biffboot";
++ rdc_flash_parts[2].offset = master->size - 0x10000;
++ rdc_flash_parts[2].size = 0x10000;
+
-+ return 4;
++ return 3;
+}
+
+struct mtd_part_parser __initdata bifferboard_parser = {