[OpenWrt-Tickets] [OpenWrt] #2647: Can't write to NAND 128MiB 3, 3V 8-bit chip on Routerboard153.
OpenWrt
openwrt-devel at lists.openwrt.org
Fri Apr 25 12:33:45 CEST 2008
#2647: Can't write to NAND 128MiB 3,3V 8-bit chip on Routerboard153.
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: juhosg
Type: defect | Status: assigned
Priority: normal | Milestone: Kamikaze
Component: kernel | Resolution:
Keywords: adm5120 |
-----------------------+----------------------------------------------------
Comment (by florian):
Same happens with some rb532a with 64Mbit chip, here is the patch to be
used :
{{{
Index: target/linux/rb532/files/arch/mips/rb500/devices.c
===================================================================
--- target/linux/rb532/files/arch/mips/rb500/devices.c (revision 10934)
+++ target/linux/rb532/files/arch/mips/rb500/devices.c (working copy)
@@ -154,6 +154,19 @@
writeb(cmd, chip->IO_ADDR_W);
}
+/*
+ * We need to use the OLD Yaffs-1 OOB layout, otherwise the RB bootloader
+ * will not be able to find the kernel that we load. So set the oobinfo
+ * when creating the partitions
+ */
+
+static struct nand_ecclayout rb1xx_nand_ecclayout = {
+ .eccbytes = 6,
+ .eccpos = { 8, 9, 10, 13, 14, 15 },
+ .oobavail = 9,
+ .oobfree = { { 0, 4 }, { 6, 2 }, { 11, 2 }, { 4, 1 } }
+};
+
static struct resource nand_slot0_res[] = {
[0] = {
.name = "nand_membase",
@@ -277,6 +290,7 @@
rb500_nand_data.chip.partitions = rb500_partition_info;
rb500_nand_data.chip.chip_delay = NAND_CHIP_DELAY;
rb500_nand_data.chip.options = NAND_NO_AUTOINCR;
+ rb500_nand_data.chip.ecclayout = &rb1xx_nand_ecclayout;
}
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/2647#comment:23>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
More information about the openwrt-tickets
mailing list