]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: nand: fsl_ifc: Fix eccstat array overflow for IFC ver >= 2.0.0
authorJagdish Gediya <jagdish.gediya@nxp.com>
Fri, 23 Mar 2018 21:25:51 +0000 (02:55 +0530)
committerYork Sun <york.sun@nxp.com>
Wed, 9 May 2018 14:17:51 +0000 (09:17 -0500)
commitf195fad178979020b226671cafec9f9592860174
tree8868aaa5652d128ebd5b45347a8103573d5fae60
parent1f553564116f47e4730e1cadbcf9bc24e550cfa6
mtd: nand: fsl_ifc: Fix eccstat array overflow for IFC ver >= 2.0.0

Number of ECC status registers i.e. (ECCSTATx) has been increased in
IFC version 2.0.0 due to increase in SRAM size. This is causing
eccstat array to over flow.

So, replace eccstat array with u32 variable to make it fail-safe and
independent of number of ECC status registers or SRAM size.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/mtd/nand/fsl_ifc_nand.c
include/fsl_ifc.h