From: Eugen.Hristev at microchip.com Date: Fri, 24 May 2019 06:54:53 +0000 Subject: [U-Boot] [PATCH] configs: sama5d2_ptc_ek: fix NAND PMECC_CAP In-Reply-To: <20190515091228.20017-1-tudor.ambarus@microchip.com> References: <20190515091228.20017-1-tudor.ambarus@microchip.com> Message-ID: <2bb15e5d-c308-50f8-9eb1-ca6cb3cc7937@microchip.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 15.05.2019 12:12, Tudor Ambarus - M18064 wrote: > From: Tudor Ambarus > > CONFIG_PMECC_CAP has a higher priority than its ONFI detected > parameter and will overwrite it when defined. As per commit > 49ad40298cc5, CONFIG_PMECC_CAP has a default value of 2 if not > otherwise stated. This results in the overwriting of the ONFI ECC > bits value. The following errors are seen when booting the kernel > from the nand flash: > > Loading Environment from NAND... PMECC: Too many errors > NAND read from offset 140000 failed -74 > *** Warning - some problems detected reading environment; recovered successfully > *** Warning - bad CRC, using default environment > > In: serial > Out: serial > Err: serial > Net: eth0: ethernet at f8008000 > Hit any key to stop autoboot: 0 > > NAND read: device 0 offset 0x180000, size 0x80000 > PMECC: Too many errors > NAND read from offset 180000 failed -74 > 0 bytes read: ERROR > > NAND read: device 0 offset 0x200000, size 0x600000 > PMECC: Too many errors > NAND read from offset 200000 failed -74 > 0 bytes read: ERROR > Bad Linux ARM zImage magic! > > Fix it by setting the right value for ECC bits. > > Fixes: 49ad40298cc5 ("ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig") > Signed-off-by: Tudor Ambarus Applied to u-boot-atmel/master, thanks !