diff options
author | Michael Neuling <mikey@neuling.org> | 2013-11-28 22:22:48 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-12-05 00:08:22 -0500 |
commit | 2c49195b6aedd21ff1cd1e095fab9866fba3411b (patch) | |
tree | 1ae7a913b17bba36135416b69caff5420e0ff283 | |
parent | 0150a3dd92fc45b599bf2442b47d40921b4aa2d2 (diff) |
powernv: Remove get/set_rtc_time when they are not present
Currently we continue to poll get/set_rtc_time even when we know they
are not working.
This changes it so that if it fails at boot time we remove the ppc_md
get/set_rtc_time hooks so that we don't end up polling known broken
calls.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-rtc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-rtc.c b/arch/powerpc/platforms/powernv/opal-rtc.c index 7d07c7e80ec0..b1885db8fdf3 100644 --- a/arch/powerpc/platforms/powernv/opal-rtc.c +++ b/arch/powerpc/platforms/powernv/opal-rtc.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <asm/opal.h> | 19 | #include <asm/opal.h> |
20 | #include <asm/firmware.h> | 20 | #include <asm/firmware.h> |
21 | #include <asm/machdep.h> | ||
21 | 22 | ||
22 | static void opal_to_tm(u32 y_m_d, u64 h_m_s_ms, struct rtc_time *tm) | 23 | static void opal_to_tm(u32 y_m_d, u64 h_m_s_ms, struct rtc_time *tm) |
23 | { | 24 | { |
@@ -48,8 +49,11 @@ unsigned long __init opal_get_boot_time(void) | |||
48 | else | 49 | else |
49 | mdelay(10); | 50 | mdelay(10); |
50 | } | 51 | } |
51 | if (rc != OPAL_SUCCESS) | 52 | if (rc != OPAL_SUCCESS) { |
53 | ppc_md.get_rtc_time = NULL; | ||
54 | ppc_md.set_rtc_time = NULL; | ||
52 | return 0; | 55 | return 0; |
56 | } | ||
53 | y_m_d = be32_to_cpu(__y_m_d); | 57 | y_m_d = be32_to_cpu(__y_m_d); |
54 | h_m_s_ms = be64_to_cpu(__h_m_s_ms); | 58 | h_m_s_ms = be64_to_cpu(__h_m_s_ms); |
55 | opal_to_tm(y_m_d, h_m_s_ms, &tm); | 59 | opal_to_tm(y_m_d, h_m_s_ms, &tm); |