Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcmips change hpfcb_cnattach interface to adopt cu...



details:   https://anonhg.NetBSD.org/src/rev/b0205d228a4d
branches:  trunk
changeset: 485658:b0205d228a4d
user:      uch <uch%NetBSD.org@localhost>
date:      Tue May 02 17:45:15 2000 +0000

description:
change hpfcb_cnattach interface to adopt current implementation.

diffstat:

 sys/arch/hpcmips/dev/hpcfb.c    |  34 +++++++++++++++-------------------
 sys/arch/hpcmips/dev/hpcfbvar.h |   5 ++---
 sys/arch/hpcmips/vr/vr.c        |   4 ++--
 3 files changed, 19 insertions(+), 24 deletions(-)

diffs (109 lines):

diff -r 1c40f2804441 -r b0205d228a4d sys/arch/hpcmips/dev/hpcfb.c
--- a/sys/arch/hpcmips/dev/hpcfb.c      Tue May 02 16:31:11 2000 +0000
+++ b/sys/arch/hpcmips/dev/hpcfb.c      Tue May 02 17:45:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpcfb.c,v 1.4 2000/05/01 07:40:05 takemura Exp $       */
+/*     $NetBSD: hpcfb.c,v 1.5 2000/05/02 17:45:15 uch Exp $    */
 
 /*-
  * Copyright (c) 1999
@@ -45,7 +45,7 @@
 static const char _copyright[] __attribute__ ((unused)) =
     "Copyright (c) 1999 Shin Takemura.  All rights reserved.";
 static const char _rcsid[] __attribute__ ((unused)) =
-    "$Id: hpcfb.c,v 1.4 2000/05/01 07:40:05 takemura Exp $";
+    "$Id: hpcfb.c,v 1.5 2000/05/02 17:45:15 uch Exp $";
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -236,7 +236,7 @@
 struct wsdisplay_emulops rasops_emul;
 #endif /* HPCFB_HOOK */
 
-static int hpcfbconsole, hpcfb_console_type;
+static int hpcfbconsole;
 struct hpcfb_devconfig hpcfb_console_dc;
 struct wsscreen_descr hpcfb_console_wsscreen;
 #ifdef HPCFB_TVRAM
@@ -369,26 +369,23 @@
 }
 
 int
-hpcfb_cnattach(iot, iobase, type, check)
-       bus_space_tag_t iot;
-       int iobase;
-       int type, check;
+hpcfb_cnattach(fbconf)
+       struct hpcfb_fbconf *fbconf;
 {
+       struct hpcfb_fbconf __fbconf __attribute__((__unused__));
        long defattr;
-       int found;
-       struct hpcfb_fbconf fbconf;
-
-       found = 0;
-       bzero(&fbconf, sizeof(struct hpcfb_fbconf));
-
-#if NBIVIDEO > 0
-       if (!found) found = (bivideo_getcnfb(&fbconf) == 0);
-#endif
 
        bzero(&hpcfb_console_dc, sizeof(struct hpcfb_devconfig));
-       if (!found || hpcfb_init(&fbconf, &hpcfb_console_dc) != 0) {
+#if NBIVIDEO > 0
+       if (fbconf == 0) {
+               memset(&__fbconf, 0, sizeof(struct hpcfb_fbconf));
+               if (bivideo_getcnfb(&__fbconf) != 0)
+                       return (ENXIO);
+               fbconf = &__fbconf;
+       }
+#endif /* NBIVIDEO > 0 */
+       if (hpcfb_init(fbconf, &hpcfb_console_dc) != 0)
                return (ENXIO);
-       }
 
        hpcfb_console_wsscreen = hpcfb_stdscreen;
 #ifdef HPCFB_TVRAM
@@ -414,7 +411,6 @@
 #endif /* HPCFB_TVRAM */
 
        hpcfbconsole = 1;
-       hpcfb_console_type = type;
 
        return (0);
 }
diff -r 1c40f2804441 -r b0205d228a4d sys/arch/hpcmips/dev/hpcfbvar.h
--- a/sys/arch/hpcmips/dev/hpcfbvar.h   Tue May 02 16:31:11 2000 +0000
+++ b/sys/arch/hpcmips/dev/hpcfbvar.h   Tue May 02 17:45:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpcfbvar.h,v 1.2 2000/04/03 03:35:37 sato Exp $        */
+/*     $NetBSD: hpcfbvar.h,v 1.3 2000/05/02 17:45:15 uch Exp $ */
 
 /*-
  * Copyright (c) 1999
@@ -70,6 +70,5 @@
        struct hpcfb_dspconf *ha_dspconflist;
 };
 
-int    hpcfb_cnattach __P((bus_space_tag_t iot, int iobase,
-                           int type, int check));
+int    hpcfb_cnattach __P((struct hpcfb_fbconf *));
 int    hpcfbprint __P((void *aux, const char *pnp));
diff -r 1c40f2804441 -r b0205d228a4d sys/arch/hpcmips/vr/vr.c
--- a/sys/arch/hpcmips/vr/vr.c  Tue May 02 16:31:11 2000 +0000
+++ b/sys/arch/hpcmips/vr/vr.c  Tue May 02 17:45:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vr.c,v 1.16 2000/04/11 17:57:44 uch Exp $      */
+/*     $NetBSD: vr.c,v 1.17 2000/05/02 17:45:16 uch Exp $      */
 
 /*-
  * Copyright (c) 1999
@@ -318,7 +318,7 @@
 
 #if NHPCFB > 0
        mb_bus_space_init(); /* At this time, not initialized yet */
-       if(hpcfb_cnattach(system_bus_iot, 0x0c000000, 0, 0)) {
+       if (hpcfb_cnattach(NULL)) {
                printf("%s(%d): can't init fb console", __FILE__, __LINE__);
        } else {
                goto find_keyboard;



Home | Main Index | Thread Index | Old Index