summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2012-08-13 22:49:42 +0200
committerScott Wood <scottwood@freescale.com>2012-09-17 19:42:46 -0500
commitc1db8dd62b337372a08942e1c5945a8590afbc58 (patch)
tree62cff26c6d18c4d7ac88ce615fbdc6f9d10475aa /drivers/mtd
parent0e55ad7271259b1de183fb5329ea7f07774e368d (diff)
downloadu-boot-imx-c1db8dd62b337372a08942e1c5945a8590afbc58.zip
u-boot-imx-c1db8dd62b337372a08942e1c5945a8590afbc58.tar.gz
u-boot-imx-c1db8dd62b337372a08942e1c5945a8590afbc58.tar.bz2
mxc nand: Access all ecc_status_result fields
On the NFC IP 1.1, the 32-bit ecc_status_result value comes from 2 consecutive 16-bit registers. This patch reads all the fields of this value, which makes a difference for 4-kiB NF pages. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/mxc_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 62d8c6b..4564b25 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -653,7 +653,7 @@ static int mxc_nand_correct_data(struct mtd_info *mtd, u_char *dat,
{
struct nand_chip *nand_chip = mtd->priv;
struct mxc_nand_host *host = nand_chip->priv;
- uint16_t ecc_status = readw(&host->regs->ecc_status_result);
+ uint32_t ecc_status = readl(&host->regs->ecc_status_result);
int subpages = mtd->writesize / nand_chip->subpagesize;
int pg2blk_shift = nand_chip->phys_erase_shift -
nand_chip->page_shift;