aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2010-04-28 11:46:47 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-05-13 20:50:04 -0400
commit3328dc315914aa6db486da2ceb021b6f0b36b877 (patch)
tree4fbce95b6e6469600181fad1fd6f900bf5a45766 /drivers/mtd/onenand
parent4a8ce0b030716b95004a4ace969953bc3ad7d2fe (diff)
mtd: onenand: add new callback for bufferram read
This patch adds a new callback for the underlying drivers, which is called instead of accessing the buffer ram directly. This callback will be used by Samsung OneNAND driver to implement DMA transfers on S5PC110 SoC. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/onenand_base.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 045811f21497..9827ab779c08 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1635,7 +1635,6 @@ static int onenand_verify_oob(struct mtd_info *mtd, const u_char *buf, loff_t to
1635static int onenand_verify(struct mtd_info *mtd, const u_char *buf, loff_t addr, size_t len) 1635static int onenand_verify(struct mtd_info *mtd, const u_char *buf, loff_t addr, size_t len)
1636{ 1636{
1637 struct onenand_chip *this = mtd->priv; 1637 struct onenand_chip *this = mtd->priv;
1638 void __iomem *dataram;
1639 int ret = 0; 1638 int ret = 0;
1640 int thislen, column; 1639 int thislen, column;
1641 1640
@@ -1655,10 +1654,9 @@ static int onenand_verify(struct mtd_info *mtd, const u_char *buf, loff_t addr,
1655 1654
1656 onenand_update_bufferram(mtd, addr, 1); 1655 onenand_update_bufferram(mtd, addr, 1);
1657 1656
1658 dataram = this->base + ONENAND_DATARAM; 1657 this->read_bufferram(mtd, ONENAND_DATARAM, this->verify_buf, 0, mtd->writesize);
1659 dataram += onenand_bufferram_offset(mtd, ONENAND_DATARAM);
1660 1658
1661 if (memcmp(buf, dataram + column, thislen)) 1659 if (memcmp(buf, this->verify_buf, thislen))
1662 return -EBADMSG; 1660 return -EBADMSG;
1663 1661
1664 len -= thislen; 1662 len -= thislen;