Signed-off-by: David Brownell <[email protected]>
Update NAND layout for the DM6446 EVM:
- Partition it more like the DVDSK kernel does ... no more
hidden 5 Mbyte partition before the filesystem data, the
boot areas are fully visible.
The GIT version of this driver previously started the
filesystem area more than 640 KBytes later, and named
it mtd0 instead of mtd3; so this is incompatible.
The MontaVista kernel allocated eight blocks (!) for
U-Boot environment; this allocates just one, so it's
also incompatible with that code. This seems to match
what mainline U-Boot expects, and in any case is less
wasteful (by 112 KBytes) ... but if it's important,
this could be more compatible with the DVDSK.
- Use the last few blocks of NAND to store a bad-blocks table
and its mirror. Among other things, this gives a slightly
faster boot (no scanning all blocks).
This is incompatible with previous configs, which used
those blocks for filesystem data.
These EVMs all ship set up for NOR flash boot, so the only folk
noticing changes will be folk who used some tools to switch over
to NAND boot. Even they may not notice unless they use a NAND
filesystem or *HUGE* u-boot environments.
Signed-off-by: David Brownell <[email protected]>
---
So the question is: does anyone using NAND on these boards
care about being (even) "more compatible"?
arch/arm/mach-davinci/board-dm644x-evm.c | 30 +++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -110,13 +110,34 @@ static struct platform_device davinci_ev
.resource = &davinci_evm_norflash_resource,
};
+/* DM644x EVM includes a 64 MByte small-block NAND flash */
+
+#define NAND_BLOCK_SIZE SZ_16K
+
struct mtd_partition davinci_evm_nandflash_partition[] = {
- /* 5 MB space at the beginning for bootloader and kernel */
+ /* RBL sectors then U-Boot */
{
- .name = "NAND filesystem",
- .offset = 5 * SZ_1M,
+ .name = "bootloader",
+ .offset = 0,
+ .size = SZ_256K,
+ .mask_flags = MTD_WRITEABLE, /* force read-only */
+ },
+ /* U-Boot environment */
+ {
+ .name = "params",
+ .offset = MTDPART_OFS_APPEND,
+ .size = NAND_BLOCK_SIZE,
+ .mask_flags = MTD_WRITEABLE, /* force read-only */
+ },
+ {
+ .name = "kernel",
+ .offset = MTDPART_OFS_APPEND,
+ .size = SZ_4M
+ },
+ {
+ .name = "filesystem",
+ .offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
- .mask_flags = 0,
}
};
@@ -124,6 +145,7 @@ static struct davinci_nand_pdata davinci
.parts = davinci_evm_nandflash_partition,
.nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition),
.ecc_mode = NAND_ECC_HW,
+ .options = NAND_USE_FLASH_BBT,
};
static struct resource davinci_evm_nandflash_resource[] = {
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source