]> err.no Git - linux-2.6/commitdiff
OneNAND: Handle erase correctly in Double Density Package (DDP)
authorKyungmin Park <kyungmin.park@samsung.com>
Fri, 12 May 2006 14:02:51 +0000 (17:02 +0300)
committerJarkko Lavinen <lavinen@pentafluge.infradead.org>
Fri, 12 May 2006 14:35:48 +0000 (15:35 +0100)
There's erase bug in DDP.
We need to add DDP select in erase

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/mtd/onenand/onenand_base.c

index 6b950ab8ea8d5224dd2885b00a1a84a536e3677c..7c7dc0ae5a190cc53d9c0c6247f1c503202f8994 100644 (file)
@@ -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) {