projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fe4f90
)
mtd: nand: gpmi: get correct free oob space
author
Han Xu
<han.xu@nxp.com>
Tue, 12 Apr 2016 22:06:33 +0000
(17:06 -0500)
committer
Boris Brezillon
<boris.brezillon@free-electrons.com>
Fri, 23 Sep 2016 07:35:16 +0000
(09:35 +0200)
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>
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
6e46156
..
6c062b8
100644
(file)
--- a/
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@
-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;
/*