Split device_t/softc. Tested on SS1+.
XXX: sparc/dev/cgthree.c in Attic had an attachment for cgthree* at obio? XXX: and sparc/conf/files.sparc still has an entry of nonexistent (or not yet) XXX: sparc/dev/cgthree_obio.c. Is there any sun4m machine which requires it?
This commit is contained in:
parent
a29a5a7659
commit
853e246fe1
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cgthree_sbus.c,v 1.28 2009/09/18 12:23:16 tsutsui Exp $ */
|
||||
/* $NetBSD: cgthree_sbus.c,v 1.29 2009/09/18 16:43:19 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.28 2009/09/18 12:23:16 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.29 2009/09/18 16:43:19 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -108,7 +108,7 @@ __KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.28 2009/09/18 12:23:16 tsutsui Ex
|
||||
static int cgthreematch_sbus(device_t, cfdata_t, void *);
|
||||
static void cgthreeattach_sbus(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL(cgthree_sbus, sizeof(struct cgthree_softc),
|
||||
CFATTACH_DECL_NEW(cgthree_sbus, sizeof(struct cgthree_softc),
|
||||
cgthreematch_sbus, cgthreeattach_sbus, NULL, NULL);
|
||||
|
||||
/*
|
||||
@ -139,6 +139,8 @@ cgthreeattach_sbus(device_t parent, device_t self, void *args)
|
||||
const char *name;
|
||||
bus_space_handle_t bh;
|
||||
|
||||
sc->sc_dev = self;
|
||||
|
||||
/* Remember cookies for cgthree_mmap() */
|
||||
sc->sc_bustag = sa->sa_bustag;
|
||||
sc->sc_paddr = sbus_bus_addr(sa->sa_bustag, sa->sa_slot, sa->sa_offset);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cgthree.c,v 1.23 2009/05/12 14:46:39 cegger Exp $ */
|
||||
/* $NetBSD: cgthree.c,v 1.24 2009/09/18 16:43:19 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.23 2009/05/12 14:46:39 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.24 2009/09/18 16:43:19 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -257,7 +257,7 @@ cgthreeattach(struct cgthree_softc *sc, const char *name, int isconsole)
|
||||
aa.console = isconsole;
|
||||
aa.accessops = &cgthree_accessops;
|
||||
aa.accesscookie = &sc->vd;
|
||||
config_found(&sc->sc_dev, &aa, wsemuldisplaydevprint);
|
||||
config_found(sc->sc_dev, &aa, wsemuldisplaydevprint);
|
||||
#else
|
||||
/* Initialize the default color map. */
|
||||
bt_initcmap(&sc->sc_cmap, 256);
|
||||
@ -336,10 +336,11 @@ cgthreeioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l)
|
||||
* Undo the effect of an FBIOSVIDEO that turns the video off.
|
||||
*/
|
||||
static void
|
||||
cgthreeunblank(device_t dev)
|
||||
cgthreeunblank(device_t self)
|
||||
{
|
||||
struct cgthree_softc *sc = device_private(self);
|
||||
|
||||
cgthree_set_video(device_private(dev), 1);
|
||||
cgthree_set_video(sc, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cgthreevar.h,v 1.7 2009/02/23 22:44:27 jdc Exp $ */
|
||||
/* $NetBSD: cgthreevar.h,v 1.8 2009/09/18 16:43:19 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
/* per-display variables */
|
||||
struct cgthree_softc {
|
||||
struct device sc_dev; /* base device */
|
||||
device_t sc_dev; /* base device */
|
||||
struct fbdevice sc_fb; /* frame buffer device */
|
||||
bus_space_tag_t sc_bustag;
|
||||
bus_addr_t sc_paddr; /* phys address for device mmap() */
|
||||
|
Loading…
Reference in New Issue
Block a user