mtd: spinand: skyhigh: The vendor requires the devices to be patched

1.Double OIP=0 after page 13H
2.The nand flash does not support 84H and 34H command

Change-Id: Ie805f42a36e1a864115988087bdc43592cc94ded
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2023-07-07 12:06:40 +08:00
committed by Tao Huang
parent 718ca57be2
commit 328145662f
2 changed files with 10 additions and 3 deletions

View File

@@ -527,7 +527,7 @@ static int spinand_read_page(struct spinand_device *spinand,
const struct nand_page_io_req *req,
bool ecc_enabled)
{
u8 status;
u8 status = 0;
int ret;
ret = spinand_load_page_op(spinand, req);
@@ -535,6 +535,13 @@ static int spinand_read_page(struct spinand_device *spinand,
return ret;
ret = spinand_wait(spinand, &status);
/*
* When there is data outside of OIP in the status, the status data is
* inaccurate and needs to be reconfirmed
*/
if (spinand->id.data[0] == 0x01 && status && !ret)
ret = spinand_wait(spinand, &status);
if (ret < 0)
return ret;

View File

@@ -26,8 +26,8 @@ static SPINAND_OP_VARIANTS(write_cache_variants,
SPINAND_PROG_LOAD(true, 0, NULL, 0));
static SPINAND_OP_VARIANTS(update_cache_variants,
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
SPINAND_PROG_LOAD(false, 0, NULL, 0));
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
SPINAND_PROG_LOAD(true, 0, NULL, 0));
static int s35ml04g3_ooblayout_ecc(struct mtd_info *mtd, int section,
struct mtd_oob_region *region)