提交 40f7f9c1 编写于 作者: F Finn Thain 提交者: Geert Uytterhoeven

m68k: Reinstate mac rtc

Reinstate the Mac hardware clock for CUDA ADB and Mac II ADB models.
It doesn't work properly on Mac IIsi ADB and PMU ADB yet, so leave them 
out.
Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 4a6908a3
...@@ -162,10 +162,7 @@ void __init config_mac(void) ...@@ -162,10 +162,7 @@ void __init config_mac(void)
mach_init_IRQ = mac_init_IRQ; mach_init_IRQ = mac_init_IRQ;
mach_get_model = mac_get_model; mach_get_model = mac_get_model;
mach_gettimeoffset = mac_gettimeoffset; mach_gettimeoffset = mac_gettimeoffset;
#warning move to adb/via init
#if 0
mach_hwclk = mac_hwclk; mach_hwclk = mac_hwclk;
#endif
mach_set_clock_mmss = mac_set_clock_mmss; mach_set_clock_mmss = mac_set_clock_mmss;
mach_reset = mac_reset; mach_reset = mac_reset;
mach_halt = mac_poweroff; mach_halt = mac_poweroff;
......
...@@ -93,7 +93,7 @@ static void cuda_write_pram(int offset, __u8 data) ...@@ -93,7 +93,7 @@ static void cuda_write_pram(int offset, __u8 data)
#define cuda_write_pram NULL #define cuda_write_pram NULL
#endif #endif
#ifdef CONFIG_ADB_PMU68K #if 0 /* def CONFIG_ADB_PMU68K */
static long pmu_read_time(void) static long pmu_read_time(void)
{ {
struct adb_request req; struct adb_request req;
...@@ -148,7 +148,7 @@ static void pmu_write_pram(int offset, __u8 data) ...@@ -148,7 +148,7 @@ static void pmu_write_pram(int offset, __u8 data)
#define pmu_write_pram NULL #define pmu_write_pram NULL
#endif #endif
#ifdef CONFIG_ADB_MACIISI #if 0 /* def CONFIG_ADB_MACIISI */
extern int maciisi_request(struct adb_request *req, extern int maciisi_request(struct adb_request *req,
void (*done)(struct adb_request *), int nbytes, ...); void (*done)(struct adb_request *), int nbytes, ...);
...@@ -717,13 +717,18 @@ int mac_hwclk(int op, struct rtc_time *t) ...@@ -717,13 +717,18 @@ int mac_hwclk(int op, struct rtc_time *t)
unmktime(now, 0, unmktime(now, 0,
&t->tm_year, &t->tm_mon, &t->tm_mday, &t->tm_year, &t->tm_mon, &t->tm_mday,
&t->tm_hour, &t->tm_min, &t->tm_sec); &t->tm_hour, &t->tm_min, &t->tm_sec);
#if 0
printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n", printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
#endif
} else { /* write */ } else { /* write */
#if 0
printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n", printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
#endif
#if 0 /* it trashes my rtc */
now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec); t->tm_hour, t->tm_min, t->tm_sec);
...@@ -742,7 +747,6 @@ int mac_hwclk(int op, struct rtc_time *t) ...@@ -742,7 +747,6 @@ int mac_hwclk(int op, struct rtc_time *t)
case MAC_ADB_IISI: case MAC_ADB_IISI:
maciisi_write_time(now); maciisi_write_time(now);
} }
#endif
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册