Commit a6d08b7f authored by David Mosberger's avatar David Mosberger

Update EFI RTC driver to version 0.3.

parent 0cc6379a
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/system.h> #include <asm/system.h>
#define EFI_RTC_VERSION "0.2" #define EFI_RTC_VERSION "0.3"
#define EFI_ISDST (EFI_TIME_ADJUST_DAYLIGHT|EFI_TIME_IN_DAYLIGHT) #define EFI_ISDST (EFI_TIME_ADJUST_DAYLIGHT|EFI_TIME_IN_DAYLIGHT)
/* /*
...@@ -315,17 +315,12 @@ efi_rtc_get_status(char *buf) ...@@ -315,17 +315,12 @@ efi_rtc_get_status(char *buf)
spin_unlock_irqrestore(&efi_rtc_lock,flags); spin_unlock_irqrestore(&efi_rtc_lock,flags);
p += sprintf(p, p += sprintf(p,
"Time :\n" "Time : %u:%u:%u.%09u\n"
"Year : %u\n" "Date : %u-%u-%u\n"
"Month : %u\n"
"Day : %u\n"
"Hour : %u\n"
"Minute : %u\n"
"Second : %u\n"
"Nanosecond: %u\n"
"Daylight : %u\n", "Daylight : %u\n",
eft.year, eft.month, eft.day, eft.hour, eft.minute, eft.hour, eft.minute, eft.second, eft.nanosecond,
eft.second, eft.nanosecond, eft.daylight); eft.year, eft.month, eft.day,
eft.daylight);
if ( eft.timezone == EFI_UNSPECIFIED_TIMEZONE) if ( eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
p += sprintf(p, "Timezone : unspecified\n"); p += sprintf(p, "Timezone : unspecified\n");
...@@ -335,36 +330,30 @@ efi_rtc_get_status(char *buf) ...@@ -335,36 +330,30 @@ efi_rtc_get_status(char *buf)
p += sprintf(p, p += sprintf(p,
"\nWakeup Alm:\n" "Alarm Time : %u:%u:%u.%09u\n"
"Alarm Date : %u-%u-%u\n"
"Alarm Daylight : %u\n"
"Enabled : %s\n" "Enabled : %s\n"
"Pending : %s\n" "Pending : %s\n",
"Year : %u\n" alm.hour, alm.minute, alm.second, alm.nanosecond,
"Month : %u\n" alm.year, alm.month, alm.day,
"Day : %u\n" alm.daylight,
"Hour : %u\n" enabled == 1 ? "yes" : "no",
"Minute : %u\n" pending == 1 ? "yes" : "no");
"Second : %u\n"
"Nanosecond: %u\n"
"Daylight : %u\n",
enabled == 1 ? "Yes" : "No",
pending == 1 ? "Yes" : "No",
alm.year, alm.month, alm.day, alm.hour, alm.minute,
alm.second, alm.nanosecond, alm.daylight);
if ( eft.timezone == EFI_UNSPECIFIED_TIMEZONE) if ( eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
p += sprintf(p, "Timezone : unspecified\n"); p += sprintf(p, "Timezone : unspecified\n");
else else
/* XXX fixme: convert to string? */ /* XXX fixme: convert to string? */
p += sprintf(p, "Timezone : %u\n", eft.timezone); p += sprintf(p, "Timezone : %u\n", alm.timezone);
/* /*
* now prints the capabilities * now prints the capabilities
*/ */
p += sprintf(p, p += sprintf(p,
"\nClock Cap :\n" "Resolution : %u\n"
"Resolution: %u\n"
"Accuracy : %u\n" "Accuracy : %u\n"
"SetstoZero: %u\n", "SetstoZero : %u\n",
cap.resolution, cap.accuracy, cap.sets_to_zero); cap.resolution, cap.accuracy, cap.sets_to_zero);
return p - buf; return p - buf;
...@@ -390,7 +379,7 @@ efi_rtc_init(void) ...@@ -390,7 +379,7 @@ efi_rtc_init(void)
misc_register(&efi_rtc_dev); misc_register(&efi_rtc_dev);
create_proc_read_entry ("efirtc", 0, NULL, efi_rtc_read_proc, NULL); create_proc_read_entry ("driver/efirtc", 0, NULL, efi_rtc_read_proc, NULL);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment