[PATCH] MX21: Fix nand booting
Ivo Clarysse
ivo.clarysse at gmail.com
Mon Mar 22 10:57:47 EDT 2010
Fixes booting from NAND on i.MX21-based systems.
Signed-off-by: Ivo Clarysse <ivo.clarysse at gmail.com>
---
diff --git a/drivers/nand/nand_imx.c b/drivers/nand/nand_imx.c
index afd5637..2eac6fe 100644
--- a/drivers/nand/nand_imx.c
+++ b/drivers/nand/nand_imx.c
@@ -1085,12 +1085,18 @@ void __nand_boot_init imx_nand_load_image(void
*dest, int size)
writew(0x4, host.regs + NFC_WRPROT);
tmp = readw(host.regs + NFC_CONFIG1);
+#ifdef CONFIG_ARCH_IMX21
+ tmp |= NFC_ECC_EN;
+ tmp &= ~NFC_INT_MSK;
+ writew(tmp, host.regs + NFC_CONFIG1);
+#else
tmp |= NFC_ECC_EN | NFC_INT_MSK;
if (nfc_is_v21())
/* currently no support for 218 byte OOB with stronger ECC */
tmp |= NFC_ECC_MODE;
tmp &= ~NFC_SP_EN;
writew(tmp, host.regs + NFC_CONFIG1);
+#endif /* CONFIG_ARCH_IMX21 */
if (nfc_is_v21()) {
if (host.pagesize_2k) {
More information about the barebox
mailing list