16 #include <linux/kernel.h>
17 #include <linux/module.h>
18 #include <linux/time.h>
20 #include <linux/rtc.h>
23 #define EFI_ISDST (EFI_TIME_ADJUST_DAYLIGHT|EFI_TIME_IN_DAYLIGHT)
27 #define EFI_RTC_EPOCH 1998
49 if (eft->
year < 1998) {
55 ndays += 365 + (is_leap_year(y) ? 1 : 0);
57 ndays += compute_yday(eft);
62 return (ndays + 4) % 7;
82 memset(wtime, 0,
sizeof(*wtime));
91 wtime->
tm_wday = compute_wday(eft);
94 wtime->
tm_yday = compute_yday(eft);
123 convert_from_efi_time(&eft, &wkalrm->
time);
133 convert_to_efi_time(&wkalrm->
time, &eft);
164 convert_from_efi_time(&eft, tm);
174 convert_to_efi_time(tm, &eft);
182 .read_time = efi_read_time,
183 .set_time = efi_set_time,
184 .read_alarm = efi_read_alarm,
185 .set_alarm = efi_set_alarm,
197 platform_set_drvdata(dev, rtc);
204 struct rtc_device *rtc = platform_get_drvdata(dev);
219 static int __init efi_rtc_init(
void)
224 static void __exit efi_rtc_exit(
void)