Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;

	/*