summaryrefslogtreecommitdiff
path: root/nand_spl
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 /nand_spl
parent0e55ad7271259b1de183fb5329ea7f07774e368d (diff)
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 'nand_spl')
-rw-r--r--nand_spl/nand_boot_fsl_nfc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nand_spl/nand_boot_fsl_nfc.c b/nand_spl/nand_boot_fsl_nfc.c
index 842943c651..4c5a7feec1 100644
--- a/nand_spl/nand_boot_fsl_nfc.c
+++ b/nand_spl/nand_boot_fsl_nfc.c
@@ -139,7 +139,11 @@ static void nfc_nand_data_output(void)
static int nfc_nand_check_ecc(void)
{
+#if defined(MXC_NFC_V1)
return readw(&nfc->ecc_status_result);
+#elif defined(MXC_NFC_V1_1)
+ return readl(&nfc->ecc_status_result);
+#endif
}
static void nfc_nand_read_page(unsigned int page_address)