This commit is contained in:
刘可亮
2025-07-22 11:15:46 +08:00
parent d164b333ed
commit 11c97ef399
2870 changed files with 951307 additions and 26675 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, ArtInChip Technology Co., Ltd
* Copyright (c) 2023-2025, ArtInChip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -21,7 +21,7 @@ static int zb35q01a_ecc_get_status(struct aic_spinand *flash, u8 status)
case STATUS_ECC_UNCOR_ERROR:
return -SPINAND_ERR_ECC;
case STATUS_ECC_MASK:
return 4;
return 8;
default:
break;
}
@@ -41,6 +41,18 @@ static int zb35q01a_ooblayout_user(struct aic_spinand *flash, int section,
return 0;
}
static int zb35q01b_ooblayout_user(struct aic_spinand *flash, int section,
struct aic_oob_region *region)
{
if (section > 3)
return -SPINAND_ERR;
region->offset = (16 * section) + 0;
region->length = 3;
return 0;
}
const struct aic_spinand_info zbit_spinand_table[] = {
/*devid page_size oob_size block_per_lun pages_per_eraseblock planes_per_lun
is_die_select*/
@@ -48,6 +60,10 @@ const struct aic_spinand_info zbit_spinand_table[] = {
{ DEVID(0x41), PAGESIZE(2048), OOBSIZE(64), BPL(1024), PPB(64), PLANENUM(1),
DIE(0), "zbit 128MB: 2048+64@64@1024", cmd_cfg_table,
zb35q01a_ecc_get_status, zb35q01a_ooblayout_user },
/*ZB35Q01B*/
{ DEVID(0xa1), PAGESIZE(2048), OOBSIZE(64), BPL(1024), PPB(64), PLANENUM(1),
DIE(0), "zbit 128MB: 2048+64@64@1024", cmd_cfg_table,
zb35q01a_ecc_get_status, zb35q01b_ooblayout_user },
};
const struct aic_spinand_info *zbit_spinand_detect(struct aic_spinand *flash)