* [U-Boot] [PATCH] mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND
@ 2014-09-25 19:13 Marek Vasut
2014-10-30 10:02 ` Stefano Babic
0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2014-09-25 19:13 UTC (permalink / raw)
To: u-boot
Add ECC geometry for NAND which has 2048b pagesize and 112b OOB
size. This is for example Macronix MX30LF2G28AB chip.
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/mtd/nand/mxs_nand.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 036c113..7a064ab 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -146,8 +146,13 @@ static uint32_t mxs_nand_aux_status_offset(void)
static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
uint32_t page_oob_size)
{
- if (page_data_size == 2048)
- return 8;
+ if (page_data_size == 2048) {
+ if (page_oob_size == 64)
+ return 8;
+
+ if (page_oob_size == 112)
+ return 14;
+ }
if (page_data_size == 4096) {
if (page_oob_size == 128)
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND
2014-09-25 19:13 [U-Boot] [PATCH] mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND Marek Vasut
@ 2014-10-30 10:02 ` Stefano Babic
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2014-10-30 10:02 UTC (permalink / raw)
To: u-boot
On 25/09/2014 21:13, Marek Vasut wrote:
> Add ECC geometry for NAND which has 2048b pagesize and 112b OOB
> size. This is for example Macronix MX30LF2G28AB chip.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-30 10:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 19:13 [U-Boot] [PATCH] mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND Marek Vasut
2014-10-30 10:02 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox