summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev/grf_machdep.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 05:29:32 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 05:29:32 +0000
commit86b4fdd623d3c50d7bfd9427c2c9208454cd0da7 (patch)
tree5d95abcaf58d01703a30c7ab600537d3b8f67989 /sys/arch/hp300/dev/grf_machdep.c
parente2cd6c399798843e13e76f49dc8ee048b51f99f1 (diff)
update from netbsd (verbatim)
Diffstat (limited to 'sys/arch/hp300/dev/grf_machdep.c')
-rw-r--r--sys/arch/hp300/dev/grf_machdep.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/sys/arch/hp300/dev/grf_machdep.c b/sys/arch/hp300/dev/grf_machdep.c
index 3e6d0244b92..9a97a65e38c 100644
--- a/sys/arch/hp300/dev/grf_machdep.c
+++ b/sys/arch/hp300/dev/grf_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_machdep.c,v 1.2 1994/10/26 07:23:59 cgd Exp $ */
+/* $NetBSD: grf_machdep.c,v 1.3 1995/12/02 18:21:58 thorpej Exp $ */
/*
* Copyright (c) 1991 University of Utah.
@@ -57,8 +57,9 @@
#include <hp300/dev/grfvar.h>
#include <hp300/dev/grfreg.h>
-int grfprobe();
-struct driver grfdriver = { grfprobe, "grf" };
+int grfmatch();
+void grfattach();
+struct driver grfdriver = { grfmatch, grfattach, "grf" };
/*
* XXX called from ite console init routine.
@@ -109,22 +110,32 @@ grfconfig()
/*
* Normal init routine called by configure() code
*/
-grfprobe(hd)
+int
+grfmatch(hd)
struct hp_device *hd;
{
struct grf_softc *gp = &grf_softc[hd->hp_unit];
if ((gp->g_flags & GF_ALIVE) == 0 &&
!grfinit(hd->hp_addr, hd->hp_unit))
- return(0);
- printf("grf%d: %d x %d ", hd->hp_unit,
- gp->g_display.gd_dwidth, gp->g_display.gd_dheight);
+ return (0);
+
+ return(1);
+}
+
+void
+grfattach(hd)
+ struct hp_device *hd;
+{
+ struct grf_softc *gp = &grf_softc[hd->hp_unit];
+
+ printf(": %d x %d ", gp->g_display.gd_dwidth,
+ gp->g_display.gd_dheight);
if (gp->g_display.gd_colors == 2)
printf("monochrome");
else
printf("%d color", gp->g_display.gd_colors);
printf(" %s display\n", gp->g_sw->gd_desc);
- return(1);
}
grfinit(addr, unit)