mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-25 08:35:56 +02:00
281d29e9b7
the patch folder is not correct
117 lines
3.0 KiB
Diff
117 lines
3.0 KiB
Diff
diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c
|
|
index 62409ed..c435df5 100644
|
|
--- a/arch/mips/jz4740/platform.c
|
|
+++ b/arch/mips/jz4740/platform.c
|
|
@@ -167,6 +167,8 @@ static struct resource jz_nand_resources[] = {
|
|
},
|
|
};
|
|
|
|
+
|
|
+#ifdef QI_LB60_1GB_NAND
|
|
static struct nand_ecclayout qi_lb60_ecclayout = {
|
|
.eccbytes = 36,
|
|
.eccpos = {
|
|
@@ -183,23 +185,62 @@ static struct nand_ecclayout qi_lb60_ecclayout = {
|
|
};
|
|
|
|
static struct mtd_partition qi_lb60_partitions[] = {
|
|
- { .name = "NAND BOOT partition",
|
|
- .offset = 0 * 0x100000,
|
|
- .size = 4 * 0x100000,
|
|
- },
|
|
- { .name = "NAND KERNEL partition",
|
|
- .offset = 4 * 0x100000,
|
|
- .size = 4 * 0x100000,
|
|
- },
|
|
- { .name = "NAND ROOTFS partition",
|
|
- .offset = 8 * 0x100000,
|
|
- .size = 20 * 0x100000,
|
|
- },
|
|
- { .name = "NAND DATA partition",
|
|
- .offset = 100 * 0x100000,
|
|
- .size = 20 * 0x100000,
|
|
- },
|
|
+ { .name = "NAND BOOT partition",
|
|
+ .offset = 0 * 0x100000,
|
|
+ .size = 4 * 0x100000,
|
|
+ },
|
|
+ { .name = "NAND KERNEL partition",
|
|
+ .offset = 4 * 0x100000,
|
|
+ .size = 4 * 0x100000,
|
|
+ },
|
|
+ { .name = "NAND ROOTFS partition",
|
|
+ .offset = 8 * 0x100000,
|
|
+ .size = 504 * 0x100000,
|
|
+ },
|
|
+ { .name = "NAND DATA partition",
|
|
+ .offset = 512 * 0x100000,
|
|
+ .size = 512 * 0x100000,
|
|
+ },
|
|
};
|
|
+#else
|
|
+static struct nand_ecclayout qi_lb60_ecclayout = {
|
|
+ .eccbytes = 72,
|
|
+ .eccpos = {
|
|
+ 12, 13, 14, 15, 16, 17, 18, 19,
|
|
+ 20, 21, 22, 23, 24, 25, 26, 27,
|
|
+ 28, 29, 30, 31, 32, 33, 34, 35,
|
|
+ 36, 37, 38, 39, 40, 41, 42, 43,
|
|
+ 44, 45, 46, 47, 48, 49, 50, 51,
|
|
+ 52, 53, 54, 55, 56, 57, 58, 59,
|
|
+ 60, 61, 62, 63, 64, 65, 66, 67,
|
|
+ 68, 69, 70, 71, 72, 73, 74, 75,
|
|
+ 76, 77, 78, 79, 80, 81, 82, 83},
|
|
+ .oobfree = {
|
|
+ {.offset = 2,
|
|
+ .length = 10},
|
|
+ {.offset = 84,
|
|
+ .length = 44}}
|
|
+};
|
|
+
|
|
+static struct mtd_partition qi_lb60_partitions[] = {
|
|
+ { .name = "NAND BOOT partition",
|
|
+ .offset = 0 * 0x100000,
|
|
+ .size = 4 * 0x100000,
|
|
+ },
|
|
+ { .name = "NAND KERNEL partition",
|
|
+ .offset = 4 * 0x100000,
|
|
+ .size = 4 * 0x100000,
|
|
+ },
|
|
+ { .name = "NAND ROOTFS partition",
|
|
+ .offset = 8 * 0x100000,
|
|
+ .size = 504 * 0x100000,
|
|
+ },
|
|
+ { .name = "NAND DATA partition",
|
|
+ .offset = 512 * 0x100000,
|
|
+ .size = (512 + 1024) * 0x100000,
|
|
+ },
|
|
+};
|
|
+#endif /* QI_LB60_1GB_NAND */
|
|
|
|
static struct jz_nand_platform_data jz_nand_platform_data = {
|
|
.num_partitions = ARRAY_SIZE(qi_lb60_partitions),
|
|
@@ -216,7 +257,9 @@ static struct platform_device jz_nand_device = {
|
|
.platform_data = &jz_nand_platform_data,
|
|
}
|
|
};
|
|
-#define KEEP_UART_ALIVE
|
|
+/* #define KEEP_UART_ALIVE
|
|
+ * don't define this. the keyboard and keyboard both work
|
|
+ */
|
|
|
|
#define KEY_QI_QI KEY_F13
|
|
#define KEY_QI_UPRED KEY_F14
|
|
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
|
|
index be51ae2..cf90168 100644
|
|
--- a/include/mtd/mtd-abi.h
|
|
+++ b/include/mtd/mtd-abi.h
|
|
@@ -134,7 +134,7 @@ struct nand_oobfree {
|
|
*/
|
|
struct nand_ecclayout {
|
|
__u32 eccbytes;
|
|
- __u32 eccpos[64];
|
|
+ __u32 eccpos[72];
|
|
__u32 oobavail;
|
|
struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
|
|
};
|