Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/hp300 Handle sti(4) graphics at sgc on HP9000...



details:   https://anonhg.NetBSD.org/src/rev/f4cad6564a2b
branches:  trunk
changeset: 452340:f4cad6564a2b
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Jun 29 02:41:17 2019 +0000

description:
Handle sti(4) graphics at sgc on HP9000/425t properly.  PR port-hp300/54255

Should be pulled up to netbsd-8.

diffstat:

 sys/arch/hp300/hp300/autoconf.c |  22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diffs (68 lines):

diff -r 7819bb6f76a2 -r f4cad6564a2b sys/arch/hp300/hp300/autoconf.c
--- a/sys/arch/hp300/hp300/autoconf.c   Fri Jun 28 23:25:12 2019 +0000
+++ b/sys/arch/hp300/hp300/autoconf.c   Sat Jun 29 02:41:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.105 2014/04/20 04:12:54 tsutsui Exp $   */
+/*     $NetBSD: autoconf.c,v 1.106 2019/06/29 02:41:17 tsutsui Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.105 2014/04/20 04:12:54 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.106 2019/06/29 02:41:17 tsutsui Exp $");
 
 #include "dvbox.h"
 #include "gbox.h"
@@ -152,6 +152,7 @@
 #endif
 
 #if NSTI_SGC > 0
+#include <hp300/dev/sgcreg.h>
 #include <hp300/dev/sgcvar.h>
 #include <hp300/dev/sti_sgcvar.h>
 #endif
@@ -751,6 +752,9 @@
 void *conaddr;
 
 static bool cninit_deferred;
+#if NSTI_SGC > 0
+static int consslot = -1;
+#endif
 
 void
 hp300_cninit(void)
@@ -838,13 +842,18 @@
            machineid == HP_433) {
                struct bus_space_tag sgc_tag;
                bus_space_tag_t sgc_bst;
+               u_int slot;
 
                sgc_bst = &sgc_tag;
                memset(sgc_bst, 0, sizeof(struct bus_space_tag));
                sgc_bst->bustype = HP300_BUS_SPACE_SGC;
-               if (sti_sgc_cnprobe(sgc_bst, sgc_slottopa(0), 0)) {
-                       cninit_deferred = true;
-                       goto find_kbd;
+               for (slot = 0; slot < SGC_NSLOTS; slot++) {
+                       if (sti_sgc_cnprobe(sgc_bst, sgc_slottopa(slot),
+                           slot)) {
+                               cninit_deferred = true;
+                               consslot = slot;
+                               goto find_kbd;
+                       }
                }
        }
 #endif
@@ -926,8 +935,7 @@
                sgc_bst = &sgc_tag;
                memset(sgc_bst, 0, sizeof(struct bus_space_tag));
                sgc_bst->bustype = HP300_BUS_SPACE_SGC;
-               if (sti_sgc_cnprobe(sgc_bst, sgc_slottopa(0), 0))
-                       sti_sgc_cnattach(sgc_bst, sgc_slottopa(0), 0);
+               sti_sgc_cnattach(sgc_bst, sgc_slottopa(consslot), consslot);
        }
 #endif
 }



Home | Main Index | Thread Index | Old Index