From: Michael Neuling Date: Fri, 18 Dec 2015 10:46:04 +0000 (+1100) Subject: powerpc/powernv: Only delay opal_rtc_read() retry when necessary X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57a9039052aadf5833c40ab494d30d3755660a48;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc/powernv: Only delay opal_rtc_read() retry when necessary Only delay opal_rtc_read() when busy and are going to retry. This has the advantage of possibly saving a massive 10ms off booting! Kudos to Stewart for noticing. Signed-off-by: Michael Neuling Reviewed-by: Stewart Smith Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/platforms/powernv/opal-rtc.c b/arch/powerpc/platforms/powernv/opal-rtc.c index 1b149c92fca1..f8868864f373 100644 --- a/arch/powerpc/platforms/powernv/opal-rtc.c +++ b/arch/powerpc/platforms/powernv/opal-rtc.c @@ -50,7 +50,7 @@ unsigned long __init opal_get_boot_time(void) rc = opal_rtc_read(&__y_m_d, &__h_m_s_ms); if (rc == OPAL_BUSY_EVENT) opal_poll_events(NULL); - else + else if (rc == OPAL_BUSY) mdelay(10); } if (rc != OPAL_SUCCESS)