Remove `volatile' qualifier from argument types of

struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
This commit is contained in:
tsutsui 2009-12-12 14:44:08 +00:00
parent 313960fcf1
commit 471e528b58
31 changed files with 179 additions and 191 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: drbbc.c,v 1.17 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: drbbc.c,v 1.18 2009/12/12 14:44:08 tsutsui Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: drbbc.c,v 1.17 2008/04/28 20:23:12 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: drbbc.c,v 1.18 2009/12/12 14:44:08 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -59,8 +59,8 @@ void draco_ds_reset(void *);
void drbbc_attach(struct device *, struct device *, void *);
int drbbc_match(struct device *, struct cfdata *, void *);
int dracougettod(todr_chip_handle_t, volatile struct timeval *);
int dracousettod(todr_chip_handle_t, volatile struct timeval *);
int dracougettod(todr_chip_handle_t, struct timeval *);
int dracousettod(todr_chip_handle_t, struct timeval *);
static struct todr_chip_handle dracotodr;
struct drbbc_softc {
@ -163,7 +163,7 @@ draco_ds_reset(void *p)
}
int
dracougettod(todr_chip_handle_t h, volatile struct timeval *tvp)
dracougettod(todr_chip_handle_t h, struct timeval *tvp)
{
u_int32_t clkbuf;
u_int32_t usecs;
@ -194,7 +194,7 @@ dracougettod(todr_chip_handle_t h, volatile struct timeval *tvp)
}
int
dracousettod(todr_chip_handle_t h, volatile struct timeval *tvp)
dracousettod(todr_chip_handle_t h, struct timeval *tvp)
{
return (ENXIO);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: eprtc.c,v 1.2 2006/09/04 23:45:30 gdamore Exp $ */
/* $NetBSD: eprtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $ */
/*
* Copyright (c) 2005 HAMAJIMA Katsuomi. All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: eprtc.c,v 1.2 2006/09/04 23:45:30 gdamore Exp $");
__KERNEL_RCSID(0, "$NetBSD: eprtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -51,10 +51,8 @@ static void eprtc_attach(struct device *, struct device *, void *);
CFATTACH_DECL(eprtc, sizeof(struct eprtc_softc),
eprtc_match, eprtc_attach, NULL, NULL);
static int eprtc_gettime(struct todr_chip_handle *,
volatile struct timeval *);
static int eprtc_settime(struct todr_chip_handle *,
volatile struct timeval *);
static int eprtc_gettime(struct todr_chip_handle *, struct timeval *);
static int eprtc_settime(struct todr_chip_handle *, struct timeval *);
static int
eprtc_match(struct device *parent, struct cfdata *match, void *aux)
@ -85,7 +83,7 @@ eprtc_attach(struct device *parent, struct device *self, void *aux)
}
static int
eprtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
eprtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct eprtc_softc *sc = ch->cookie;;
@ -95,7 +93,7 @@ eprtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
eprtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
eprtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct eprtc_softc *sc = ch->cookie;;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pxa2x0_rtc.c,v 1.2 2009/08/09 06:12:34 kiyohara Exp $ */
/* $NetBSD: pxa2x0_rtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $ */
/*
* Copyright (c) 2007 NONAKA Kimihiro <nonaka@netbsd.org>
@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pxa2x0_rtc.c,v 1.2 2009/08/09 06:12:34 kiyohara Exp $");
__KERNEL_RCSID(0, "$NetBSD: pxa2x0_rtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -61,8 +61,8 @@ CFATTACH_DECL(pxartc, sizeof(struct pxartc_softc),
pxartc_match, pxartc_attach, NULL, NULL);
/* todr(9) interface */
static int pxartc_todr_gettime(todr_chip_handle_t, volatile struct timeval *);
static int pxartc_todr_settime(todr_chip_handle_t, volatile struct timeval *);
static int pxartc_todr_gettime(todr_chip_handle_t, struct timeval *);
static int pxartc_todr_settime(todr_chip_handle_t, struct timeval *);
static int pxartc_wristwatch_read(struct pxartc_softc *,struct clock_ymdhms *);
static int pxartc_wristwatch_write(struct pxartc_softc *,struct clock_ymdhms *);
@ -111,7 +111,7 @@ pxartc_attach(struct device *parent, struct device *self, void *aux)
}
static int
pxartc_todr_gettime(todr_chip_handle_t ch, volatile struct timeval *tv)
pxartc_todr_gettime(todr_chip_handle_t ch, struct timeval *tv)
{
struct pxartc_softc *sc = ch->cookie;
struct clock_ymdhms dt;
@ -141,7 +141,7 @@ pxartc_todr_gettime(todr_chip_handle_t ch, volatile struct timeval *tv)
}
static int
pxartc_todr_settime(todr_chip_handle_t ch, volatile struct timeval *tv)
pxartc_todr_settime(todr_chip_handle_t ch, struct timeval *tv)
{
struct pxartc_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: g2rtc.c,v 1.3 2008/04/28 20:23:16 martin Exp $ */
/* $NetBSD: g2rtc.c,v 1.4 2009/12/12 14:44:09 tsutsui Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: g2rtc.c,v 1.3 2008/04/28 20:23:16 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: g2rtc.c,v 1.4 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -61,8 +61,8 @@ CFATTACH_DECL(g2rtc, sizeof(struct g2rtc_softc),
/* todr(9) methods */
static int g2rtc_todr_gettime(todr_chip_handle_t, volatile struct timeval *);
static int g2rtc_todr_settime(todr_chip_handle_t, volatile struct timeval *);
static int g2rtc_todr_gettime(todr_chip_handle_t, struct timeval *);
static int g2rtc_todr_settime(todr_chip_handle_t, struct timeval *);
static struct todr_chip_handle g2rtc_todr_handle = {
.cookie = NULL, /* set on attach */
@ -121,7 +121,7 @@ g2rtc_read(bus_space_tag_t bt, bus_space_handle_t bh)
* Return 0 on success; an error number otherwise.
*/
static int
g2rtc_todr_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
g2rtc_todr_gettime(todr_chip_handle_t handle, struct timeval *tv)
{
struct g2rtc_softc *sc = handle->cookie;
uint32_t new, old;
@ -151,7 +151,7 @@ g2rtc_todr_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
* Return 0 on success; an error number otherwise.
*/
static int
g2rtc_todr_settime(todr_chip_handle_t handle, volatile struct timeval *tv)
g2rtc_todr_settime(todr_chip_handle_t handle, struct timeval *tv)
{
struct g2rtc_softc *sc = handle->cookie;
uint32_t secs;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pl030_rtc.c,v 1.9 2009/07/21 16:04:16 dyoung Exp $ */
/* $NetBSD: pl030_rtc.c,v 1.10 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 2001 ARM Ltd
@ -32,7 +32,7 @@
/* Include header files */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pl030_rtc.c,v 1.9 2009/07/21 16:04:16 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: pl030_rtc.c,v 1.10 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -64,7 +64,7 @@ CFATTACH_DECL_NEW(plrtc, sizeof(struct plrtc_softc),
plrtc_probe, plrtc_attach, NULL, NULL);
static int
plrtc_gettime(todr_chip_handle_t todr, volatile struct timeval *tv)
plrtc_gettime(todr_chip_handle_t todr, struct timeval *tv)
{
struct plrtc_softc *sc;
@ -75,7 +75,7 @@ plrtc_gettime(todr_chip_handle_t todr, volatile struct timeval *tv)
}
static int
plrtc_settime(todr_chip_handle_t todr, volatile struct timeval *tv)
plrtc_settime(todr_chip_handle_t todr, struct timeval *tv)
{
struct plrtc_softc *sc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pdc.c,v 1.33 2009/11/21 15:36:33 rmind Exp $ */
/* $NetBSD: pdc.c,v 1.34 2009/12/12 14:44:10 tsutsui Exp $ */
/* $OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $ */
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.33 2009/11/21 15:36:33 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.34 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -94,8 +94,8 @@ int pdccnlookc(dev_t, int *);
static struct cnm_state pdc_cnm_state;
static int pdcgettod(todr_chip_handle_t, volatile struct timeval *);
static int pdcsettod(todr_chip_handle_t, volatile struct timeval *);
static int pdcgettod(todr_chip_handle_t, struct timeval *);
static int pdcsettod(todr_chip_handle_t, struct timeval *);
static struct pdc_tod tod PDC_ALIGNMENT;
@ -450,7 +450,7 @@ pdccnpollc(dev_t dev, int on)
}
static int
pdcgettod(todr_chip_handle_t tch, volatile struct timeval *tvp)
pdcgettod(todr_chip_handle_t tch, struct timeval *tvp)
{
int error;
@ -465,7 +465,7 @@ pdcgettod(todr_chip_handle_t tch, volatile struct timeval *tvp)
}
static int
pdcsettod(todr_chip_handle_t tch, volatile struct timeval *tvp)
pdcsettod(todr_chip_handle_t tch, struct timeval *tvp)
{
int error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtc.c,v 1.25 2008/01/04 22:13:57 ad Exp $ */
/* $NetBSD: rtc.c,v 1.26 2009/12/12 14:44:08 tsutsui Exp $ */
/*-
* Copyright (c) 1999 Shin Takemura. All rights reserved.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.25 2008/01/04 22:13:57 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.26 2009/12/12 14:44:08 tsutsui Exp $");
#include "opt_vr41xx.h"
@ -88,8 +88,8 @@ struct vrrtc_softc {
};
void vrrtc_init(struct device *);
int vrrtc_get(todr_chip_handle_t, volatile struct timeval *);
int vrrtc_set(todr_chip_handle_t, volatile struct timeval *);
int vrrtc_get(todr_chip_handle_t, struct timeval *);
int vrrtc_set(todr_chip_handle_t, struct timeval *);
uint32_t vrrtc_get_timecount(struct timecounter *);
struct platform_clock vr_clock = {
@ -271,7 +271,7 @@ vrrtc_get_timecount(struct timecounter *tc)
}
int
vrrtc_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
vrrtc_get(todr_chip_handle_t tch, struct timeval *tvp)
{
struct vrrtc_softc *sc = (struct vrrtc_softc *)tch->cookie;
@ -303,7 +303,7 @@ vrrtc_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
}
int
vrrtc_set(todr_chip_handle_t tch, volatile struct timeval *tvp)
vrrtc_set(todr_chip_handle_t tch, struct timeval *tvp)
{
struct vrrtc_softc *sc = (struct vrrtc_softc *)tch->cookie;
bus_space_tag_t iot = sc->sc_iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.47 2008/07/22 14:43:45 hauke Exp $ */
/* $NetBSD: clock.c,v 1.48 2009/12/12 14:44:08 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -108,7 +108,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.47 2008/07/22 14:43:45 hauke Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.48 2009/12/12 14:44:08 tsutsui Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -137,8 +137,8 @@ int clock_debug = 0;
#endif
void rtclock_intr(void);
static int mac68k_gettime(todr_chip_handle_t, volatile struct timeval *);
static int mac68k_settime(todr_chip_handle_t, volatile struct timeval *);
static int mac68k_gettime(todr_chip_handle_t, struct timeval *);
static int mac68k_settime(todr_chip_handle_t, struct timeval *);
static u_int via1_t2_get_timecount(struct timecounter *);
#define DIFF19041970 2082844800
@ -408,7 +408,7 @@ int mac68k_trust_pram = 1;
* and sanity checking.
*/
int
mac68k_gettime(todr_chip_handle_t tch, volatile struct timeval *tvp)
mac68k_gettime(todr_chip_handle_t tch, struct timeval *tvp)
{
u_long timbuf;
@ -429,7 +429,7 @@ mac68k_gettime(todr_chip_handle_t tch, volatile struct timeval *tvp)
}
int
mac68k_settime(todr_chip_handle_t tch, volatile struct timeval *tvp)
mac68k_settime(todr_chip_handle_t tch, struct timeval *tvp)
{
if (mac68k_trust_pram)
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: adb.c,v 1.28 2009/11/01 01:51:35 snj Exp $ */
/* $NetBSD: adb.c,v 1.29 2009/12/12 14:44:09 tsutsui Exp $ */
/*-
* Copyright (C) 1994 Bradley A. Grantham
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.28 2009/11/01 01:51:35 snj Exp $");
__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.29 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -267,7 +267,7 @@ adbprint(void *args, const char *name)
#define DIFF19041970 2082844800
static int
adb_todr_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
adb_todr_get(todr_chip_handle_t tch, struct timeval *tvp)
{
unsigned long sec;
@ -279,7 +279,7 @@ adb_todr_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
}
static int
adb_todr_set(todr_chip_handle_t tch, volatile struct timeval *tvp)
adb_todr_set(todr_chip_handle_t tch, struct timeval *tvp)
{
unsigned long sec;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cuda.c,v 1.14 2009/03/18 10:22:31 cegger Exp $ */
/* $NetBSD: cuda.c,v 1.15 2009/12/12 14:44:09 tsutsui Exp $ */
/*-
* Copyright (c) 2006 Michael Lorenz
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.14 2009/03/18 10:22:31 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.15 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -132,8 +132,8 @@ static int cuda_set_handler(void *, int, int (*)(void *, int, uint8_t *), void *
static int cuda_error_handler(void *, int, uint8_t *);
static int cuda_todr_handler(void *, int, uint8_t *);
static int cuda_todr_set(todr_chip_handle_t, volatile struct timeval *);
static int cuda_todr_get(todr_chip_handle_t, volatile struct timeval *);
static int cuda_todr_set(todr_chip_handle_t, struct timeval *);
static int cuda_todr_get(todr_chip_handle_t, struct timeval *);
static int cuda_adb_handler(void *, int, uint8_t *);
static void cuda_final(device_t);
@ -749,7 +749,7 @@ cuda_todr_handler(void *cookie, int len, uint8_t *data)
#define DIFF19041970 2082844800
static int
cuda_todr_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
cuda_todr_get(todr_chip_handle_t tch, struct timeval *tvp)
{
struct cuda_softc *sc = tch->cookie;
int cnt = 0;
@ -773,7 +773,7 @@ cuda_todr_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
}
static int
cuda_todr_set(todr_chip_handle_t tch, volatile struct timeval *tvp)
cuda_todr_set(todr_chip_handle_t tch, struct timeval *tvp)
{
struct cuda_softc *sc = tch->cookie;
uint32_t sec;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmu.c,v 1.16 2009/03/18 10:22:32 cegger Exp $ */
/* $NetBSD: pmu.c,v 1.17 2009/12/12 14:44:09 tsutsui Exp $ */
/*-
* Copyright (c) 2006 Michael Lorenz
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.16 2009/03/18 10:22:32 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.17 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -118,8 +118,8 @@ static void pmu_register_callback(void *, void (*)(void *), void *);
*/
static int pmu_send(void *, int, int, uint8_t *, int, uint8_t *);
static void pmu_adb_poll(void *);
static int pmu_todr_set(todr_chip_handle_t, volatile struct timeval *);
static int pmu_todr_get(todr_chip_handle_t, volatile struct timeval *);
static int pmu_todr_set(todr_chip_handle_t, struct timeval *);
static int pmu_todr_get(todr_chip_handle_t, struct timeval *);
static int pmu_adb_handler(void *, int, uint8_t *);
@ -683,7 +683,7 @@ pmu_error_handler(void *cookie, int len, uint8_t *data)
#define DIFF19041970 2082844800
static int
pmu_todr_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
pmu_todr_get(todr_chip_handle_t tch, struct timeval *tvp)
{
struct pmu_softc *sc = tch->cookie;
uint32_t sec;
@ -700,7 +700,7 @@ pmu_todr_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
}
static int
pmu_todr_set(todr_chip_handle_t tch, volatile struct timeval *tvp)
pmu_todr_set(todr_chip_handle_t tch, struct timeval *tvp)
{
struct pmu_softc *sc = tch->cookie;
uint32_t sec;

View File

@ -1,4 +1,4 @@
/* $NetBSD: aurtc.c,v 1.11 2006/09/04 23:45:30 gdamore Exp $ */
/* $NetBSD: aurtc.c,v 1.12 2009/12/12 14:44:09 tsutsui Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@ -68,7 +68,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aurtc.c,v 1.11 2006/09/04 23:45:30 gdamore Exp $");
__KERNEL_RCSID(0, "$NetBSD: aurtc.c,v 1.12 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -96,8 +96,8 @@ struct aurtc_softc {
static int aurtc_match(struct device *, struct cfdata *, void *);
static void aurtc_attach(struct device *, struct device *, void *);
static int aurtc_gettime(todr_chip_handle_t, volatile struct timeval *);
static int aurtc_settime(todr_chip_handle_t, volatile struct timeval *);
static int aurtc_gettime(todr_chip_handle_t, struct timeval *);
static int aurtc_settime(todr_chip_handle_t, struct timeval *);
static void aurtc_shutdown(void *);
CFATTACH_DECL(aurtc, sizeof (struct aurtc_softc),
@ -137,7 +137,7 @@ aurtc_attach(struct device *parent, struct device *self, void *aux)
*/
int
aurtc_gettime(todr_chip_handle_t tch, volatile struct timeval *tv)
aurtc_gettime(todr_chip_handle_t tch, struct timeval *tv)
{
int s;
@ -148,7 +148,7 @@ aurtc_gettime(todr_chip_handle_t tch, volatile struct timeval *tv)
}
int
aurtc_settime(todr_chip_handle_t tch, volatile struct timeval *tvp)
aurtc_settime(todr_chip_handle_t tch, struct timeval *tvp)
{
int s;
struct timeval tv;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtc.c,v 1.14 2006/09/11 15:07:50 gdamore Exp $ */
/* $NetBSD: rtc.c,v 1.15 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 1998 Darrin Jewell
* Copyright (c) 1997 Rolf Grossmann
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.14 2006/09/11 15:07:50 gdamore Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.15 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h> /* for panic */
@ -61,8 +61,8 @@ volatile u_int *scr2 = (u_int *)NEXT_P_SCR2; /* will get memory mapped in rtc_in
static int gettime_old(todr_chip_handle_t, struct clock_ymdhms *);
static int settime_old(todr_chip_handle_t, struct clock_ymdhms *);
static int gettime_new(todr_chip_handle_t, volatile struct timeval *);
static int settime_new(todr_chip_handle_t, volatile struct timeval *);
static int gettime_new(todr_chip_handle_t, struct timeval *);
static int settime_new(todr_chip_handle_t, struct timeval *);
/*
* NB: This code should probably be converted to a _true_ device, then this
@ -346,7 +346,7 @@ settime_old(todr_chip_handle_t tcr, struct clock_ymdhms *dt)
}
int
gettime_new(todr_chip_handle_t tch, volatile struct timeval *tvp)
gettime_new(todr_chip_handle_t tch, struct timeval *tvp)
{
tvp->tv_sec = rtc_read(RTC_CNTR0) << 24 |
rtc_read(RTC_CNTR1) << 16 |
@ -356,7 +356,7 @@ gettime_new(todr_chip_handle_t tch, volatile struct timeval *tvp)
}
int
settime_new(todr_chip_handle_t tch, volatile struct timeval *tvp)
settime_new(todr_chip_handle_t tch, struct timeval *tvp)
{
/* Stop the clock */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dpclock.c,v 1.1 2009/02/12 06:33:57 rumble Exp $ */
/* $NetBSD: dpclock.c,v 1.2 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 2001 Erik Reid
@ -61,10 +61,8 @@ struct dpclock_softc {
static int dpclock_match(struct device *, struct cfdata *, void *);
static void dpclock_attach(struct device *, struct device *, void *);
static int dpclock_gettime(struct todr_chip_handle *,
volatile struct timeval *);
static int dpclock_settime(struct todr_chip_handle *,
volatile struct timeval *);
static int dpclock_gettime(struct todr_chip_handle *, struct timeval *);
static int dpclock_settime(struct todr_chip_handle *, struct timeval *);
CFATTACH_DECL(dpclock, sizeof(struct dpclock_softc),
dpclock_match, dpclock_attach, NULL, NULL);
@ -126,7 +124,7 @@ dpclock_attach(struct device *parent, struct device *self, void *aux)
* Get the time of day, based on the clock's value and/or the base value.
*/
static int
dpclock_gettime(struct todr_chip_handle *todrch, volatile struct timeval *tv)
dpclock_gettime(struct todr_chip_handle *todrch, struct timeval *tv)
{
struct dpclock_softc *sc = (struct dpclock_softc *)todrch->cookie;
struct clock_ymdhms dt;
@ -187,7 +185,7 @@ dpclock_gettime(struct todr_chip_handle *todrch, volatile struct timeval *tv)
* Reset the TODR based on the time value.
*/
static int
dpclock_settime(struct todr_chip_handle *todrch, volatile struct timeval *tv)
dpclock_settime(struct todr_chip_handle *todrch, struct timeval *tv)
{
struct dpclock_softc *sc = (struct dpclock_softc *)todrch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dsclock.c,v 1.1 2009/02/12 06:33:57 rumble Exp $ */
/* $NetBSD: dsclock.c,v 1.2 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 2001 Rafal K. Boni
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dsclock.c,v 1.1 2009/02/12 06:33:57 rumble Exp $");
__KERNEL_RCSID(0, "$NetBSD: dsclock.c,v 1.2 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -63,10 +63,8 @@ struct dsclock_softc {
static int dsclock_match(struct device *, struct cfdata *, void *);
static void dsclock_attach(struct device *, struct device *, void *);
static int dsclock_gettime(struct todr_chip_handle *,
volatile struct timeval *);
static int dsclock_settime(struct todr_chip_handle *,
volatile struct timeval *);
static int dsclock_gettime(struct todr_chip_handle *, struct timeval *);
static int dsclock_settime(struct todr_chip_handle *, struct timeval *);
CFATTACH_DECL(dsclock, sizeof(struct dsclock_softc),
dsclock_match, dsclock_attach, NULL, NULL);
@ -115,7 +113,7 @@ dsclock_attach(struct device *parent, struct device *self, void *aux)
* Get the time of day, based on the clock's value and/or the base value.
*/
static int
dsclock_gettime(struct todr_chip_handle *todrch, volatile struct timeval *tv)
dsclock_gettime(struct todr_chip_handle *todrch, struct timeval *tv)
{
struct dsclock_softc *sc = (struct dsclock_softc *)todrch->cookie;
struct clock_ymdhms dt;
@ -166,7 +164,7 @@ dsclock_gettime(struct todr_chip_handle *todrch, volatile struct timeval *tv)
* Reset the TODR based on the time value.
*/
static int
dsclock_settime(struct todr_chip_handle *todrch, volatile struct timeval *tv)
dsclock_settime(struct todr_chip_handle *todrch, struct timeval *tv)
{
struct dsclock_softc *sc = (struct dsclock_softc *)todrch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcclock_mace.c,v 1.10 2009/04/03 15:41:14 uebayasi Exp $ */
/* $NetBSD: mcclock_mace.c,v 1.11 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 2001 Antti Kantee. All Rights Reserved.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.10 2009/04/03 15:41:14 uebayasi Exp $");
__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.11 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -98,9 +98,9 @@ static int mcclock_mace_match(struct device *, struct cfdata *, void *);
static void mcclock_mace_attach(struct device*, struct device *, void *);
static int mcclock_mace_gettime(struct todr_chip_handle *,
volatile struct timeval *);
struct timeval *);
static int mcclock_mace_settime(struct todr_chip_handle *,
volatile struct timeval *);
struct timeval *);
unsigned int ds1687_read(void *arg, unsigned int addr);
void ds1687_write(void *arg, unsigned int addr, unsigned int data);
@ -175,8 +175,7 @@ ds1687_write(void *arg, unsigned int addr, unsigned int data)
}
static int
mcclock_mace_gettime(struct todr_chip_handle *todrch,
volatile struct timeval *tv)
mcclock_mace_gettime(struct todr_chip_handle *todrch, struct timeval *tv)
{
struct mcclock_mace_softc *sc =
(struct mcclock_mace_softc *)todrch->cookie;
@ -211,8 +210,7 @@ mcclock_mace_gettime(struct todr_chip_handle *todrch,
}
static int
mcclock_mace_settime(struct todr_chip_handle *todrch,
volatile struct timeval *tv)
mcclock_mace_settime(struct todr_chip_handle *todrch, struct timeval *tv)
{
struct mcclock_mace_softc *sc =
(struct mcclock_mace_softc *)todrch->cookie;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtc.c,v 1.15 2009/09/20 16:18:21 tsutsui Exp $ */
/* $NetBSD: rtc.c,v 1.16 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 2001 Valeriy E. Ushakov
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.15 2009/09/20 16:18:21 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.16 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -71,8 +71,8 @@ CFATTACH_DECL(rtc_ebus, sizeof(struct rtc_ebus_softc),
extern todr_chip_handle_t todr_handle;
/* todr(9) methods */
static int rtc_gettime(todr_chip_handle_t, volatile struct timeval *);
static int rtc_settime(todr_chip_handle_t, volatile struct timeval *);
static int rtc_gettime(todr_chip_handle_t, struct timeval *);
static int rtc_settime(todr_chip_handle_t, struct timeval *);
int rtc_auto_century_adjust = 1; /* XXX: do we ever want not to? */
@ -154,7 +154,7 @@ rtcattach_ebus(device_t parent, device_t self, void *aux)
* Return 0 on success; an error number otherwise.
*/
static int
rtc_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
rtc_gettime(todr_chip_handle_t handle, struct timeval *tv)
{
struct rtc_ebus_softc *sc = handle->cookie;
struct clock_ymdhms dt;
@ -201,7 +201,7 @@ rtc_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
* Return 0 on success; an error number otherwise.
*/
static int
rtc_settime(todr_chip_handle_t handle, volatile struct timeval *tv)
rtc_settime(todr_chip_handle_t handle, struct timeval *tv)
{
struct rtc_ebus_softc *sc = handle->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.h,v 1.6 2006/09/05 19:32:57 matt Exp $ */
/* $NetBSD: clock.h,v 1.7 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -69,10 +69,10 @@ extern volatile short *clk_page;
extern int clk_adrshift, clk_tweak;
/* Prototypes */
int generic_gettime(volatile struct timeval *);
void generic_settime(volatile struct timeval *);
int chip_gettime(volatile struct timeval *);
void chip_settime(volatile struct timeval *);
int generic_gettime(struct timeval *);
void generic_settime(struct timeval *);
int chip_gettime(struct timeval *);
void chip_settime(struct timeval *);
int yeartonum(int);
int numtoyear(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.86 2009/10/24 20:03:56 rmind Exp $ */
/* $NetBSD: cpu.h,v 1.87 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden
@ -70,10 +70,8 @@ struct cpu_dep {
void (*cpu_memerr)(void); /* Memory subsystem errors */
/* Autoconfiguration */
void (*cpu_conf)(void);
int (*cpu_gettime)(volatile struct timeval *);
/* Read cpu clock time */
void (*cpu_settime)(volatile struct timeval *);
/* Write system time to cpu */
int (*cpu_gettime)(struct timeval *); /* Read cpu clock time */
void (*cpu_settime)(struct timeval *); /* Write system time to cpu */
short cpu_vups; /* speed of cpu */
short cpu_scbsz; /* (estimated) size of SCB */
void (*cpu_halt)(void); /* Cpu dependent halt call */

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.51 2009/09/14 02:19:15 mhitch Exp $ */
/* $NetBSD: clock.c,v 1.52 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.51 2009/09/14 02:19:15 mhitch Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.52 2009/12/12 14:44:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -51,8 +51,8 @@ struct evcnt clock_intrcnt =
EVCNT_ATTACH_STATIC(clock_intrcnt);
static int vax_gettime(todr_chip_handle_t, volatile struct timeval *);
static int vax_settime(todr_chip_handle_t, volatile struct timeval *);
static int vax_gettime(todr_chip_handle_t, struct timeval *);
static int vax_settime(todr_chip_handle_t, struct timeval *);
static struct todr_chip_handle todr_handle = {
.todr_gettime = vax_gettime,
@ -166,14 +166,14 @@ cpu_initclocks(void)
}
int
vax_gettime(todr_chip_handle_t handle, volatile struct timeval *tvp)
vax_gettime(todr_chip_handle_t handle, struct timeval *tvp)
{
tvp->tv_sec = handle->base_time;
return (*dep_call->cpu_gettime)(tvp);
}
int
vax_settime(todr_chip_handle_t handle, volatile struct timeval *tvp)
vax_settime(todr_chip_handle_t handle, struct timeval *tvp)
{
(*dep_call->cpu_settime)(tvp);
return 0;
@ -221,7 +221,7 @@ numtoyear(int num)
* year; the TODR doesn't hold years.
*/
int
generic_gettime(volatile struct timeval *tvp)
generic_gettime(struct timeval *tvp)
{
unsigned klocka = mfpr(PR_TODR);
@ -244,7 +244,7 @@ generic_gettime(volatile struct timeval *tvp)
* Takes the current system time and writes it to the TODR.
*/
void
generic_settime(volatile struct timeval *tvp)
generic_settime(struct timeval *tvp)
{
unsigned tid = tvp->tv_sec, bastid;
@ -263,7 +263,7 @@ int clk_tweak; /* Offset of time into word. */
#define REGPOKE(off, v) (clk_page[off << clk_adrshift] = ((v) << clk_tweak))
int
chip_gettime(volatile struct timeval *tvp)
chip_gettime(struct timeval *tvp)
{
struct clock_ymdhms c;
int timeout = 1<<15, s;
@ -300,7 +300,7 @@ chip_gettime(volatile struct timeval *tvp)
}
void
chip_settime(volatile struct timeval *tvp)
chip_settime(struct timeval *tvp)
{
struct clock_ymdhms c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ka820.c,v 1.51 2009/11/21 04:45:39 rmind Exp $ */
/* $NetBSD: ka820.c,v 1.52 2009/12/12 14:44:09 tsutsui Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.51 2009/11/21 04:45:39 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.52 2009/12/12 14:44:09 tsutsui Exp $");
#include "opt_multiprocessor.h"
@ -82,8 +82,8 @@ static void ka820_attach(device_t, device_t, void*);
static void ka820_memerr(void);
static void ka820_conf(void);
static int ka820_mchk(void *);
static int ka820_gettime(volatile struct timeval *);
static void ka820_settime(volatile struct timeval *);
static int ka820_gettime(struct timeval *);
static void ka820_settime(struct timeval *);
static void rxcdintr(void *);
static void vaxbierr(void *);
@ -480,7 +480,7 @@ rxchar(void)
#endif
int
ka820_gettime(volatile struct timeval *tvp)
ka820_gettime(struct timeval *tvp)
{
struct clock_ymdhms c;
int s;
@ -512,7 +512,7 @@ ka820_gettime(volatile struct timeval *tvp)
}
void
ka820_settime(volatile struct timeval *tvp)
ka820_settime(struct timeval *tvp)
{
struct clock_ymdhms c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.52 2009/10/23 02:32:34 snj Exp $ */
/* $NetBSD: clock.c,v 1.53 2009/12/12 14:44:10 tsutsui Exp $ */
/*
*
@ -29,7 +29,7 @@
#include "opt_xen.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.52 2009/10/23 02:32:34 snj Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.53 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -233,7 +233,7 @@ xen_wall_time(struct timespec *wt)
}
static int
xen_rtc_get(todr_chip_handle_t todr, volatile struct timeval *tvp)
xen_rtc_get(todr_chip_handle_t todr, struct timeval *tvp)
{
struct timespec wt;
@ -245,7 +245,7 @@ xen_rtc_get(todr_chip_handle_t todr, volatile struct timeval *tvp)
}
static int
xen_rtc_set(todr_chip_handle_t todr, volatile struct timeval *tvp)
xen_rtc_set(todr_chip_handle_t todr, struct timeval *tvp)
{
#ifdef DOM0OPS
#if __XEN_INTERFACE_VERSION__ < 0x00030204

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcclock.c,v 1.23 2009/05/12 14:18:16 cegger Exp $ */
/* $NetBSD: mcclock.c,v 1.24 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.23 2009/05/12 14:18:16 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.24 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -52,8 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.23 2009/05/12 14:18:16 cegger Exp $");
void mcclock_init(device_t);
int mcclock_get(todr_chip_handle_t, volatile struct timeval *);
int mcclock_set(todr_chip_handle_t, volatile struct timeval *);
int mcclock_get(todr_chip_handle_t, struct timeval *);
int mcclock_set(todr_chip_handle_t, struct timeval *);
const struct clockfns mcclock_clockfns = {
mcclock_init,
@ -149,7 +149,7 @@ again:
* Get the time of day, based on the clock's value and/or the base value.
*/
int
mcclock_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
mcclock_get(todr_chip_handle_t tch, struct timeval *tvp)
{
struct mcclock_softc *sc = (struct mcclock_softc *)tch->cookie;
uint32_t yearsecs;
@ -195,7 +195,7 @@ mcclock_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
* Reset the TODR based on the time value.
*/
int
mcclock_set(todr_chip_handle_t tch, volatile struct timeval *tvp)
mcclock_set(todr_chip_handle_t tch, struct timeval *tvp)
{
struct mcclock_softc *sc = (struct mcclock_softc *)tch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: m41st84.c,v 1.14 2009/01/09 16:09:43 briggs Exp $ */
/* $NetBSD: m41st84.c,v 1.15 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.14 2009/01/09 16:09:43 briggs Exp $");
__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.15 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -80,8 +80,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 *, volatile struct timeval *);
static int strtc_settime(struct todr_chip_handle *, volatile struct timeval *);
static int strtc_gettime(struct todr_chip_handle *, struct timeval *);
static int strtc_settime(struct todr_chip_handle *, struct timeval *);
static int
strtc_match(device_t parent, cfdata_t cf, void *arg)
@ -223,7 +223,7 @@ strtc_write(dev_t dev, struct uio *uio, int flags)
}
static int
strtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
strtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct strtc_softc *sc = ch->cookie;
struct clock_ymdhms dt, check;
@ -249,7 +249,7 @@ strtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
strtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
strtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct strtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: m41t00.c,v 1.15 2008/06/08 03:49:26 tsutsui Exp $ */
/* $NetBSD: m41t00.c,v 1.16 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: m41t00.c,v 1.15 2008/06/08 03:49:26 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: m41t00.c,v 1.16 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -82,8 +82,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 *, volatile struct timeval *);
static int m41t00_settime(struct todr_chip_handle *, volatile struct timeval *);
static int m41t00_gettime(struct todr_chip_handle *, struct timeval *);
static int m41t00_settime(struct todr_chip_handle *, struct timeval *);
int
m41t00_match(device_t parent, cfdata_t cf, void *aux)
@ -228,7 +228,7 @@ m41t00_write(dev_t dev, struct uio *uio, int flags)
}
static int
m41t00_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
m41t00_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct m41t00_softc *sc = ch->cookie;
struct clock_ymdhms dt;
@ -243,7 +243,7 @@ m41t00_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
m41t00_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
m41t00_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct m41t00_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: max6900.c,v 1.11 2008/06/08 03:49:26 tsutsui Exp $ */
/* $NetBSD: max6900.c,v 1.12 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: max6900.c,v 1.11 2008/06/08 03:49:26 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: max6900.c,v 1.12 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -79,8 +79,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 *, volatile struct timeval *);
static int maxrtc_settime(struct todr_chip_handle *, volatile struct timeval *);
static int maxrtc_gettime(struct todr_chip_handle *, struct timeval *);
static int maxrtc_settime(struct todr_chip_handle *, struct timeval *);
int
maxrtc_match(device_t parent, cfdata_t cf, void *aux)
@ -250,7 +250,7 @@ maxrtc_write(dev_t dev, struct uio *uio, int flags)
}
static int
maxrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
maxrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct maxrtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;
@ -265,7 +265,7 @@ maxrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
maxrtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
maxrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct maxrtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcf8583.c,v 1.11 2008/06/08 03:49:26 tsutsui Exp $ */
/* $NetBSD: pcf8583.c,v 1.12 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcf8583.c,v 1.11 2008/06/08 03:49:26 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: pcf8583.c,v 1.12 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -89,8 +89,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 *, volatile struct timeval *);
static int pcfrtc_settime(struct todr_chip_handle *, volatile struct timeval *);
static int pcfrtc_gettime(struct todr_chip_handle *, struct timeval *);
static int pcfrtc_settime(struct todr_chip_handle *, struct timeval *);
int
pcfrtc_match(device_t parent, cfdata_t cf, void *aux)
@ -265,7 +265,7 @@ pcfrtc_write(dev_t dev, struct uio *uio, int flags)
}
static int
pcfrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
pcfrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct pcfrtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;
@ -282,7 +282,7 @@ pcfrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
pcfrtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
pcfrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct pcfrtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: r2025.c,v 1.5 2008/05/04 15:26:29 xtraeme Exp $ */
/* $NetBSD: r2025.c,v 1.6 2009/12/12 14:44:10 tsutsui Exp $ */
/*-
* Copyright (c) 2006 Shigeyuki Fukushima.
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: r2025.c,v 1.5 2008/05/04 15:26:29 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: r2025.c,v 1.6 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -63,10 +63,8 @@ static int r2025rtc_match(device_t, cfdata_t, void *);
CFATTACH_DECL_NEW(r2025rtc, sizeof(struct r2025rtc_softc),
r2025rtc_match, r2025rtc_attach, NULL, NULL);
static int r2025rtc_gettime(struct todr_chip_handle *,
volatile struct timeval *);
static int r2025rtc_settime(struct todr_chip_handle *,
volatile struct timeval *);
static int r2025rtc_gettime(struct todr_chip_handle *, struct timeval *);
static int r2025rtc_settime(struct todr_chip_handle *, struct timeval *);
static int r2025rtc_reg_write(struct r2025rtc_softc *, int, uint8_t*, int);
static int r2025rtc_reg_read(struct r2025rtc_softc *, int, uint8_t*, int);
@ -104,7 +102,7 @@ r2025rtc_attach(device_t parent, device_t self, void *arg)
}
static int
r2025rtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
r2025rtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct r2025rtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;
@ -156,7 +154,7 @@ r2025rtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
r2025rtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
r2025rtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct r2025rtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rs5c372.c,v 1.9 2008/05/04 15:26:29 xtraeme Exp $ */
/* $NetBSD: rs5c372.c,v 1.10 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 2005 Kimihiro Nonaka
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rs5c372.c,v 1.9 2008/05/04 15:26:29 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: rs5c372.c,v 1.10 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -59,8 +59,8 @@ CFATTACH_DECL_NEW(rs5c372rtc, sizeof(struct rs5c372rtc_softc),
static void rs5c372rtc_reg_write(struct rs5c372rtc_softc *, int, uint8_t);
static int rs5c372rtc_clock_read(struct rs5c372rtc_softc *, struct clock_ymdhms *);
static int rs5c372rtc_clock_write(struct rs5c372rtc_softc *, struct clock_ymdhms *);
static int rs5c372rtc_gettime(struct todr_chip_handle *, volatile struct timeval *);
static int rs5c372rtc_settime(struct todr_chip_handle *, volatile struct timeval *);
static int rs5c372rtc_gettime(struct todr_chip_handle *, struct timeval *);
static int rs5c372rtc_settime(struct todr_chip_handle *, struct timeval *);
static int
rs5c372rtc_match(device_t parent, cfdata_t cf, void *arg)
@ -97,7 +97,7 @@ rs5c372rtc_attach(device_t parent, device_t self, void *arg)
}
static int
rs5c372rtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
rs5c372rtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct rs5c372rtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;
@ -114,7 +114,7 @@ rs5c372rtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
rs5c372rtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
rs5c372rtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct rs5c372rtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: x1226.c,v 1.13 2008/06/08 03:49:26 tsutsui Exp $ */
/* $NetBSD: x1226.c,v 1.14 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 2003 Shigeyuki Fukushima.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.13 2008/06/08 03:49:26 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.14 2009/12/12 14:44:10 tsutsui 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 *, volatile struct timeval *);
static int xrtc_settime(struct todr_chip_handle *, volatile struct timeval *);
static int xrtc_gettime(struct todr_chip_handle *, struct timeval *);
static int xrtc_settime(struct todr_chip_handle *, struct timeval *);
/*
* xrtc_match()
@ -236,7 +236,7 @@ xrtc_write(dev_t dev, struct uio *uio, int flags)
static int
xrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
xrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct xrtc_softc *sc = ch->cookie;
struct clock_ymdhms dt, check;
@ -258,7 +258,7 @@ xrtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
}
static int
xrtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
xrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
{
struct xrtc_softc *sc = ch->cookie;
struct clock_ymdhms dt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mm58167.c,v 1.12 2009/12/11 11:07:04 tsutsui Exp $ */
/* $NetBSD: mm58167.c,v 1.13 2009/12/12 14:44:10 tsutsui Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mm58167.c,v 1.12 2009/12/11 11:07:04 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: mm58167.c,v 1.13 2009/12/12 14:44:10 tsutsui Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -46,8 +46,8 @@ __KERNEL_RCSID(0, "$NetBSD: mm58167.c,v 1.12 2009/12/11 11:07:04 tsutsui Exp $")
#include <dev/clock_subr.h>
#include <dev/ic/mm58167var.h>
int mm58167_gettime(todr_chip_handle_t, volatile struct timeval *);
int mm58167_settime(todr_chip_handle_t, volatile struct timeval *);
int mm58167_gettime(todr_chip_handle_t, struct timeval *);
int mm58167_settime(todr_chip_handle_t, struct timeval *);
/*
* To quote SunOS's todreg.h:
@ -79,7 +79,7 @@ mm58167_attach(struct mm58167_softc *sc)
* Set up the system's time, given a `reasonable' time value.
*/
int
mm58167_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
mm58167_gettime(todr_chip_handle_t handle, struct timeval *tv)
{
struct mm58167_softc *sc = handle->cookie;
struct clock_ymdhms dt_hardware;
@ -235,7 +235,7 @@ mm58167_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
}
int
mm58167_settime(todr_chip_handle_t handle, volatile struct timeval *tv)
mm58167_settime(todr_chip_handle_t handle, struct timeval *tv)
{
struct mm58167_softc *sc = handle->cookie;
struct clock_ymdhms dt_hardware;