init/calibrate: Fix bug in calibrate_delay
authorJouni Hogander <jouni.hogander@intel.com>
Tue, 19 Jun 2012 11:03:21 +0000 (14:03 +0300)
committerbuildbot <buildbot@intel.com>
Thu, 21 Jun 2012 20:24:40 +0000 (13:24 -0700)
BZ: 41942

There is a bug in calibrate_delay which causes delay calibration to be
performed on nonboot cpus when waking up from S3. This has huge impact on
screen resume latency. Fix this by correcting errorneous else if statement.

Change-Id: I57d0bd83f44d58ed8abe5e8aab7b34b00de04e2f
Signed-off-by: Jouni Hogander <jouni.hogander@intel.com>
Reviewed-on: http://android.intel.com:8080/53297
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Reviewed-by: Mansoor, Illyas <illyas.mansoor@intel.com>
Reviewed-by: Yang, Fei <fei.yang@intel.com>
Tested-by: Ng, Cheon-woei <cheon-woei.ng@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
init/calibrate.c

index aae2f40..d9cfd7b 100644 (file)
@@ -253,10 +253,11 @@ void __cpuinit calibrate_delay(void)
                if (!printed)
                        pr_info("Calibrating delay loop (skipped) "
                                "preset value.. ");
-       } else if ((!printed) && lpj_fine) {
+       } else if (lpj_fine) {
                lpj = lpj_fine;
-               pr_info("Calibrating delay loop (skipped), "
-                       "value calculated using timer frequency.. ");
+               if (!printed)
+                       pr_info("Calibrating delay loop (skipped), "
+                               "value calculated using timer frequency.. ");
        } else if ((lpj = calibrate_delay_direct()) != 0) {
                if (!printed)
                        pr_info("Calibrating delay using timer "