Port-hp300 archive

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

Re: Console on 9000/425t with A1659A graphics



> To work on my 425t it'll also need an equivalent change in
> hp300_cninit_deferred(void) but with that I expect it will work
> just fine. I should be able to give it a try sometime this week.

Ah, indeed. Maybe we don't have to call the cnprobe function
in hp300_cninit_deferred() and it's enough to save console slot.

How about this one? (compile test only)

Index: hp300/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hp300/hp300/autoconf.c,v
retrieving revision 1.105
diff -u -p -d -r1.105 autoconf.c
--- hp300/autoconf.c	20 Apr 2014 04:12:54 -0000	1.105
+++ hp300/autoconf.c	10 Jan 2019 16:54:35 -0000
@@ -152,6 +152,7 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
 #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 @@ int conscode;
 void *conaddr;
 
 static bool cninit_deferred;
+#if NSTI_SGC > 0
+static int consslot = -1;
+#endif
 
 void
 hp300_cninit(void)
@@ -838,13 +842,18 @@ hp300_cninit(void)
 	    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 @@ hp300_cninit_deferred(void)
 		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
 }

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index