public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] bug, nand, am33xx: nand->ecc.strength not set in board_nand_init()
@ 2013-06-04  8:52 Heiko Schocher
  2013-06-04 16:48 ` Scott Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Schocher @ 2013-06-04  8:52 UTC (permalink / raw)
  To: u-boot

commit dfe64e2c89731a3f9950d7acd8681b68df2bae03
Author: Sergey Lapin <slapin@ossfans.org>
Date:   Mon Jan 14 03:46:50 2013 +0000

    mtd: resync with Linux-3.7.1

Introduced runtime bug:

U-Boot 2013.04-00499-g46567df-dirty (Jun 04 2013 - 08:17:08)

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  BUG: failure at nand_base.c:3214/nand_scan_tail()!
BUG!
resetting ...

on boards using drivers/mtd/nand/omap_gpmc.c as in board_nand_init()
nand->ecc.strength is not set. Fix this!

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
---
 drivers/mtd/nand/omap_gpmc.c | 2 ++
 1 Datei ge?ndert, 2 Zeilen hinzugef?gt(+)

diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index d5f3248..5d08822 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -936,6 +936,7 @@ int board_nand_init(struct nand_chip *nand)
 	nand->ecc.layout = &hw_bch8_nand_oob;
 	nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE;
 	nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES;
+	nand->ecc.strength = 8;
 	nand->ecc.hwctl = omap_enable_ecc_bch;
 	nand->ecc.correct = omap_correct_data_bch;
 	nand->ecc.calculate = omap_calculate_ecc_bch;
@@ -954,6 +955,7 @@ int board_nand_init(struct nand_chip *nand)
 	nand->ecc.hwctl = omap_enable_hwecc;
 	nand->ecc.correct = omap_correct_data;
 	nand->ecc.calculate = omap_calculate_ecc;
+	nand->ecc.strength = 1;
 	omap_hwecc_init(nand);
 #endif
 #endif
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] bug, nand, am33xx: nand->ecc.strength not set in board_nand_init()
  2013-06-04  8:52 [U-Boot] bug, nand, am33xx: nand->ecc.strength not set in board_nand_init() Heiko Schocher
@ 2013-06-04 16:48 ` Scott Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Wood @ 2013-06-04 16:48 UTC (permalink / raw)
  To: u-boot

On 06/04/2013 03:52:32 AM, Heiko Schocher wrote:
> commit dfe64e2c89731a3f9950d7acd8681b68df2bae03
> Author: Sergey Lapin <slapin@ossfans.org>
> Date:   Mon Jan 14 03:46:50 2013 +0000
> 
>     mtd: resync with Linux-3.7.1
> 
> Introduced runtime bug:
> 
> U-Boot 2013.04-00499-g46567df-dirty (Jun 04 2013 - 08:17:08)
> 
> I2C:   ready
> DRAM:  512 MiB
> WARNING: Caches not enabled
> NAND:  BUG: failure at nand_base.c:3214/nand_scan_tail()!
> BUG!
> resetting ...
> 
> on boards using drivers/mtd/nand/omap_gpmc.c as in board_nand_init()
> nand->ecc.strength is not set. Fix this!

Thanks, applied to u-boot-nand-flash.  We did try to update all the  
existing drivers to do this.  Omap_gpmc did get updated, but it was  
incomplete, as unlike most drivers, it has two different places where  
this stuff gets initialized (the actual init, and the ecc switch  
command).

-Scott

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-04 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04  8:52 [U-Boot] bug, nand, am33xx: nand->ecc.strength not set in board_nand_init() Heiko Schocher
2013-06-04 16:48 ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox