diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch new file mode 100644 index 00000000..a8f3d8b4 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 7d8868d73fdd95eb928f54f881978590643e50cc Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <steve@sakoman.com> | ||
3 | Date: Thu, 31 Dec 2009 07:05:02 -0800 | ||
4 | Subject: [PATCH 12/45] MTD: NAND: omap2: proper fix for subpage read ECC errors | ||
5 | |||
6 | --- | ||
7 | drivers/mtd/nand/omap2.c | 11 +++++++---- | ||
8 | 1 files changed, 7 insertions(+), 4 deletions(-) | ||
9 | |||
10 | diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c | ||
11 | index 08c193c..9b185b0 100644 | ||
12 | --- a/drivers/mtd/nand/omap2.c | ||
13 | +++ b/drivers/mtd/nand/omap2.c | ||
14 | @@ -295,11 +295,14 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len) | ||
15 | u32 *p = (u32 *)buf; | ||
16 | |||
17 | /* take care of subpage reads */ | ||
18 | - for (; len % 4 != 0; ) { | ||
19 | - *buf++ = __raw_readb(info->nand.IO_ADDR_R); | ||
20 | - len--; | ||
21 | + if (len % 4) { | ||
22 | + if (info->nand.options & NAND_BUSWIDTH_16) | ||
23 | + omap_read_buf16(mtd, buf, len % 4); | ||
24 | + else | ||
25 | + omap_read_buf8(mtd, buf, len % 4); | ||
26 | + p = (u32 *) (buf + len % 4); | ||
27 | + len -= len % 4; | ||
28 | } | ||
29 | - p = (u32 *) buf; | ||
30 | |||
31 | /* configure and start prefetch transfer */ | ||
32 | ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0); | ||
33 | -- | ||
34 | 1.6.6.1 | ||
35 | |||