diff options
author | Daniel Kiper <daniel.kiper@oracle.com> | 2014-06-30 13:53:04 -0400 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2014-07-18 16:23:59 -0400 |
commit | f383d00a0d1f94a7d60c753ec8e3e402889f9622 (patch) | |
tree | c56b561c2d7f5edb858c8e08daba3563907d41a5 | |
parent | 9402973d49d9a4bc463bba4f609bf8d8247f79e2 (diff) |
arch/x86: Remove efi_set_rtc_mmss()
efi_set_rtc_mmss() is never used to set RTC due to bugs found
on many EFI platforms. It is set directly by mach_set_rtc_mmss().
Hence, remove unused efi_set_rtc_mmss() function.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | arch/x86/platform/efi/efi.c | 36 | ||||
-rw-r--r-- | include/linux/efi.h | 1 |
2 files changed, 0 insertions, 37 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 85fb16cd6479..850da94fef30 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -104,42 +104,6 @@ static efi_status_t __init phys_efi_set_virtual_address_map( | |||
104 | return status; | 104 | return status; |
105 | } | 105 | } |
106 | 106 | ||
107 | int efi_set_rtc_mmss(const struct timespec *now) | ||
108 | { | ||
109 | unsigned long nowtime = now->tv_sec; | ||
110 | efi_status_t status; | ||
111 | efi_time_t eft; | ||
112 | efi_time_cap_t cap; | ||
113 | struct rtc_time tm; | ||
114 | |||
115 | status = efi.get_time(&eft, &cap); | ||
116 | if (status != EFI_SUCCESS) { | ||
117 | pr_err("Oops: efitime: can't read time!\n"); | ||
118 | return -1; | ||
119 | } | ||
120 | |||
121 | rtc_time_to_tm(nowtime, &tm); | ||
122 | if (!rtc_valid_tm(&tm)) { | ||
123 | eft.year = tm.tm_year + 1900; | ||
124 | eft.month = tm.tm_mon + 1; | ||
125 | eft.day = tm.tm_mday; | ||
126 | eft.minute = tm.tm_min; | ||
127 | eft.second = tm.tm_sec; | ||
128 | eft.nanosecond = 0; | ||
129 | } else { | ||
130 | pr_err("%s: Invalid EFI RTC value: write of %lx to EFI RTC failed\n", | ||
131 | __func__, nowtime); | ||
132 | return -1; | ||
133 | } | ||
134 | |||
135 | status = efi.set_time(&eft); | ||
136 | if (status != EFI_SUCCESS) { | ||
137 | pr_err("Oops: efitime: can't write time!\n"); | ||
138 | return -1; | ||
139 | } | ||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | void efi_get_time(struct timespec *now) | 107 | void efi_get_time(struct timespec *now) |
144 | { | 108 | { |
145 | efi_status_t status; | 109 | efi_status_t status; |
diff --git a/include/linux/efi.h b/include/linux/efi.h index c7a29a26e900..59c8acfebca7 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -873,7 +873,6 @@ extern int __init efi_uart_console_only (void); | |||
873 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 873 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
874 | struct resource *data_resource, struct resource *bss_resource); | 874 | struct resource *data_resource, struct resource *bss_resource); |
875 | extern void efi_get_time(struct timespec *now); | 875 | extern void efi_get_time(struct timespec *now); |
876 | extern int efi_set_rtc_mmss(const struct timespec *now); | ||
877 | extern void efi_reserve_boot_services(void); | 876 | extern void efi_reserve_boot_services(void); |
878 | extern int efi_get_fdt_params(struct efi_fdt_params *params, int verbose); | 877 | extern int efi_get_fdt_params(struct efi_fdt_params *params, int verbose); |
879 | extern struct efi_memory_map memmap; | 878 | extern struct efi_memory_map memmap; |