mtd: OneNAND: Fix 2KiB pagesize handling at Samsung SoCs

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Sep 13 04:59:02 EDT 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9aba97ad004ed0cde9747a9daf5b1484edb746cd
Commit:     9aba97ad004ed0cde9747a9daf5b1484edb746cd
Parent:     8b865d5efd9205b131dd9a43a6f450c05d38aaa1
Author:     Kyungmin Park <kyungmin.park at samsung.com>
AuthorDate: Fri Aug 27 11:55:44 2010 +0900
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Sep 13 08:49:18 2010 +0100

    mtd: OneNAND: Fix 2KiB pagesize handling at Samsung SoCs
    
    Wrong assumption bufferram can be switched between BufferRAM0 and BufferRAM1
    
    Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/onenand/samsung.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index cb443af..094dfcb 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -571,13 +571,12 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
 		unsigned char *buffer, int offset, size_t count)
 {
 	struct onenand_chip *this = mtd->priv;
-	void __iomem *bufferram;
 	void __iomem *p;
 	void *buf = (void *) buffer;
 	dma_addr_t dma_src, dma_dst;
 	int err;
 
-	p = bufferram = this->base + area;
+	p = this->base + area;
 	if (ONENAND_CURRENT_BUFFERRAM(this)) {
 		if (area == ONENAND_DATARAM)
 			p += this->writesize;
@@ -621,7 +620,7 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
 normal:
 	if (count != mtd->writesize) {
 		/* Copy the bufferram to memory to prevent unaligned access */
-		memcpy(this->page_buf, bufferram, mtd->writesize);
+		memcpy(this->page_buf, p, mtd->writesize);
 		p = this->page_buf + offset;
 	}
 



More information about the linux-mtd-cvs mailing list