mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 04:34:22 +08:00
nand, gpmc: fix reading after switching ecc
The omap_gpmc allows switching ecc at runtime. Since the NAND_SUBPAGE_READ flag is only set, it is kept when switching to hw ecc, which is not correct. This leads to calling chip->ecc.read_subpage which is not a valid pointer. Therefore clear the flag when switching ecc so reading in hw mode works again. Cc: Scott Wood <scottwood@freescale.com> Cc: Pekon Gupta <pekon@ti.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
This commit is contained in:
parent
09b72d692f
commit
13fbde6e4f
@ -933,6 +933,7 @@ int __maybe_unused omap_nand_switch_ecc(uint32_t hardware, uint32_t eccstrength)
|
||||
mtd = &nand_info[nand_curr_device];
|
||||
nand = mtd->priv;
|
||||
nand->options |= NAND_OWN_BUFFERS;
|
||||
nand->options &= ~NAND_SUBPAGE_READ;
|
||||
/* Setup the ecc configurations again */
|
||||
if (hardware) {
|
||||
if (eccstrength == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user