* [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset
@ 2009-06-11 11:15 Mika Korhonen
2009-06-12 5:01 ` Artem Bityutskiy
0 siblings, 1 reply; 3+ messages in thread
From: Mika Korhonen @ 2009-06-11 11:15 UTC (permalink / raw)
To: linux-mtd Mailing List
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
Hi, I was testing 2-plane programming and noticed that when writing
and doing a verify read straight after I kept getting 00 00 00 00 ...
instead of the written data. I found out that OMAP2/3 version of
onenand_bufferram_offset() uses the faked page size instead of the
real one. The generic version in onenand_base.c is ok.
The patch to fix this is attached.
br
Mika
[-- Attachment #2: 0001-MTD-OneNAND-OMAP2-3-Fix-incorrect-bufferram-offset.patch --]
[-- Type: text/x-diff, Size: 969 bytes --]
From 4ad479f5238560286999c07c30fec3a6a5551dd5 Mon Sep 17 00:00:00 2001
From: Mika Korhonen <mika.j.korhonen@gmail.com>
Date: Thu, 11 Jun 2009 14:05:07 +0300
Subject: [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset
Fixes the case where CONFIG_MTD_ONENAND_2X_PROGRAM is set and
the real page size differs from mtd_info.writesize.
Signed-off-by: Mika Korhonen <mika.j.korhonen@gmail.com>
---
drivers/mtd/onenand/omap2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index df26db8..32de634 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -267,7 +267,7 @@ static inline int omap2_onenand_bufferram_offset(struct mtd_info *mtd, int area)
if (ONENAND_CURRENT_BUFFERRAM(this)) {
if (area == ONENAND_DATARAM)
- return mtd->writesize;
+ return this->writesize;
if (area == ONENAND_SPARERAM)
return mtd->oobsize;
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset
2009-06-11 11:15 [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset Mika Korhonen
@ 2009-06-12 5:01 ` Artem Bityutskiy
2009-06-12 5:10 ` Kyungmin Park
0 siblings, 1 reply; 3+ messages in thread
From: Artem Bityutskiy @ 2009-06-12 5:01 UTC (permalink / raw)
To: Mika Korhonen; +Cc: Kyungmin Park, linux-mtd Mailing List
On Thu, 2009-06-11 at 14:15 +0300, Mika Korhonen wrote:
> Hi, I was testing 2-plane programming and noticed that when writing
> and doing a verify read straight after I kept getting 00 00 00 00 ...
> instead of the written data. I found out that OMAP2/3 version of
> onenand_bufferram_offset() uses the faked page size instead of the
> real one. The generic version in onenand_base.c is ok.
>
> The patch to fix this is attached.
Looks good to me, Kyungmin?
>From 4ad479f5238560286999c07c30fec3a6a5551dd5 Mon Sep 17 00:00:00 2001
From: Mika Korhonen <mika.j.korhonen@gmail.com>
Date: Thu, 11 Jun 2009 14:05:07 +0300
Subject: [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset
Fixes the case where CONFIG_MTD_ONENAND_2X_PROGRAM is set and
the real page size differs from mtd_info.writesize.
Signed-off-by: Mika Korhonen <mika.j.korhonen@gmail.com>
---
drivers/mtd/onenand/omap2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index df26db8..32de634 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -267,7 +267,7 @@ static inline int omap2_onenand_bufferram_offset(struct mtd_info *mtd, int area)
if (ONENAND_CURRENT_BUFFERRAM(this)) {
if (area == ONENAND_DATARAM)
- return mtd->writesize;
+ return this->writesize;
if (area == ONENAND_SPARERAM)
return mtd->oobsize;
}
--
1.5.6.5
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset
2009-06-12 5:01 ` Artem Bityutskiy
@ 2009-06-12 5:10 ` Kyungmin Park
0 siblings, 0 replies; 3+ messages in thread
From: Kyungmin Park @ 2009-06-12 5:10 UTC (permalink / raw)
To: dedekind; +Cc: Mika Korhonen, linux-mtd Mailing List
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
On Fri, Jun 12, 2009 at 2:01 PM, Artem Bityutskiy<dedekind@infradead.org> wrote:
> On Thu, 2009-06-11 at 14:15 +0300, Mika Korhonen wrote:
>> Hi, I was testing 2-plane programming and noticed that when writing
>> and doing a verify read straight after I kept getting 00 00 00 00 ...
>> instead of the written data. I found out that OMAP2/3 version of
>> onenand_bufferram_offset() uses the faked page size instead of the
>> real one. The generic version in onenand_base.c is ok.
>>
>> The patch to fix this is attached.
>
> Looks good to me, Kyungmin?
>
> >From 4ad479f5238560286999c07c30fec3a6a5551dd5 Mon Sep 17 00:00:00 2001
> From: Mika Korhonen <mika.j.korhonen@gmail.com>
> Date: Thu, 11 Jun 2009 14:05:07 +0300
> Subject: [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset
>
> Fixes the case where CONFIG_MTD_ONENAND_2X_PROGRAM is set and
> the real page size differs from mtd_info.writesize.
>
> Signed-off-by: Mika Korhonen <mika.j.korhonen@gmail.com>
> ---
> drivers/mtd/onenand/omap2.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index df26db8..32de634 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -267,7 +267,7 @@ static inline int omap2_onenand_bufferram_offset(struct mtd_info *mtd, int area)
>
> if (ONENAND_CURRENT_BUFFERRAM(this)) {
> if (area == ONENAND_DATARAM)
> - return mtd->writesize;
> + return this->writesize;
> if (area == ONENAND_SPARERAM)
> return mtd->oobsize;
> }
> --
> 1.5.6.5
>
> --
> Best regards,
> Artem Bityutskiy (Битюцкий Артём)
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-12 5:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-11 11:15 [PATCH] MTD: OneNAND OMAP2/3: Fix incorrect bufferram offset Mika Korhonen
2009-06-12 5:01 ` Artem Bityutskiy
2009-06-12 5:10 ` Kyungmin Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox