mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 01:08:50 +00:00
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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user