提交 42b0aab1 编写于 作者: R Rohit Hassan Sathyanarayan 提交者: David Woodhouse

mtd: onenand:fix for page addr calculation based on device type

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.htmlSigned-off-by: NRohit HS <rohit.hs@samsung.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 02ed70bb
...@@ -377,8 +377,11 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le ...@@ -377,8 +377,11 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
default: default:
block = onenand_block(this, addr); 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)) { if (ONENAND_IS_2PLANE(this)) {
/* Make the even block number */ /* Make the even block number */
block &= ~1; block &= ~1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册