projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c06153
)
MLK-16089: mtd: gpmi-nand: calculate the correct free oob space for large oob layout...
author
Han Xu
<han.xu@nxp.com>
Thu, 27 Jul 2017 02:20:00 +0000
(21:20 -0500)
committer
Nitin Garg
<nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:33:54 +0000
(15:33 -0500)
for the large oob layout setting, need to calculate the correct free oob
space.
Signed-off-by: Han Xu <han.xu@nxp.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index
6ca449e
..
2a93177
100644
(file)
--- 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;
/*