Re: [PATCH 01/10] i.MX Nand: Set correct datawidth/pagesize in CCM module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Sascha,

Sascha Hauer a écrit :
+void imx_nand_set_layout(int writesize, int datawidth)
+{
+	unsigned int fmcr;
+
+	fmcr = readl(FMCR);
+
are you sure this works ?
FMCR is (*((volatile u32 *)(x))) (0x10027814) and thus this leads to a date abort.

here is the fix (at least on my imx27 board) :

Signed-off-by: Eric Benard <eric@xxxxxxxxxx>

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


Eric

_______________________________________________
u-boot-v2 mailing list
u-boot-v2@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/u-boot-v2


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux