From: NIIBE Y. <gn...@m1...> - 2001-04-23 06:29:04
|
SUGIOKA Toshinobu wrote: > This patch implements 'Enhanced RTC Support' by emulating > MC146868 with CMOS_READ/CMOS_WRITE macros. > However, drivers/char/rtc.c should be modified slightly, > since emulation is incomplete. > > 'hwclock' command now works on my board(SH7709A) with this patch. Great. Looks good. I just am afraid of there's need to support real MC146868 in some cases. Say, Hitachi Solution Engine has another RTC. Besides, I think that we only could change the function rtc_is_updating. > Index: drivers/char/rtc.c > =================================================================== [...] > +#ifdef __sh__ > + do { > + ctrl_outb((ctrl_inb(RCR1) & (RCR1_CIE | RCR1_AIE)) | RCR1_AF, RCR1); /* > Clear CF */ > +#else > if (rtc_is_updating() != 0) > while (jiffies - uip_watchdog < 2*HZ/100) > barrier(); > +#endif > > /* > * Only the values that we read from the RTC are set. We leave I know that this is the way of handling SH's RTC in the manual, but we could implement rtc_is_updating, such as checking R64CNT is near 0 or not (with some safety). Errr... well, the implementation depends on architecture, SH-3 or SH-4. -- |