Merge tag 'u-boot-imx-20190101' of git://www.denx.de/git/u-boot-imx
[oweals/u-boot.git] / arch / arm / mach-omap2 / omap3 / emif4.c
index d540cf08d2e710f022ab28d5d9c83df8bc479c15..a8bd428e0c45a660520d4559a9af4af99d635be1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Author :
  *     Vaibhav Hiremath <hvaibhav@ti.com>
@@ -6,8 +7,6 @@
  *
  * Copyright (C) 2010
  * Texas Instruments Incorporated - http://www.ti.com/
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -76,7 +75,7 @@ static void do_emif4_init(void)
        regval |= (1<<10);
        writel(regval, &emif4_base->sdram_iodft_tlgc);
        /*Wait till that bit clears*/
-       while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1);
+       while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) != 0x0);
        /*Re-verify the DDR PHY status*/
        while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0);