summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2011-06-04 01:57:34 +0000
committertsutsui <tsutsui@NetBSD.org>2011-06-04 01:57:34 +0000
commit1a2269f50d0aee3fc1316ba8e8b5c52f744e5fc4 (patch)
tree8415dcaddaf096be2e7800bdd6e5d04139a4012c /sys/dev
parent78d476edbbd2392845381da2d002f5ea7ff300f9 (diff)
Split device_t/softc. pmax is tested on GXemul.
Compile test only for alpha and vax. XXX: alpha/tc/tcasic.c calls tcattach() via config_found(9), but XXX: pmax/tc/tcbus.c and vax/vsa/tc_vsbus.c calls tcattach() directly. XXX: It looks horrible...
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/tc/tc.c8
-rw-r--r--sys/dev/tc/tcvar.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/tc/tc.c b/sys/dev/tc/tc.c
index 4ea8fa9ad42..0e4b5e664e7 100644
--- a/sys/dev/tc/tc.c
+++ b/sys/dev/tc/tc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tc.c,v 1.50 2009/05/12 14:47:04 cegger Exp $ */
+/* $NetBSD: tc.c,v 1.51 2011/06/04 01:57:34 tsutsui Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.50 2009/05/12 14:47:04 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.51 2011/06/04 01:57:34 tsutsui Exp $");
#include "opt_tcverbose.h"
@@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.50 2009/05/12 14:47:04 cegger Exp $");
/* Definition of the driver for autoconfig. */
static int tcmatch(device_t, cfdata_t, void *);
-CFATTACH_DECL(tc, sizeof(struct tc_softc),
+CFATTACH_DECL_NEW(tc, sizeof(struct tc_softc),
tcmatch, tcattach, NULL, NULL);
extern struct cfdriver tc_cd;
@@ -78,6 +78,8 @@ tcattach(device_t parent, device_t self, void *aux)
int i;
int locs[TCCF_NLOCS];
+ sc->sc_dev = self;
+
printf(": %s MHz clock\n",
tba->tba_speed == TC_SPEED_25_MHZ ? "25" : "12.5");
diff --git a/sys/dev/tc/tcvar.h b/sys/dev/tc/tcvar.h
index 49bb2eb918d..9606fa8a1d6 100644
--- a/sys/dev/tc/tcvar.h
+++ b/sys/dev/tc/tcvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: tcvar.h,v 1.25 2011/02/20 08:03:22 matt Exp $ */
+/* $NetBSD: tcvar.h,v 1.26 2011/06/04 01:57:34 tsutsui Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -64,7 +64,7 @@
#endif /* 1 */
struct tc_softc {
- struct device sc_dv;
+ device_t sc_dev;
int sc_speed;
int sc_nslots;