* [U-Boot] [PATCH] NAND: Add Support for 4K page size in DaVinci NAND driver
@ 2009-11-20 4:04 s-paulraj at ti.com
2009-11-20 20:18 ` Scott Wood
0 siblings, 1 reply; 2+ messages in thread
From: s-paulraj at ti.com @ 2009-11-20 4:04 UTC (permalink / raw)
To: u-boot
From: Sandeep Paulraj <s-paulraj@ti.com>
This patch adds support for NAND devices with a page size of
4K in the DaVinci NAND driver. The layout matches the layout that TI uses
for 4K page size NAND devices in the kernel NAND driver.
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
---
patch applies to u-boot-nand-flash/next
drivers/mtd/nand/davinci_nand.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index eabaf3e..41a9568 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -182,13 +182,7 @@ static int nand_davinci_correct_data(struct mtd_info *mtd, u_char *dat, u_char *
#ifdef CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
static struct nand_ecclayout nand_davinci_4bit_layout_oobfirst = {
-/*
- * TI uses a different layout for 4K page deviecs. Since the
- * eccpos filed can hold only a limited number of entries, adding
- * support for 4K page will result in compilation warnings
- * 4K Support will be added later
- */
-#ifdef CONFIG_SYS_NAND_PAGE_2K
+#if defined(CONFIG_SYS_NAND_PAGE_2K)
.eccbytes = 40,
.eccpos = {
24, 25, 26, 27, 28,
@@ -200,6 +194,21 @@ static struct nand_ecclayout nand_davinci_4bit_layout_oobfirst = {
.oobfree = {
{.offset = 2, .length = 22, },
},
+#elif defined(CONFIG_SYS_NAND_PAGE_4K)
+ .eccbytes = 80,
+ .eccpos = {
+ 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, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ },
+ .oobfree = {
+ {.offset = 2, .length = 46, },
+ },
#endif
};
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] NAND: Add Support for 4K page size in DaVinci NAND driver
2009-11-20 4:04 [U-Boot] [PATCH] NAND: Add Support for 4K page size in DaVinci NAND driver s-paulraj at ti.com
@ 2009-11-20 20:18 ` Scott Wood
0 siblings, 0 replies; 2+ messages in thread
From: Scott Wood @ 2009-11-20 20:18 UTC (permalink / raw)
To: u-boot
On Thu, Nov 19, 2009 at 11:04:42PM -0500, s-paulraj at ti.com wrote:
> From: Sandeep Paulraj <s-paulraj@ti.com>
>
> This patch adds support for NAND devices with a page size of
> 4K in the DaVinci NAND driver. The layout matches the layout that TI uses
> for 4K page size NAND devices in the kernel NAND driver.
>
> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> ---
> patch applies to u-boot-nand-flash/next
Applied.
-Scott
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-20 20:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-20 4:04 [U-Boot] [PATCH] NAND: Add Support for 4K page size in DaVinci NAND driver s-paulraj at ti.com
2009-11-20 20:18 ` Scott Wood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.