summaryrefslogtreecommitdiff
path: root/sys/arch/sun3/dev/cg4.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sun3/dev/cg4.c')
-rw-r--r--sys/arch/sun3/dev/cg4.c47
1 files changed, 20 insertions, 27 deletions
diff --git a/sys/arch/sun3/dev/cg4.c b/sys/arch/sun3/dev/cg4.c
index 170621cab8f..960e7bdb0fe 100644
--- a/sys/arch/sun3/dev/cg4.c
+++ b/sys/arch/sun3/dev/cg4.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cg4.c,v 1.12 1996/12/17 21:10:39 gwr Exp $ */
+/* $NetBSD: cg4.c,v 1.11 1996/10/29 19:54:19 gwr Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -60,20 +60,17 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/conf.h>
#include <sys/device.h>
#include <sys/ioctl.h>
#include <sys/malloc.h>
#include <sys/mman.h>
-#include <sys/proc.h>
#include <sys/tty.h>
#include <vm/vm.h>
-#include <machine/autoconf.h>
#include <machine/cpu.h>
#include <machine/fbio.h>
-#include <machine/idprom.h>
+#include <machine/autoconf.h>
#include <machine/pmap.h>
#include "fbvar.h"
@@ -81,8 +78,6 @@
#include "btvar.h"
#include "cg4reg.h"
-cdev_decl(cg4);
-
#define CG4_MMAP_SIZE (CG4_OVERLAY_SIZE + CG4_ENABLE_SIZE + CG4_PIXMAP_SIZE)
extern unsigned char cpu_machine_id;
@@ -121,11 +116,14 @@ struct cfdriver cgfour_cd = {
NULL, "cgfour", DV_DULL
};
-static int cg4gattr __P((struct fbdevice *, void *));
-static int cg4gvideo __P((struct fbdevice *, void *));
-static int cg4svideo __P((struct fbdevice *, void *));
-static int cg4getcmap __P((struct fbdevice *, void *));
-static int cg4putcmap __P((struct fbdevice *, void *));
+/* frame buffer generic driver */
+int cg4open(), cg4close(), cg4mmap();
+
+static int cg4gattr __P((struct fbdevice *, struct fbgattr *));
+static int cg4gvideo __P((struct fbdevice *, int *));
+static int cg4svideo __P((struct fbdevice *, int *));
+static int cg4getcmap __P((struct fbdevice *, struct fbcmap *));
+static int cg4putcmap __P((struct fbdevice *, struct fbcmap *));
static void cg4a_init __P((struct cg4_softc *));
static void cg4a_svideo __P((struct cg4_softc *, int));
@@ -345,11 +343,10 @@ cg4mmap(dev, off, prot)
*/
/* FBIOGATTR: */
-static int cg4gattr(fb, data)
+static int cg4gattr(fb, fba)
struct fbdevice *fb;
- void *data;
+ struct fbgattr *fba;
{
- struct fbgattr *fba = data;
fba->real_type = fb->fb_fbtype.fb_type;
fba->owner = 0; /* XXX - TIOCCONS stuff? */
@@ -363,11 +360,10 @@ static int cg4gattr(fb, data)
}
/* FBIOGVIDEO: */
-static int cg4gvideo(fb, data)
+static int cg4gvideo(fb, on)
struct fbdevice *fb;
- void *data;
+ int *on;
{
- int *on = data;
struct cg4_softc *sc = fb->fb_private;
*on = !sc->sc_blanked;
@@ -375,11 +371,10 @@ static int cg4gvideo(fb, data)
}
/* FBIOSVIDEO: */
-static int cg4svideo(fb, data)
+static int cg4svideo(fb, on)
struct fbdevice *fb;
- void *data;
+ int *on;
{
- int *on = data;
struct cg4_softc *sc = fb->fb_private;
int state;
@@ -395,11 +390,10 @@ static int cg4svideo(fb, data)
* FBIOGETCMAP:
* Copy current colormap out to user space.
*/
-static int cg4getcmap(fb, data)
+static int cg4getcmap(fb, fbcm)
struct fbdevice *fb;
- void *data;
+ struct fbcmap *fbcm;
{
- struct fbcmap *fbcm = data;
struct cg4_softc *sc = fb->fb_private;
struct soft_cmap *cm = &sc->sc_cmap;
int error, start, count;
@@ -426,11 +420,10 @@ static int cg4getcmap(fb, data)
* FBIOPUTCMAP:
* Copy new colormap from user space and load.
*/
-static int cg4putcmap(fb, data)
+static int cg4putcmap(fb, fbcm)
struct fbdevice *fb;
- void *data;
+ struct fbcmap *fbcm;
{
- struct fbcmap *fbcm = data;
struct cg4_softc *sc = fb->fb_private;
struct soft_cmap *cm = &sc->sc_cmap;
int error, start, count;