[PATCH 1/3] Fix imx_nand_set_layout for i.MX27

Eric Benard eric at eukrea.com
Wed Dec 9 08:55:14 EST 2009


FMCR is (*((volatile u32 *)(x))) (0x10027814) and thus this leads
to a data abort.

Signed-off-by: Eric Benard <eric at eukrea.com>
---
 arch/arm/mach-imx/nand.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/nand.c b/arch/arm/mach-imx/nand.c
index 5b5f78b..01b8058 100644
--- a/arch/arm/mach-imx/nand.c
+++ b/arch/arm/mach-imx/nand.c
@@ -68,7 +68,7 @@ void imx_nand_set_layout(int writesize, int datawidth)
 {
 	unsigned int fmcr;
 
-	fmcr = readl(FMCR);
+	fmcr = FMCR;
 
 	switch (writesize) {
 	case 512:
@@ -92,7 +92,7 @@ void imx_nand_set_layout(int writesize, int datawidth)
 		break;
 	}
 
-	writel(fmcr, FMCR);
+	FMCR = fmcr;
 }
 
 #else
-- 
1.6.3.3






More information about the u-boot-v2 mailing list