Fix device_t/softc confusion.
(currently harmless since they are not split yet)
This commit is contained in:
parent
96976f4680
commit
ed9bbcc9a4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.21 2011/02/08 20:20:15 rmind Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.22 2011/03/16 14:43:36 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 Shin Takemura, All rights reserved.
|
||||
|
@ -68,7 +68,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.21 2011/02/08 20:20:15 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.22 2011/03/16 14:43:36 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -83,12 +83,12 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.21 2011/02/08 20:20:15 rmind Exp $");
|
|||
* Register CPU(VR41XX or TX39XX) dependent clock routine to system.
|
||||
*/
|
||||
void
|
||||
platform_clock_attach(void *ctx, struct platform_clock *clock)
|
||||
platform_clock_attach(device_t dev, struct platform_clock *clock)
|
||||
{
|
||||
|
||||
printf("\n");
|
||||
|
||||
clock->self = ctx;
|
||||
clock->self = dev;
|
||||
platform.clock = clock;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysconf.h,v 1.16 2011/02/20 07:58:14 matt Exp $ */
|
||||
/* $NetBSD: sysconf.h,v 1.17 2011/03/16 14:43:36 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -73,12 +73,12 @@ extern struct platform {
|
|||
|
||||
struct platform_clock {
|
||||
int hz;
|
||||
void (*init)(struct device *);
|
||||
void (*init)(device_t);
|
||||
void *self;
|
||||
int start;
|
||||
};
|
||||
|
||||
void platform_clock_attach(void *, struct platform_clock *);
|
||||
void platform_clock_attach(device_t, struct platform_clock *);
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_HPCMIPS_SYSCONF_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tx39clock.c,v 1.24 2011/03/16 14:39:26 tsutsui Exp $ */
|
||||
/* $NetBSD: tx39clock.c,v 1.25 2011/03/16 14:43:37 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tx39clock.c,v 1.24 2011/03/16 14:39:26 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tx39clock.c,v 1.25 2011/03/16 14:43:37 tsutsui Exp $");
|
||||
|
||||
#include "opt_tx39clock_debug.h"
|
||||
|
||||
|
@ -110,7 +110,7 @@ void
|
|||
tx39clock_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct txsim_attach_args *ta = aux;
|
||||
struct tx39clock_softc *sc = (void*)self;
|
||||
struct tx39clock_softc *sc = device_private(self);
|
||||
tx_chipset_tag_t tc;
|
||||
txreg_t reg;
|
||||
|
||||
|
@ -248,9 +248,9 @@ tx39_timecount(struct timecounter *tch)
|
|||
}
|
||||
|
||||
void
|
||||
tx39clock_init(struct device *dev)
|
||||
tx39clock_init(device_t self)
|
||||
{
|
||||
struct tx39clock_softc *sc = (void*)dev;
|
||||
struct tx39clock_softc *sc = device_private(self);
|
||||
tx_chipset_tag_t tc = sc->sc_tc;
|
||||
txreg_t reg;
|
||||
int pcnt;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rtc.c,v 1.29 2011/03/16 14:28:39 tsutsui Exp $ */
|
||||
/* $NetBSD: rtc.c,v 1.30 2011/03/16 14:43:37 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.29 2011/03/16 14:28:39 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.30 2011/03/16 14:43:37 tsutsui Exp $");
|
||||
|
||||
#include "opt_vr41xx.h"
|
||||
|
||||
|
@ -88,7 +88,7 @@ struct vrrtc_softc {
|
|||
struct timecounter sc_tc;
|
||||
};
|
||||
|
||||
void vrrtc_init(struct device *);
|
||||
void vrrtc_init(device_t);
|
||||
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 *);
|
||||
|
@ -125,7 +125,7 @@ void
|
|||
vrrtc_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct vrip_attach_args *va = aux;
|
||||
struct vrrtc_softc *sc = (void *)self;
|
||||
struct vrrtc_softc *sc = device_private(self);
|
||||
int year;
|
||||
|
||||
#ifndef SINGLE_VRIP_BASE
|
||||
|
@ -217,7 +217,7 @@ vrrtc_attach(struct device *parent, struct device *self, void *aux)
|
|||
sc->sc_todr.cookie = sc;
|
||||
todr_attach(&sc->sc_todr);
|
||||
|
||||
platform_clock_attach(sc, &vr_clock);
|
||||
platform_clock_attach(self, &vr_clock);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -236,9 +236,9 @@ vrrtc_intr(void *arg, uint32_t pc, uint32_t status)
|
|||
}
|
||||
|
||||
void
|
||||
vrrtc_init(struct device *dev)
|
||||
vrrtc_init(device_t self)
|
||||
{
|
||||
struct vrrtc_softc *sc = (struct vrrtc_softc *)dev;
|
||||
struct vrrtc_softc *sc = device_private(self);
|
||||
|
||||
DDUMP_REGS(sc);
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue