ARM: OMAP2+: SmartReflex: introduce a busy loop condition test macro
[linux-2.6-block.git] / arch / arm / mach-omap2 / smartreflex.c
index d8592771838f03937522a95a6de50adfb688e1e4..acef08d837cc52bae6f101af40ae6c891a75d045 100644 (file)
@@ -289,9 +289,9 @@ static void sr_v1_disable(struct omap_sr *sr)
         * Wait for SR to be disabled.
         * wait until ERRCONFIG.MCUDISACKINTST = 1. Typical latency is 1us.
         */
-       omap_test_timeout((sr_read_reg(sr, ERRCONFIG_V1) &
-                       ERRCONFIG_MCUDISACKINTST), SR_DISABLE_TIMEOUT,
-                       timeout);
+       sr_test_cond_timeout((sr_read_reg(sr, ERRCONFIG_V1) &
+                            ERRCONFIG_MCUDISACKINTST), SR_DISABLE_TIMEOUT,
+                            timeout);
 
        if (timeout >= SR_DISABLE_TIMEOUT)
                dev_warn(&sr->pdev->dev, "%s: Smartreflex disable timedout\n",
@@ -334,9 +334,9 @@ static void sr_v2_disable(struct omap_sr *sr)
         * Wait for SR to be disabled.
         * wait until IRQSTATUS.MCUDISACKINTST = 1. Typical latency is 1us.
         */
-       omap_test_timeout((sr_read_reg(sr, IRQSTATUS) &
-                       IRQSTATUS_MCUDISABLEACKINT), SR_DISABLE_TIMEOUT,
-                       timeout);
+       sr_test_cond_timeout((sr_read_reg(sr, IRQSTATUS) &
+                            IRQSTATUS_MCUDISABLEACKINT), SR_DISABLE_TIMEOUT,
+                            timeout);
 
        if (timeout >= SR_DISABLE_TIMEOUT)
                dev_warn(&sr->pdev->dev, "%s: Smartreflex disable timedout\n",