OMAP3: Change mem_ok to clear again after reading back
authorTom Rini <trini@ti.com>
Fri, 18 Nov 2011 12:48:01 +0000 (12:48 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 6 Dec 2011 22:59:38 +0000 (23:59 +0100)
It's possible to need to call this function on the same banks multiple
times so we want to be sure that 'pos A' is cleared out again at the
end.

Signed-off-by: Tom Rini <trini@ti.com>
arch/arm/cpu/armv7/omap3/mem.c

index 2f1efea49b7060c24ac00398638416f4c48f3fdc..2fe5ac7c3946d4a8f4b09d7dcc85ce441c47bfce 100644 (file)
@@ -86,6 +86,7 @@ u32 mem_ok(u32 cs)
        writel(0x0, addr + 4);          /* remove pattern off the bus */
        val1 = readl(addr + 0x400);     /* get pos A value */
        val2 = readl(addr);             /* get val2 */
+       writel(0x0, addr + 0x400);      /* clear pos A */
 
        if ((val1 != 0) || (val2 != pattern))   /* see if pos A val changed */
                return 0;