14 #include <linux/errno.h>
15 #include <linux/sched.h>
16 #include <linux/kernel.h>
18 #include <linux/string.h>
21 #include <linux/time.h>
22 #include <linux/adb.h>
23 #include <linux/pmu.h>
28 #include <asm/sections.h>
31 #include <asm/pgtable.h>
32 #include <asm/machdep.h>
38 #define DBG(x...) printk(x)
43 static int maple_rtc_addr;
45 static int maple_clock_read(
int addr)
47 outb_p(addr, maple_rtc_addr);
48 return inb_p(maple_rtc_addr+1);
51 static void maple_clock_write(
unsigned long val,
int addr)
53 outb_p(addr, maple_rtc_addr);
54 outb_p(val, maple_rtc_addr+1);
77 if ((tm->
tm_year + 1900) < 1970)
85 unsigned char save_control, save_freq_select;
135 static struct resource rtc_iores = {
157 maple_rtc_addr = r.
start;
162 if (maple_rtc_addr == 0) {
165 "legacy address (0x%x)\n", maple_rtc_addr);
168 rtc_iores.
start = maple_rtc_addr;
169 rtc_iores.
end = maple_rtc_addr + 7;