Commit 1848a057 authored by Han Xu's avatar Han Xu Committed by Boris Brezillon

mtd: nand: gpmi: get correct free oob space

change the way to calculate pagesize to get correct free oob space for
legacy_set_geometry function.
Signed-off-by: default avatarHan Xu <han.xu@nxp.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 3fe4f900
......@@ -318,7 +318,8 @@ static int legacy_set_geometry(struct gpmi_nand_data *this)
return -EINVAL;
}
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;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment