diff options
author | kato <kato@FreeBSD.org> | 1998-12-17 08:54:47 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1998-12-17 08:54:47 +0000 |
commit | 947e64babb6719e552127815a51a1188ce407684 (patch) | |
tree | fbd926062ff67fd7fcf1ce72b42c128830f81d98 | |
parent | 61c8bab0e1c50de15ec3d1168510388be75681ba (diff) | |
download | FreeBSD-src-947e64babb6719e552127815a51a1188ce407684.zip FreeBSD-src-947e64babb6719e552127815a51a1188ce407684.tar.gz |
Sync with sys/i386/isa/clock.c revision 1.129.
-rw-r--r-- | sys/pc98/cbus/clock.c | 44 | ||||
-rw-r--r-- | sys/pc98/cbus/pcrtc.c | 44 | ||||
-rw-r--r-- | sys/pc98/pc98/clock.c | 44 |
3 files changed, 66 insertions, 66 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c index 2cfbcf8..1225f31 100644 --- a/sys/pc98/cbus/clock.c +++ b/sys/pc98/cbus/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.63 1998/10/13 03:24:01 kato Exp $ + * $Id: clock.c,v 1.64 1998/10/23 13:13:43 kato Exp $ */ /* @@ -136,7 +136,7 @@ static void setup_8254_mixed_mode __P((void)); */ #define TIMER0_MAX_FREQ 20000 -int adjkerntz; /* local offset from GMT in seconds */ +int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; int statclock_disable; @@ -151,7 +151,7 @@ u_int stat_imask = SWI_CLOCK_MASK; u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; -int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ +int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ static int beeping = 0; static u_int clk_imask = HWI_MASK | SWI_MASK; @@ -1070,8 +1070,8 @@ rtc_inb(void) #endif /* PC-98 */ /* - * Initialize the time of day register, based on the time base which is, e.g. - * from a filesystem. + * Initialize the time of day register, based on the time base which is, e.g. + * from a filesystem. */ void inittodr(time_t base) @@ -1123,17 +1123,17 @@ inittodr(time_t base) /* sec now contains the number of seconds, since Jan 1 1970, in the local time zone */ #else /* IBM-PC */ - /* Look if we have a RTC present and the time is valid */ + /* Look if we have a RTC present and the time is valid */ if (!(rtcin(RTC_STATUSD) & RTCSD_PWR)) goto wrong_time; - /* wait for time update to complete */ - /* If RTCSA_TUP is zero, we have at least 244us before next update */ + /* wait for time update to complete */ + /* If RTCSA_TUP is zero, we have at least 244us before next update */ while (rtcin(RTC_STATUSA) & RTCSA_TUP); days = 0; #ifdef USE_RTC_CENTURY - year = readrtc(RTC_YEAR) + readrtc(RTC_CENTURY) * 100; + year = readrtc(RTC_YEAR) + readrtc(RTC_CENTURY) * 100; #else year = readrtc(RTC_YEAR) + 1900; if (year < 1970) @@ -1141,21 +1141,21 @@ inittodr(time_t base) #endif if (year < 1970) goto wrong_time; - month = readrtc(RTC_MONTH); - for (m = 1; m < month; m++) - days += daysinmonth[m-1]; - if ((month > 2) && LEAPYEAR(year)) + month = readrtc(RTC_MONTH); + for (m = 1; m < month; m++) + days += daysinmonth[m-1]; + if ((month > 2) && LEAPYEAR(year)) days ++; - days += readrtc(RTC_DAY) - 1; + days += readrtc(RTC_DAY) - 1; yd = days; for (y = 1970; y < year; y++) - days += DAYSPERYEAR + LEAPYEAR(y); + days += DAYSPERYEAR + LEAPYEAR(y); sec = ((( days * 24 + readrtc(RTC_HRS)) * 60 + readrtc(RTC_MIN)) * 60 + readrtc(RTC_SEC)); - /* sec now contains the number of seconds, since Jan 1 1970, - in the local time zone */ + /* sec now contains the number of seconds, since Jan 1 1970, + in the local time zone */ #endif sec += tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); @@ -1172,12 +1172,12 @@ inittodr(time_t base) return; wrong_time: - printf("Invalid time in real time clock.\n"); - printf("Check and reset the date immediately!\n"); + printf("Invalid time in real time clock.\n"); + printf("Check and reset the date immediately!\n"); } /* - * Write system time back to RTC + * Write system time back to RTC */ void resettodr() @@ -1236,7 +1236,7 @@ resettodr() /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); - /* Calculate local time to put in RTC */ + /* Calculate local time to put in RTC */ tm -= tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); @@ -1244,7 +1244,7 @@ resettodr() writertc(RTC_MIN, bin2bcd(tm%60)); tm /= 60; /* Write back Minutes */ writertc(RTC_HRS, bin2bcd(tm%24)); tm /= 24; /* Write back Hours */ - /* We have now the days since 01-01-1970 in tm */ + /* We have now the days since 01-01-1970 in tm */ writertc(RTC_WDAY, (tm+4)%7); /* Write back Weekday */ for (y = 1970, m = DAYSPERYEAR + LEAPYEAR(y); tm >= m; diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index 2cfbcf8..1225f31 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.63 1998/10/13 03:24:01 kato Exp $ + * $Id: clock.c,v 1.64 1998/10/23 13:13:43 kato Exp $ */ /* @@ -136,7 +136,7 @@ static void setup_8254_mixed_mode __P((void)); */ #define TIMER0_MAX_FREQ 20000 -int adjkerntz; /* local offset from GMT in seconds */ +int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; int statclock_disable; @@ -151,7 +151,7 @@ u_int stat_imask = SWI_CLOCK_MASK; u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; -int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ +int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ static int beeping = 0; static u_int clk_imask = HWI_MASK | SWI_MASK; @@ -1070,8 +1070,8 @@ rtc_inb(void) #endif /* PC-98 */ /* - * Initialize the time of day register, based on the time base which is, e.g. - * from a filesystem. + * Initialize the time of day register, based on the time base which is, e.g. + * from a filesystem. */ void inittodr(time_t base) @@ -1123,17 +1123,17 @@ inittodr(time_t base) /* sec now contains the number of seconds, since Jan 1 1970, in the local time zone */ #else /* IBM-PC */ - /* Look if we have a RTC present and the time is valid */ + /* Look if we have a RTC present and the time is valid */ if (!(rtcin(RTC_STATUSD) & RTCSD_PWR)) goto wrong_time; - /* wait for time update to complete */ - /* If RTCSA_TUP is zero, we have at least 244us before next update */ + /* wait for time update to complete */ + /* If RTCSA_TUP is zero, we have at least 244us before next update */ while (rtcin(RTC_STATUSA) & RTCSA_TUP); days = 0; #ifdef USE_RTC_CENTURY - year = readrtc(RTC_YEAR) + readrtc(RTC_CENTURY) * 100; + year = readrtc(RTC_YEAR) + readrtc(RTC_CENTURY) * 100; #else year = readrtc(RTC_YEAR) + 1900; if (year < 1970) @@ -1141,21 +1141,21 @@ inittodr(time_t base) #endif if (year < 1970) goto wrong_time; - month = readrtc(RTC_MONTH); - for (m = 1; m < month; m++) - days += daysinmonth[m-1]; - if ((month > 2) && LEAPYEAR(year)) + month = readrtc(RTC_MONTH); + for (m = 1; m < month; m++) + days += daysinmonth[m-1]; + if ((month > 2) && LEAPYEAR(year)) days ++; - days += readrtc(RTC_DAY) - 1; + days += readrtc(RTC_DAY) - 1; yd = days; for (y = 1970; y < year; y++) - days += DAYSPERYEAR + LEAPYEAR(y); + days += DAYSPERYEAR + LEAPYEAR(y); sec = ((( days * 24 + readrtc(RTC_HRS)) * 60 + readrtc(RTC_MIN)) * 60 + readrtc(RTC_SEC)); - /* sec now contains the number of seconds, since Jan 1 1970, - in the local time zone */ + /* sec now contains the number of seconds, since Jan 1 1970, + in the local time zone */ #endif sec += tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); @@ -1172,12 +1172,12 @@ inittodr(time_t base) return; wrong_time: - printf("Invalid time in real time clock.\n"); - printf("Check and reset the date immediately!\n"); + printf("Invalid time in real time clock.\n"); + printf("Check and reset the date immediately!\n"); } /* - * Write system time back to RTC + * Write system time back to RTC */ void resettodr() @@ -1236,7 +1236,7 @@ resettodr() /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); - /* Calculate local time to put in RTC */ + /* Calculate local time to put in RTC */ tm -= tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); @@ -1244,7 +1244,7 @@ resettodr() writertc(RTC_MIN, bin2bcd(tm%60)); tm /= 60; /* Write back Minutes */ writertc(RTC_HRS, bin2bcd(tm%24)); tm /= 24; /* Write back Hours */ - /* We have now the days since 01-01-1970 in tm */ + /* We have now the days since 01-01-1970 in tm */ writertc(RTC_WDAY, (tm+4)%7); /* Write back Weekday */ for (y = 1970, m = DAYSPERYEAR + LEAPYEAR(y); tm >= m; diff --git a/sys/pc98/pc98/clock.c b/sys/pc98/pc98/clock.c index 2cfbcf8..1225f31 100644 --- a/sys/pc98/pc98/clock.c +++ b/sys/pc98/pc98/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.63 1998/10/13 03:24:01 kato Exp $ + * $Id: clock.c,v 1.64 1998/10/23 13:13:43 kato Exp $ */ /* @@ -136,7 +136,7 @@ static void setup_8254_mixed_mode __P((void)); */ #define TIMER0_MAX_FREQ 20000 -int adjkerntz; /* local offset from GMT in seconds */ +int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; int statclock_disable; @@ -151,7 +151,7 @@ u_int stat_imask = SWI_CLOCK_MASK; u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; -int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ +int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ static int beeping = 0; static u_int clk_imask = HWI_MASK | SWI_MASK; @@ -1070,8 +1070,8 @@ rtc_inb(void) #endif /* PC-98 */ /* - * Initialize the time of day register, based on the time base which is, e.g. - * from a filesystem. + * Initialize the time of day register, based on the time base which is, e.g. + * from a filesystem. */ void inittodr(time_t base) @@ -1123,17 +1123,17 @@ inittodr(time_t base) /* sec now contains the number of seconds, since Jan 1 1970, in the local time zone */ #else /* IBM-PC */ - /* Look if we have a RTC present and the time is valid */ + /* Look if we have a RTC present and the time is valid */ if (!(rtcin(RTC_STATUSD) & RTCSD_PWR)) goto wrong_time; - /* wait for time update to complete */ - /* If RTCSA_TUP is zero, we have at least 244us before next update */ + /* wait for time update to complete */ + /* If RTCSA_TUP is zero, we have at least 244us before next update */ while (rtcin(RTC_STATUSA) & RTCSA_TUP); days = 0; #ifdef USE_RTC_CENTURY - year = readrtc(RTC_YEAR) + readrtc(RTC_CENTURY) * 100; + year = readrtc(RTC_YEAR) + readrtc(RTC_CENTURY) * 100; #else year = readrtc(RTC_YEAR) + 1900; if (year < 1970) @@ -1141,21 +1141,21 @@ inittodr(time_t base) #endif if (year < 1970) goto wrong_time; - month = readrtc(RTC_MONTH); - for (m = 1; m < month; m++) - days += daysinmonth[m-1]; - if ((month > 2) && LEAPYEAR(year)) + month = readrtc(RTC_MONTH); + for (m = 1; m < month; m++) + days += daysinmonth[m-1]; + if ((month > 2) && LEAPYEAR(year)) days ++; - days += readrtc(RTC_DAY) - 1; + days += readrtc(RTC_DAY) - 1; yd = days; for (y = 1970; y < year; y++) - days += DAYSPERYEAR + LEAPYEAR(y); + days += DAYSPERYEAR + LEAPYEAR(y); sec = ((( days * 24 + readrtc(RTC_HRS)) * 60 + readrtc(RTC_MIN)) * 60 + readrtc(RTC_SEC)); - /* sec now contains the number of seconds, since Jan 1 1970, - in the local time zone */ + /* sec now contains the number of seconds, since Jan 1 1970, + in the local time zone */ #endif sec += tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); @@ -1172,12 +1172,12 @@ inittodr(time_t base) return; wrong_time: - printf("Invalid time in real time clock.\n"); - printf("Check and reset the date immediately!\n"); + printf("Invalid time in real time clock.\n"); + printf("Check and reset the date immediately!\n"); } /* - * Write system time back to RTC + * Write system time back to RTC */ void resettodr() @@ -1236,7 +1236,7 @@ resettodr() /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); - /* Calculate local time to put in RTC */ + /* Calculate local time to put in RTC */ tm -= tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); @@ -1244,7 +1244,7 @@ resettodr() writertc(RTC_MIN, bin2bcd(tm%60)); tm /= 60; /* Write back Minutes */ writertc(RTC_HRS, bin2bcd(tm%24)); tm /= 24; /* Write back Hours */ - /* We have now the days since 01-01-1970 in tm */ + /* We have now the days since 01-01-1970 in tm */ writertc(RTC_WDAY, (tm+4)%7); /* Write back Weekday */ for (y = 1970, m = DAYSPERYEAR + LEAPYEAR(y); tm >= m; |