summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2006-05-12 14:02:51 (GMT)
committerJarkko Lavinen <lavinen@pentafluge.infradead.org>2006-05-12 14:35:48 (GMT)
commit3cecf69ecde22199699c4f0e609dfed2a487b674 (patch)
treedda3a1cdd96b211a747cd0967a1c231daf2d0a47 /drivers/mtd
parent34c1060959b61a5bb2e97a88411446028cebfa7c (diff)
downloadlinux-fsl-qoriq-3cecf69ecde22199699c4f0e609dfed2a487b674.tar.xz
OneNAND: Handle erase correctly in Double Density Package (DDP)
There's erase bug in DDP. We need to add DDP select in erase Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/onenand/onenand_base.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 6b950ab..7c7dc0a 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -234,6 +234,12 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
/* Write 'DFS, FBA' of Flash */
value = onenand_block_address(this, block);
this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1);
+
+ if (cmd == ONENAND_CMD_ERASE) {
+ /* Select DataRAM for DDP */
+ value = onenand_bufferram_address(this, block);
+ this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2);
+ }
}
if (page != -1) {