diff options
author | Han Xu <han.xu@nxp.com> | 2017-07-26 21:20:00 -0500 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 4de1954e711d5a1d35ae9e017ceb3a0a327fd76a (patch) | |
tree | 76c104f2a0852ff6e878d2d5538b2757ec530db8 /drivers/mtd | |
parent | bd8824928de30ce41f21a46b2c098336181c5e13 (diff) |
MLK-16089: mtd: gpmi-nand: calculate the correct free oob space for large oob layout setting
for the large oob layout setting, need to calculate the correct free oob
space.
Signed-off-by: Han Xu <han.xu@nxp.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 30f1f0454a35..9c370a2f273e 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -411,7 +411,8 @@ static int set_geometry_for_large_oob(struct gpmi_nand_data *this) geo_setting: - geo->page_size = mtd->writesize + mtd->oobsize; + geo->page_size = mtd->writesize + geo->metadata_size + + (geo->gf_len * geo->ecc_strength * geo->ecc_chunk_count) / 8; geo->payload_size = mtd->writesize; /* |