* [PATCH] [MTD] onenand/onenand_base.c:Fix for page addr calculation based on device type
@ 2010-07-23 6:59 Rohit Hassan Sathyanarayan
2010-07-26 5:31 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Rohit Hassan Sathyanarayan @ 2010-07-23 6:59 UTC (permalink / raw)
To: linux-mtd, dedekind1, 'Enric Balletbò i Serra'
Cc: rohit.hs, v.dalal
Hi all
Sending the patch for page address calculation based on device type. This resolves the
OneNAND DDP device read problem as pointed by Enric.
http://lists.infradead.org/pipermail/linux-mtd/2010-July/030920.html
Signed-off-by: Rohit HS <rohit.hs@samsung.com>
---
drivers/mtd/onenand/onenand_base.c | 7 +++++--
1 file changed, 3 insertions(+)
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 26caf25..f749935 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -377,8 +377,11 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
default:
block = onenand_block(this, addr);
- page = (int) (addr - onenand_addr(this, block)) >> this->page_shift;
-
+ if (FLEXONENAND(this))
+ page = (int) (addr - onenand_addr(this, block))>>\
+ this->page_shift;
+ else
+ page = (int) (addr >> this->page_shift);
if (ONENAND_IS_2PLANE(this)) {
/* Make the even block number */
block &= ~1;
---
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [MTD] onenand/onenand_base.c:Fix for page addr calculation based on device type
2010-07-23 6:59 [PATCH] [MTD] onenand/onenand_base.c:Fix for page addr calculation based on device type Rohit Hassan Sathyanarayan
@ 2010-07-26 5:31 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-07-26 5:31 UTC (permalink / raw)
To: Rohit Hassan Sathyanarayan
Cc: 'Enric Balletbò i Serra', v.dalal, linux-mtd
On Fri, 2010-07-23 at 12:29 +0530, Rohit Hassan Sathyanarayan wrote:
> Hi all
>
> Sending the patch for page address calculation based on device type. This resolves the
> OneNAND DDP device read problem as pointed by Enric.
> http://lists.infradead.org/pipermail/linux-mtd/2010-July/030920.html
>
>
> Signed-off-by: Rohit HS <rohit.hs@samsung.com>
Pushed to l2-mtd-2.6.git / master, thanks!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-26 5:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 6:59 [PATCH] [MTD] onenand/onenand_base.c:Fix for page addr calculation based on device type Rohit Hassan Sathyanarayan
2010-07-26 5:31 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).