From: Kyungmin Park Date: Fri, 12 May 2006 14:02:51 +0000 (+0300) Subject: OneNAND: Handle erase correctly in Double Density Package (DDP) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3cecf69ecde22199699c4f0e609dfed2a487b674;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 6b950ab8ea8d..7c7dc0ae5a19 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) {