]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: emif4: wait for CM_DLL_READYST to be set
authorJeroen Hofstee <jeroen@myspectrum.nl>
Wed, 18 Jun 2014 19:22:35 +0000 (21:22 +0200)
committerTom Rini <trini@ti.com>
Mon, 7 Jul 2014 23:42:33 +0000 (19:42 -0400)
The code intends for the CM_DLL_READYST to be set, but
actually polls till any bit is set since the logical
AND is used instead of the bitwise one is used. Fix it.

cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
arch/arm/cpu/armv7/am33xx/emif4.c

index a7a3e88cd75b3d31f63311f3beebb175f2ea838f..8b7527c5b400a0c574f6ad0d47bfb7743b2ac31d 100644 (file)
@@ -115,7 +115,7 @@ void config_ddr(unsigned int pll, const struct ctrl_ioregs *ioregs,
 #endif
 #ifdef CONFIG_AM43XX
        writel(readl(&cm_device->cm_dll_ctrl) & ~0x1, &cm_device->cm_dll_ctrl);
-       while ((readl(&cm_device->cm_dll_ctrl) && CM_DLL_READYST) == 0)
+       while ((readl(&cm_device->cm_dll_ctrl) & CM_DLL_READYST) == 0)
                ;
        writel(0x80000000, &ddrctrl->ddrioctrl);