aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2005-12-15 21:17:29 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-18 19:28:23 -0500
commit20ba89a3614bbc5d111fd74375e14c577859b2a3 (patch)
treef6b4da6e50a21dc8a8f4afd76408af1fc918a5ed
parent37b1cc3910f7976369fc0ed55068a686e92555e6 (diff)
[PATCH] mtd onenand driver: fix unlock problem in DDP
-rw-r--r--drivers/mtd/onenand/onenand_base.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 33d6f5c2e053..d57afbaaedc4 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1296,6 +1296,12 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
1296 1296
1297 /* Block lock scheme */ 1297 /* Block lock scheme */
1298 for (block = start; block < end; block++) { 1298 for (block = start; block < end; block++) {
1299 /* Set block address */
1300 value = onenand_block_address(this, block);
1301 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1);
1302 /* Select DataRAM for DDP */
1303 value = onenand_bufferram_address(this, block);
1304 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2);
1299 /* Set start block address */ 1305 /* Set start block address */
1300 this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS); 1306 this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS);
1301 /* Write unlock command */ 1307 /* Write unlock command */
@@ -1309,10 +1315,6 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
1309 & ONENAND_CTRL_ONGO) 1315 & ONENAND_CTRL_ONGO)
1310 continue; 1316 continue;
1311 1317
1312 /* Set block address for read block status */
1313 value = onenand_block_address(this, block);
1314 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1);
1315
1316 /* Check lock status */ 1318 /* Check lock status */
1317 status = this->read_word(this->base + ONENAND_REG_WP_STATUS); 1319 status = this->read_word(this->base + ONENAND_REG_WP_STATUS);
1318 if (!(status & ONENAND_WP_US)) 1320 if (!(status & ONENAND_WP_US))