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,56 +315,45 @@ efi_rtc_get_status(char *buf) ...@@ -315,56 +315,45 @@ 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" "Daylight : %u\n",
"Day : %u\n" eft.hour, eft.minute, eft.second, eft.nanosecond,
"Hour : %u\n" eft.year, eft.month, eft.day,
"Minute : %u\n" eft.daylight);
"Second : %u\n"
"Nanosecond: %u\n"
"Daylight : %u\n",
eft.year, eft.month, eft.day, eft.hour, eft.minute,
eft.second, eft.nanosecond, 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");
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", eft.timezone);
p += sprintf(p, p += sprintf(p,
"\nWakeup Alm:\n" "Alarm Time : %u:%u:%u.%09u\n"
"Enabled : %s\n" "Alarm Date : %u-%u-%u\n"
"Pending : %s\n" "Alarm Daylight : %u\n"
"Year : %u\n" "Enabled : %s\n"
"Month : %u\n" "Pending : %s\n",
"Day : %u\n" alm.hour, alm.minute, alm.second, alm.nanosecond,
"Hour : %u\n" alm.year, alm.month, alm.day,
"Minute : %u\n" alm.daylight,
"Second : %u\n" enabled == 1 ? "yes" : "no",
"Nanosecond: %u\n" pending == 1 ? "yes" : "no");
"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