Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those "functions" to take a "volatile struct timeval*" instead of a "struct timeval*". Many places, these functions are called with &time, and time is declared as volatile in <sys/kernel.h>. This way we can get rid of all the ugly casts which now also triggered warnings, and caused more code to be added to work around the problem. Reviewed by thorpej.
This commit is contained in:
parent
217446d2aa
commit
aafdb08c5a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtc.c,v 1.7 2003/09/30 00:35:30 thorpej Exp $ */
|
||||
/* $NetBSD: rtc.c,v 1.8 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Ben Harris
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.7 2003/09/30 00:35:30 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.8 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -102,6 +102,6 @@ resettodr(void)
|
||||
return;
|
||||
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, (struct timeval *)&time) != 0)
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: todclock.c,v 1.7 2005/06/03 12:32:44 tsutsui Exp $ */
|
||||
/* $NetBSD: todclock.c,v 1.8 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: todclock.c,v 1.7 2005/06/03 12:32:44 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: todclock.c,v 1.8 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -71,7 +71,6 @@ todr_attach(todr_chip_handle_t handle)
|
||||
void
|
||||
inittodr(time_t base)
|
||||
{
|
||||
struct timeval tv;
|
||||
int badbase, waszero;
|
||||
|
||||
badbase = 0;
|
||||
@ -90,8 +89,8 @@ inittodr(time_t base)
|
||||
badbase = 1;
|
||||
}
|
||||
|
||||
if (todr_gettime(todr_handle, &tv) != 0 ||
|
||||
tv.tv_sec == 0) {
|
||||
if (todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
printf("WARNING: bad date in battery clock");
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
@ -101,10 +100,7 @@ inittodr(time_t base)
|
||||
if (!badbase)
|
||||
resettodr();
|
||||
} else {
|
||||
int deltat;
|
||||
|
||||
time = tv;
|
||||
deltat = time.tv_sec - base;
|
||||
int deltat = time.tv_sec - base;
|
||||
|
||||
if (deltat < 0)
|
||||
deltat = -deltat;
|
||||
@ -125,12 +121,10 @@ inittodr(time_t base)
|
||||
void
|
||||
resettodr(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
if (time.tv_sec == 0)
|
||||
return;
|
||||
|
||||
tv = time;
|
||||
if (todr_settime(todr_handle, &tv) != 0)
|
||||
if (todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: cannot set time in time-of-day clock\n");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: epclk.c,v 1.4 2005/02/26 12:00:52 simonb Exp $ */
|
||||
/* $NetBSD: epclk.c,v 1.5 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Jesse Off
|
||||
@ -47,7 +47,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: epclk.c,v 1.4 2005/02/26 12:00:52 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: epclk.c,v 1.5 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -334,7 +334,7 @@ inittodr(time_t base)
|
||||
badbase = 0;
|
||||
|
||||
if (todr_handle == NULL ||
|
||||
todr_gettime(todr_handle, (struct timeval *)&time) != 0 ||
|
||||
todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
@ -380,6 +380,6 @@ resettodr(void)
|
||||
return;
|
||||
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, (struct timeval *)&time) != 0)
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iomd_clock.c,v 1.14 2005/06/04 00:47:18 chris Exp $ */
|
||||
/* $NetBSD: iomd_clock.c,v 1.15 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1997 Mark Brinicombe.
|
||||
@ -175,7 +175,7 @@ statclockhandler(cookie)
|
||||
|
||||
|
||||
/*
|
||||
* void setstatclockrate(int hz)
|
||||
* void setstatclockrate(int newhz)
|
||||
*
|
||||
* Set the stat clock rate. The stat clock uses timer1
|
||||
*/
|
||||
@ -387,7 +387,6 @@ inittodr(time_t base)
|
||||
{
|
||||
time_t deltat;
|
||||
int badbase;
|
||||
struct timeval thetime;
|
||||
|
||||
if (base < (MINYEAR - 1970) * SECYR) {
|
||||
printf("WARNING: preposterous time in file system");
|
||||
@ -398,8 +397,8 @@ inittodr(time_t base)
|
||||
badbase = 0;
|
||||
|
||||
if (todr_handle == NULL ||
|
||||
todr_gettime(todr_handle, &thetime) != 0 ||
|
||||
thetime.tv_sec == 0) {
|
||||
todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
* anything better, resetting the TODR.
|
||||
@ -418,16 +417,14 @@ inittodr(time_t base)
|
||||
* See if we gained/lost two or more days; if
|
||||
* so, assume something is amiss.
|
||||
*/
|
||||
deltat = thetime.tv_sec - base;
|
||||
deltat = time.tv_sec - base;
|
||||
if (deltat < 0)
|
||||
deltat = -deltat;
|
||||
if (deltat < 2 * SECDAY)
|
||||
return; /* all is well */
|
||||
printf("WARNING: clock %s %ld days\n",
|
||||
thetime.tv_sec < base ? "lost" : "gained",
|
||||
time.tv_sec < base ? "lost" : "gained",
|
||||
(long)deltat / SECDAY);
|
||||
|
||||
time = thetime;
|
||||
}
|
||||
bad:
|
||||
printf("WARNING: CHECK AND RESET THE DATE!\n");
|
||||
@ -441,15 +438,12 @@ inittodr(time_t base)
|
||||
void
|
||||
resettodr(void)
|
||||
{
|
||||
struct timeval thetime;
|
||||
|
||||
if (time.tv_sec == 0)
|
||||
return;
|
||||
|
||||
thetime = time;
|
||||
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, &thetime) != 0)
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: becc_timer.c,v 1.7 2005/06/04 14:00:18 rearnsha Exp $ */
|
||||
/* $NetBSD: becc_timer.c,v 1.8 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: becc_timer.c,v 1.7 2005/06/04 14:00:18 rearnsha Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: becc_timer.c,v 1.8 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -291,7 +291,6 @@ todr_attach(todr_chip_handle_t todr)
|
||||
void
|
||||
inittodr(time_t base)
|
||||
{
|
||||
struct timeval tv;
|
||||
time_t deltat;
|
||||
int badbase;
|
||||
|
||||
@ -304,7 +303,7 @@ inittodr(time_t base)
|
||||
badbase = 0;
|
||||
|
||||
if (todr_handle == NULL ||
|
||||
todr_gettime(todr_handle, &tv) != 0 || tv.tv_sec == 0) {
|
||||
todr_gettime(todr_handle, &time) != 0 || time.tv_sec == 0) {
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
* anything better, resetting the TODR.
|
||||
@ -316,8 +315,6 @@ inittodr(time_t base)
|
||||
resettodr();
|
||||
}
|
||||
goto bad;
|
||||
} else {
|
||||
time = tv;
|
||||
}
|
||||
|
||||
if (!badbase) {
|
||||
@ -346,15 +343,13 @@ inittodr(time_t base)
|
||||
void
|
||||
resettodr(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
if (time.tv_sec == 0)
|
||||
return;
|
||||
|
||||
if (todr_handle != NULL && todr_settime(todr_handle, &tv) != 0)
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
else
|
||||
time = tv;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i80321_timer.c,v 1.9 2005/02/26 12:00:52 simonb Exp $ */
|
||||
/* $NetBSD: i80321_timer.c,v 1.10 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: i80321_timer.c,v 1.9 2005/02/26 12:00:52 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i80321_timer.c,v 1.10 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include "opt_perfctrs.h"
|
||||
#include "opt_i80321.h"
|
||||
@ -357,7 +357,7 @@ inittodr(time_t base)
|
||||
badbase = 0;
|
||||
|
||||
if (todr_handle == NULL ||
|
||||
todr_gettime(todr_handle, (struct timeval *)&time) != 0 ||
|
||||
todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
@ -403,7 +403,7 @@ resettodr(void)
|
||||
return;
|
||||
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, (struct timeval *)&time) != 0)
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ixp425_timer.c,v 1.6 2005/02/26 12:00:52 simonb Exp $ */
|
||||
/* $NetBSD: ixp425_timer.c,v 1.7 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixp425_timer.c,v 1.6 2005/02/26 12:00:52 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixp425_timer.c,v 1.7 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include "opt_perfctrs.h"
|
||||
|
||||
@ -322,7 +322,7 @@ inittodr(time_t base)
|
||||
badbase = 0;
|
||||
|
||||
if (todr_handle == NULL ||
|
||||
todr_gettime(todr_handle, (struct timeval *)&time) != 0 ||
|
||||
todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
@ -368,7 +368,7 @@ resettodr(void)
|
||||
return;
|
||||
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, (struct timeval *)&time) != 0)
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iq80310_timer.c,v 1.15 2005/02/26 12:00:52 simonb Exp $ */
|
||||
/* $NetBSD: iq80310_timer.c,v 1.16 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
@ -47,7 +47,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80310_timer.c,v 1.15 2005/02/26 12:00:52 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80310_timer.c,v 1.16 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -356,7 +356,7 @@ inittodr(time_t base)
|
||||
badbase = 0;
|
||||
|
||||
if (todr_handle == NULL ||
|
||||
todr_gettime(todr_handle, (struct timeval *)&time) != 0 ||
|
||||
todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
@ -402,7 +402,7 @@ resettodr(void)
|
||||
return;
|
||||
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, (struct timeval *)&time) != 0)
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock.c,v 1.21 2005/06/03 08:51:08 scw Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.22 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.21 2005/06/03 08:51:08 scw Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.22 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -195,7 +195,6 @@ inittodr(base)
|
||||
time_t base;
|
||||
{
|
||||
int badbase = 0, waszero = (base == 0);
|
||||
struct timeval the_time;
|
||||
|
||||
if (todr_handle == NULL)
|
||||
panic("todr not configured");
|
||||
@ -212,19 +211,18 @@ inittodr(base)
|
||||
badbase = 1;
|
||||
}
|
||||
|
||||
if (todr_gettime(todr_handle, &the_time) != 0 ||
|
||||
the_time.tv_sec == 0) {
|
||||
if (todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
printf("WARNING: bad date in battery clock");
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
* anything better, resetting the clock.
|
||||
*/
|
||||
time.tv_sec = base;
|
||||
time.tv_usec = 0;
|
||||
if (!badbase)
|
||||
resettodr();
|
||||
} else {
|
||||
int deltat = the_time.tv_sec - base;
|
||||
int deltat = time.tv_sec - base;
|
||||
|
||||
if (deltat < 0)
|
||||
deltat = -deltat;
|
||||
@ -232,8 +230,6 @@ inittodr(base)
|
||||
return;
|
||||
printf("WARNING: clock %s %d days",
|
||||
time.tv_sec < base ? "lost" : "gained", deltat / SECDAY);
|
||||
|
||||
time = the_time;
|
||||
}
|
||||
printf(" -- CHECK AND RESET THE DATE!\n");
|
||||
}
|
||||
@ -248,12 +244,10 @@ inittodr(base)
|
||||
void
|
||||
resettodr()
|
||||
{
|
||||
struct timeval the_time;
|
||||
|
||||
if (!time.tv_sec)
|
||||
return;
|
||||
|
||||
the_time = time;
|
||||
if (todr_settime(todr_handle, &the_time) != 0)
|
||||
if (todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock.c,v 1.8 2005/06/03 10:57:17 scw Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.9 2005/06/04 20:14:24 he Exp $ */
|
||||
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
|
||||
|
||||
/*
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.8 2005/06/03 10:57:17 scw Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -196,7 +196,6 @@ inittodr(base)
|
||||
time_t base;
|
||||
{
|
||||
int badbase = 0, waszero = (base == 0);
|
||||
struct timeval the_time;
|
||||
|
||||
if (clock_handle == NULL)
|
||||
panic("todr not configured");
|
||||
@ -213,28 +212,25 @@ inittodr(base)
|
||||
badbase = 1;
|
||||
}
|
||||
|
||||
if (todr_gettime(clock_handle, &the_time) != 0 ||
|
||||
the_time.tv_sec == 0) {
|
||||
if (todr_gettime(clock_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
printf("WARNING: bad date in battery clock");
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
* anything better, resetting the clock.
|
||||
*/
|
||||
time.tv_sec = base;
|
||||
time.tv_usec = 0;
|
||||
if (!badbase)
|
||||
resettodr();
|
||||
} else {
|
||||
int deltat = the_time.tv_sec - base;
|
||||
int deltat = time.tv_sec - base;
|
||||
|
||||
if (deltat < 0)
|
||||
deltat = -deltat;
|
||||
if (waszero || deltat < 2 * SECDAY)
|
||||
return;
|
||||
printf("WARNING: clock %s %d days",
|
||||
(the_time.tv_sec < base) ? "lost" : "gained",
|
||||
deltat / SECDAY);
|
||||
time = the_time;
|
||||
time.tv_sec < base ? "lost" : "gained", deltat / SECDAY);
|
||||
}
|
||||
printf(" -- CHECK AND RESET THE DATE!\n");
|
||||
}
|
||||
@ -249,13 +245,10 @@ inittodr(base)
|
||||
void
|
||||
resettodr()
|
||||
{
|
||||
struct timeval the_time;
|
||||
|
||||
if (!time.tv_sec)
|
||||
return;
|
||||
|
||||
the_time = time;
|
||||
|
||||
if (todr_settime(clock_handle, &the_time) != 0)
|
||||
if (todr_settime(clock_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtc.c,v 1.2 2005/06/03 12:13:43 scw Exp $ */
|
||||
/* $NetBSD: rtc.c,v 1.3 2005/06/04 20:14:24 he Exp $ */
|
||||
/* Original: src/sys/arch/acorn26/ioc/rtc.c */
|
||||
/* Original Tag: rtc.c,v 1.7 2003/09/30 00:35:30 thorpej Exp */
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.2 2005/06/03 12:13:43 scw Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.3 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -97,12 +97,11 @@ inittodr(time_t base)
|
||||
void
|
||||
resettodr(void)
|
||||
{
|
||||
struct timeval todrtime;
|
||||
|
||||
if (time.tv_sec == 0)
|
||||
return;
|
||||
|
||||
todrtime = time;
|
||||
if (todr_handle != NULL && todr_settime(todr_handle, &todrtime) != 0)
|
||||
if (todr_handle != NULL &&
|
||||
todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: failed to set time\n");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock.c,v 1.9 2004/06/29 12:01:11 kleink Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.10 2005/06/04 20:14:24 he Exp $ */
|
||||
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
|
||||
|
||||
/*
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9 2004/06/29 12:01:11 kleink Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.10 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -110,7 +110,7 @@ inittodr(base)
|
||||
badbase = 1;
|
||||
}
|
||||
|
||||
if (todr_gettime(todr_handle, (struct timeval *)&time) != 0 ||
|
||||
if (todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
printf("WARNING: bad date in battery clock");
|
||||
/*
|
||||
@ -150,7 +150,7 @@ resettodr()
|
||||
if (time.tv_sec == 0)
|
||||
return;
|
||||
|
||||
if (todr_settime(todr_handle, (struct timeval *)&time) != 0)
|
||||
if (todr_settime(todr_handle, &time) != 0)
|
||||
printf("resettodr: cannot set time in time-of-day clock\n");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtc.c,v 1.9 2003/10/25 15:05:00 simonb Exp $ */
|
||||
/* $NetBSD: rtc.c,v 1.10 2005/06/04 20:14:24 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.9 2003/10/25 15:05:00 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.10 2005/06/04 20:14:24 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
@ -385,7 +385,7 @@ rtc_resettodr(void *cookie)
|
||||
if (time.tv_sec == 0)
|
||||
return;
|
||||
|
||||
if (todr_settime(&sc->sc_ct, (struct timeval *)&time) != 0)
|
||||
if (todr_settime(&sc->sc_ct, &time) != 0)
|
||||
printf("resettodr: cannot set time in time-of-day clock\n");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock.c,v 1.94 2005/06/03 22:17:18 martin Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.95 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -88,7 +88,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.94 2005/06/03 22:17:18 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.95 2005/06/04 20:14:25 he Exp $");
|
||||
|
||||
#include "opt_sparc_arch.h"
|
||||
|
||||
@ -224,8 +224,7 @@ void
|
||||
inittodr(base)
|
||||
time_t base;
|
||||
{
|
||||
struct timeval tv;
|
||||
int tv_valid = 0, badbase = 0, waszero = base == 0;
|
||||
int badbase = 0, waszero = base == 0;
|
||||
|
||||
if (base < 5 * SECYR) {
|
||||
/*
|
||||
@ -239,11 +238,8 @@ inittodr(base)
|
||||
badbase = 1;
|
||||
}
|
||||
|
||||
if (todr_gettime(todr_handle, &tv) == 0 && tv.tv_sec != 0) {
|
||||
tv_valid = 1;
|
||||
time = tv;
|
||||
}
|
||||
if (!tv_valid) {
|
||||
if (todr_gettime(todr_handle, &time) != 0 ||
|
||||
time.tv_sec == 0) {
|
||||
|
||||
printf("WARNING: bad date in battery clock");
|
||||
/*
|
||||
@ -277,14 +273,12 @@ inittodr(base)
|
||||
void
|
||||
resettodr()
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
if (time.tv_sec == 0)
|
||||
return;
|
||||
|
||||
sparc_clock_time_is_ok = 1;
|
||||
tv = time;
|
||||
if (todr_settime(todr_handle, &tv) != 0)
|
||||
if (todr_settime(todr_handle, &time) != 0)
|
||||
printf("Cannot set time in time-of-day clock\n");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock_subr.h,v 1.11 2005/02/04 02:10:35 perry Exp $ */
|
||||
/* $NetBSD: clock_subr.h,v 1.12 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -85,8 +85,10 @@ struct todr_chip_handle {
|
||||
void *cookie; /* Device specific data */
|
||||
void *bus_cookie; /* Bus specific data */
|
||||
|
||||
int (*todr_gettime)(struct todr_chip_handle *, struct timeval *);
|
||||
int (*todr_settime)(struct todr_chip_handle *, struct timeval *);
|
||||
int (*todr_gettime)(struct todr_chip_handle *,
|
||||
volatile struct timeval *);
|
||||
int (*todr_settime)(struct todr_chip_handle *,
|
||||
volatile struct timeval *);
|
||||
int (*todr_getcal)(struct todr_chip_handle *, int *);
|
||||
int (*todr_setcal)(struct todr_chip_handle *, int);
|
||||
int (*todr_setwen)(struct todr_chip_handle *, int);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ds1307.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
|
||||
/* $NetBSD: ds1307.c,v 1.2 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -76,8 +76,8 @@ const struct cdevsw dsrtc_cdevsw = {
|
||||
|
||||
static int dsrtc_clock_read(struct dsrtc_softc *, struct clock_ymdhms *);
|
||||
static int dsrtc_clock_write(struct dsrtc_softc *, struct clock_ymdhms *);
|
||||
static int dsrtc_gettime(struct todr_chip_handle *, struct timeval *);
|
||||
static int dsrtc_settime(struct todr_chip_handle *, struct timeval *);
|
||||
static int dsrtc_gettime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int dsrtc_settime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int dsrtc_getcal(struct todr_chip_handle *, int *);
|
||||
static int dsrtc_setcal(struct todr_chip_handle *, int);
|
||||
|
||||
@ -222,7 +222,7 @@ dsrtc_write(dev_t dev, struct uio *uio, int flags)
|
||||
}
|
||||
|
||||
static int
|
||||
dsrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
dsrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct dsrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt, check;
|
||||
@ -248,7 +248,7 @@ dsrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
dsrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
dsrtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct dsrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: m41st84.c,v 1.3 2004/11/24 14:46:18 scw Exp $ */
|
||||
/* $NetBSD: m41st84.c,v 1.4 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -76,8 +76,8 @@ const struct cdevsw strtc_cdevsw = {
|
||||
|
||||
static int strtc_clock_read(struct strtc_softc *, struct clock_ymdhms *);
|
||||
static int strtc_clock_write(struct strtc_softc *, struct clock_ymdhms *);
|
||||
static int strtc_gettime(struct todr_chip_handle *, struct timeval *);
|
||||
static int strtc_settime(struct todr_chip_handle *, struct timeval *);
|
||||
static int strtc_gettime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int strtc_settime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int strtc_getcal(struct todr_chip_handle *, int *);
|
||||
static int strtc_setcal(struct todr_chip_handle *, int);
|
||||
|
||||
@ -222,7 +222,7 @@ strtc_write(dev_t dev, struct uio *uio, int flags)
|
||||
}
|
||||
|
||||
static int
|
||||
strtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
strtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct strtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt, check;
|
||||
@ -248,7 +248,7 @@ strtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
strtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
strtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct strtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: m41t00.c,v 1.3 2004/09/30 18:57:39 briggs Exp $ */
|
||||
/* $NetBSD: m41t00.c,v 1.4 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -79,8 +79,8 @@ const struct cdevsw m41t00_cdevsw = {
|
||||
|
||||
static int m41t00_clock_read(struct m41t00_softc *, struct clock_ymdhms *);
|
||||
static int m41t00_clock_write(struct m41t00_softc *, struct clock_ymdhms *);
|
||||
static int m41t00_gettime(struct todr_chip_handle *, struct timeval *);
|
||||
static int m41t00_settime(struct todr_chip_handle *, struct timeval *);
|
||||
static int m41t00_gettime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int m41t00_settime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int m41t00_getcal(struct todr_chip_handle *, int *);
|
||||
static int m41t00_setcal(struct todr_chip_handle *, int);
|
||||
|
||||
@ -228,7 +228,7 @@ m41t00_write(dev_t dev, struct uio *uio, int flags)
|
||||
}
|
||||
|
||||
static int
|
||||
m41t00_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
m41t00_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct m41t00_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
@ -243,7 +243,7 @@ m41t00_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
m41t00_settime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
m41t00_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct m41t00_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: max6900.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
|
||||
/* $NetBSD: max6900.c,v 1.2 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -76,8 +76,8 @@ const struct cdevsw maxrtc_cdevsw = {
|
||||
|
||||
static int maxrtc_clock_read(struct maxrtc_softc *, struct clock_ymdhms *);
|
||||
static int maxrtc_clock_write(struct maxrtc_softc *, struct clock_ymdhms *);
|
||||
static int maxrtc_gettime(struct todr_chip_handle *, struct timeval *);
|
||||
static int maxrtc_settime(struct todr_chip_handle *, struct timeval *);
|
||||
static int maxrtc_gettime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int maxrtc_settime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int maxrtc_getcal(struct todr_chip_handle *, int *);
|
||||
static int maxrtc_setcal(struct todr_chip_handle *, int);
|
||||
|
||||
@ -250,7 +250,7 @@ maxrtc_write(dev_t dev, struct uio *uio, int flags)
|
||||
}
|
||||
|
||||
static int
|
||||
maxrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
maxrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct maxrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
@ -265,7 +265,7 @@ maxrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
maxrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
maxrtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct maxrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcf8583.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
|
||||
/* $NetBSD: pcf8583.c,v 1.2 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -86,8 +86,8 @@ static int pcfrtc_clock_read(struct pcfrtc_softc *, struct clock_ymdhms *,
|
||||
uint8_t *);
|
||||
static int pcfrtc_clock_write(struct pcfrtc_softc *, struct clock_ymdhms *,
|
||||
uint8_t);
|
||||
static int pcfrtc_gettime(struct todr_chip_handle *, struct timeval *);
|
||||
static int pcfrtc_settime(struct todr_chip_handle *, struct timeval *);
|
||||
static int pcfrtc_gettime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int pcfrtc_settime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int pcfrtc_getcal(struct todr_chip_handle *, int *);
|
||||
static int pcfrtc_setcal(struct todr_chip_handle *, int);
|
||||
|
||||
@ -265,7 +265,7 @@ pcfrtc_write(dev_t dev, struct uio *uio, int flags)
|
||||
}
|
||||
|
||||
static int
|
||||
pcfrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
pcfrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct pcfrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
@ -281,7 +281,7 @@ pcfrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
pcfrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
pcfrtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct pcfrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: x1226.c,v 1.5 2005/06/03 12:18:46 scw Exp $ */
|
||||
/* $NetBSD: x1226.c,v 1.6 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Shigeyuki Fukushima.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.5 2005/06/03 12:18:46 scw Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.6 2005/06/04 20:14:25 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -79,8 +79,8 @@ const struct cdevsw xrtc_cdevsw = {
|
||||
|
||||
static int xrtc_clock_read(struct xrtc_softc *, struct clock_ymdhms *);
|
||||
static int xrtc_clock_write(struct xrtc_softc *, struct clock_ymdhms *);
|
||||
static int xrtc_gettime(struct todr_chip_handle *, struct timeval *);
|
||||
static int xrtc_settime(struct todr_chip_handle *, struct timeval *);
|
||||
static int xrtc_gettime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int xrtc_settime(struct todr_chip_handle *, volatile struct timeval *);
|
||||
static int xrtc_getcal(struct todr_chip_handle *, int *);
|
||||
static int xrtc_setcal(struct todr_chip_handle *, int);
|
||||
|
||||
@ -238,7 +238,7 @@ xrtc_write(dev_t dev, struct uio *uio, int flags)
|
||||
|
||||
|
||||
static int
|
||||
xrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
xrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct xrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt, check;
|
||||
@ -260,7 +260,7 @@ xrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
xrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
|
||||
xrtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
|
||||
{
|
||||
struct xrtc_softc *sc = ch->cookie;
|
||||
struct clock_ymdhms dt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: intersil7170.c,v 1.3 2004/07/05 09:24:31 pk Exp $ */
|
||||
/* $NetBSD: intersil7170.c,v 1.4 2005/06/04 20:14:25 he Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: intersil7170.c,v 1.3 2004/07/05 09:24:31 pk Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: intersil7170.c,v 1.4 2005/06/04 20:14:25 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -61,8 +61,8 @@ struct intersil7170_softc {
|
||||
int sil_year0;
|
||||
};
|
||||
|
||||
int intersil7170_gettime(todr_chip_handle_t, struct timeval *);
|
||||
int intersil7170_settime(todr_chip_handle_t, struct timeval *);
|
||||
int intersil7170_gettime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int intersil7170_settime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int intersil7170_getcal(todr_chip_handle_t, int *);
|
||||
int intersil7170_setcal(todr_chip_handle_t, int);
|
||||
|
||||
@ -102,7 +102,7 @@ intersil7170_attach(bt, bh, year0)
|
||||
int
|
||||
intersil7170_gettime(handle, tv)
|
||||
todr_chip_handle_t handle;
|
||||
struct timeval *tv;
|
||||
volatile struct timeval *tv;
|
||||
{
|
||||
struct intersil7170_softc *sil = handle->cookie;
|
||||
bus_space_tag_t bt = sil->sil_bt;
|
||||
@ -151,7 +151,7 @@ intersil7170_gettime(handle, tv)
|
||||
int
|
||||
intersil7170_settime(handle, tv)
|
||||
todr_chip_handle_t handle;
|
||||
struct timeval *tv;
|
||||
volatile struct timeval *tv;
|
||||
{
|
||||
struct intersil7170_softc *sil = handle->cookie;
|
||||
bus_space_tag_t bt = sil->sil_bt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mc146818.c,v 1.5 2004/09/25 09:46:17 tsutsui Exp $ */
|
||||
/* $NetBSD: mc146818.c,v 1.6 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Izumi Tsutsui. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mc146818.c,v 1.5 2004/09/25 09:46:17 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mc146818.c,v 1.6 2005/06/04 20:14:25 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -45,8 +45,8 @@ __KERNEL_RCSID(0, "$NetBSD: mc146818.c,v 1.5 2004/09/25 09:46:17 tsutsui Exp $")
|
||||
#include <dev/ic/mc146818reg.h>
|
||||
#include <dev/ic/mc146818var.h>
|
||||
|
||||
int mc146818_gettime(todr_chip_handle_t, struct timeval *);
|
||||
int mc146818_settime(todr_chip_handle_t, struct timeval *);
|
||||
int mc146818_gettime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int mc146818_settime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int mc146818_getcal(todr_chip_handle_t, int *);
|
||||
int mc146818_setcal(todr_chip_handle_t, int);
|
||||
|
||||
@ -78,7 +78,7 @@ mc146818_attach(struct mc146818_softc *sc)
|
||||
* Return 0 on success, an error number othersize.
|
||||
*/
|
||||
int
|
||||
mc146818_gettime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
mc146818_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
|
||||
{
|
||||
struct mc146818_softc *sc;
|
||||
struct clock_ymdhms dt;
|
||||
@ -142,7 +142,7 @@ mc146818_gettime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
* Return 0 on success, an error number othersize.
|
||||
*/
|
||||
int
|
||||
mc146818_settime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
mc146818_settime(todr_chip_handle_t handle, volatile struct timeval *tv)
|
||||
{
|
||||
struct mc146818_softc *sc;
|
||||
struct clock_ymdhms dt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mk48txx.c,v 1.16 2004/12/29 21:33:42 bjh21 Exp $ */
|
||||
/* $NetBSD: mk48txx.c,v 1.17 2005/06/04 20:14:25 he Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mk48txx.c,v 1.16 2004/12/29 21:33:42 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mk48txx.c,v 1.17 2005/06/04 20:14:25 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -52,8 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: mk48txx.c,v 1.16 2004/12/29 21:33:42 bjh21 Exp $");
|
||||
#include <dev/ic/mk48txxreg.h>
|
||||
#include <dev/ic/mk48txxvar.h>
|
||||
|
||||
int mk48txx_gettime(todr_chip_handle_t, struct timeval *);
|
||||
int mk48txx_settime(todr_chip_handle_t, struct timeval *);
|
||||
int mk48txx_gettime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int mk48txx_settime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int mk48txx_getcal(todr_chip_handle_t, int *);
|
||||
int mk48txx_setcal(todr_chip_handle_t, int);
|
||||
u_int8_t mk48txx_def_nvrd(struct mk48txx_softc *, int);
|
||||
@ -113,7 +113,7 @@ mk48txx_attach(sc)
|
||||
int
|
||||
mk48txx_gettime(handle, tv)
|
||||
todr_chip_handle_t handle;
|
||||
struct timeval *tv;
|
||||
volatile struct timeval *tv;
|
||||
{
|
||||
struct mk48txx_softc *sc;
|
||||
bus_size_t clkoff;
|
||||
@ -170,7 +170,7 @@ mk48txx_gettime(handle, tv)
|
||||
int
|
||||
mk48txx_settime(handle, tv)
|
||||
todr_chip_handle_t handle;
|
||||
struct timeval *tv;
|
||||
volatile struct timeval *tv;
|
||||
{
|
||||
struct mk48txx_softc *sc;
|
||||
bus_size_t clkoff;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mm58167.c,v 1.5 2005/02/27 00:27:02 perry Exp $ */
|
||||
/* $NetBSD: mm58167.c,v 1.6 2005/06/04 20:14:25 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mm58167.c,v 1.5 2005/02/27 00:27:02 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mm58167.c,v 1.6 2005/06/04 20:14:25 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -53,8 +53,8 @@ __KERNEL_RCSID(0, "$NetBSD: mm58167.c,v 1.5 2005/02/27 00:27:02 perry Exp $");
|
||||
#include <dev/clock_subr.h>
|
||||
#include <dev/ic/mm58167var.h>
|
||||
|
||||
int mm58167_gettime(todr_chip_handle_t, struct timeval *);
|
||||
int mm58167_settime(todr_chip_handle_t, struct timeval *);
|
||||
int mm58167_gettime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int mm58167_settime(todr_chip_handle_t, volatile struct timeval *);
|
||||
int mm58167_getcal(todr_chip_handle_t, int *);
|
||||
int mm58167_setcal(todr_chip_handle_t, int);
|
||||
|
||||
@ -91,7 +91,7 @@ mm58167_attach(sc)
|
||||
int
|
||||
mm58167_gettime(handle, tv)
|
||||
todr_chip_handle_t handle;
|
||||
struct timeval *tv;
|
||||
volatile struct timeval *tv;
|
||||
{
|
||||
struct mm58167_softc *sc = handle->cookie;
|
||||
struct clock_ymdhms dt_hardware;
|
||||
@ -236,7 +236,7 @@ mm58167_gettime(handle, tv)
|
||||
int
|
||||
mm58167_settime(handle, tv)
|
||||
todr_chip_handle_t handle;
|
||||
struct timeval *tv;
|
||||
volatile struct timeval *tv;
|
||||
{
|
||||
struct mm58167_softc *sc = handle->cookie;
|
||||
struct clock_ymdhms dt_hardware;
|
||||
|
Loading…
Reference in New Issue
Block a user