Commit a097a35c authored by Segher Boessenkool's avatar Segher Boessenkool Committed by Paul Mackerras

[PATCH] powerpc: Maple: request I/O resource.

Reserve the Maple RTC I/O resource.  Needed now we use genrtc.
Signed-off-by: default avatarSegher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 68643cfb
...@@ -158,6 +158,11 @@ int maple_set_rtc_time(struct rtc_time *tm) ...@@ -158,6 +158,11 @@ int maple_set_rtc_time(struct rtc_time *tm)
return 0; return 0;
} }
static struct resource rtc_iores = {
.name = "rtc",
.flags = IORESOURCE_BUSY,
};
unsigned long __init maple_get_boot_time(void) unsigned long __init maple_get_boot_time(void)
{ {
struct rtc_time tm; struct rtc_time tm;
...@@ -173,6 +178,10 @@ unsigned long __init maple_get_boot_time(void) ...@@ -173,6 +178,10 @@ unsigned long __init maple_get_boot_time(void)
"legacy address (0x%x)\n", maple_rtc_addr); "legacy address (0x%x)\n", maple_rtc_addr);
} }
rtc_iores.start = maple_rtc_addr;
rtc_iores.end = maple_rtc_addr + 7;
request_resource(&ioport_resource, &rtc_iores);
maple_get_rtc_time(&tm); maple_get_rtc_time(&tm);
return mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, return mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec); tm.tm_hour, tm.tm_min, tm.tm_sec);
......
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