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: Han Xu <han.xu@nxp.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
parent
3fe4f900bf
commit
1848a057a2
|
@ -318,7 +318,8 @@ static int legacy_set_geometry(struct gpmi_nand_data *this)
|
||||||
return -EINVAL;
|
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;
|
geo->payload_size = mtd->writesize;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue