mtd: spinand: Supoprt new MXIC devices
MX35UF1GE4AC, MX35UF2GE4AC Change-Id: I064e9116c565e2ea3b92432e9c68864d47a7567c Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
parent
ae17d6d435
commit
55efc32aea
|
|
@ -50,6 +50,23 @@ static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = {
|
|||
.rfree = mx35lfxge4ab_ooblayout_free,
|
||||
};
|
||||
|
||||
static int mx35ufxge4ac_ooblayout_free(struct mtd_info *mtd, int section,
|
||||
struct mtd_oob_region *region)
|
||||
{
|
||||
if (section > 3)
|
||||
return -ERANGE;
|
||||
|
||||
region->offset = (16 * section) + 2;
|
||||
region->length = 14;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct mtd_ooblayout_ops mx35ufxge4ac_ooblayout = {
|
||||
.ecc = mx35lfxge4ab_ooblayout_ecc,
|
||||
.rfree = mx35ufxge4ac_ooblayout_free,
|
||||
};
|
||||
|
||||
static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr)
|
||||
{
|
||||
struct spi_mem_op op = SPI_MEM_OP(SPI_MEM_OP_CMD(0x7c, 1),
|
||||
|
|
@ -130,6 +147,24 @@ static const struct spinand_info macronix_spinand_table[] = {
|
|||
SPINAND_HAS_QE_BIT,
|
||||
SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
|
||||
mx35lf1ge4ab_ecc_get_status)),
|
||||
SPINAND_INFO("MX35UF1GE4AC", 0x92,
|
||||
NAND_MEMORG(1, 2048, 64, 64, 1024, 1, 1, 1),
|
||||
NAND_ECCREQ(4, 512),
|
||||
SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
&write_cache_variants,
|
||||
&update_cache_variants),
|
||||
SPINAND_HAS_QE_BIT,
|
||||
SPINAND_ECCINFO(&mx35ufxge4ac_ooblayout,
|
||||
mx35lf1ge4ab_ecc_get_status)),
|
||||
SPINAND_INFO("MX35UF2GE4AC", 0xA2,
|
||||
NAND_MEMORG(1, 2048, 64, 64, 2048, 1, 1, 1),
|
||||
NAND_ECCREQ(4, 512),
|
||||
SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
&write_cache_variants,
|
||||
&update_cache_variants),
|
||||
SPINAND_HAS_QE_BIT,
|
||||
SPINAND_ECCINFO(&mx35ufxge4ac_ooblayout,
|
||||
mx35lf1ge4ab_ecc_get_status)),
|
||||
};
|
||||
|
||||
static int macronix_spinand_detect(struct spinand_device *spinand)
|
||||
|
|
|
|||
Loading…
Reference in New Issue