diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2005-12-16 11:17:29 +0900 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-18 16:28:23 -0800 |
commit | 20ba89a3614bbc5d111fd74375e14c577859b2a3 (patch) | |
tree | f6b4da6e50a21dc8a8f4afd76408af1fc918a5ed /drivers/mtd | |
parent | 37b1cc3910f7976369fc0ed55068a686e92555e6 (diff) |
[PATCH] mtd onenand driver: fix unlock problem in DDP
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 10 |
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) /* Block lock scheme */ for (block = start; block < end; block++) { + /* Set block address */ + value = onenand_block_address(this, block); + this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); + /* Select DataRAM for DDP */ + value = onenand_bufferram_address(this, block); + this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); /* Set start block address */ this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS); /* Write unlock command */ @@ -1309,10 +1315,6 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) & ONENAND_CTRL_ONGO) continue; - /* Set block address for read block status */ - value = onenand_block_address(this, block); - this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); - /* Check lock status */ status = this->read_word(this->base + ONENAND_REG_WP_STATUS); if (!(status & ONENAND_WP_US)) |