summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-07-29 17:29:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-07-29 17:29:04 +0000
commitd658c7c638e86cb075838fe8458b10c7dc2b5503 (patch)
treebee4a3a77a8a6bb0eccd57e3e2cca787dd9a81a5 /sys/arch/vax
parent48c1ebfd3e30d479e71f34ac78dec1b6ddf1211a (diff)
Force gpx to attach if it is the console, the interrupt test is unreliable
after the dragon has been initialized to our needs.
Diffstat (limited to 'sys/arch/vax')
-rw-r--r--sys/arch/vax/vsa/gpx.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/sys/arch/vax/vsa/gpx.c b/sys/arch/vax/vsa/gpx.c
index 2afdbc171b8..dfa22023293 100644
--- a/sys/arch/vax/vsa/gpx.c
+++ b/sys/arch/vax/vsa/gpx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpx.c,v 1.3 2006/07/29 15:11:57 miod Exp $ */
+/* $OpenBSD: gpx.c,v 1.4 2006/07/29 17:29:03 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -226,6 +226,8 @@ gpx_match(struct device *parent, void *vcf, void *aux)
struct adder *adder;
vaddr_t tmp;
u_int depth;
+ extern struct consdev wsdisplay_cons;
+ extern int oldvsbus;
switch (vax_boardtype) {
default:
@@ -255,14 +257,22 @@ gpx_match(struct device *parent, void *vcf, void *aux)
if (depth != 0x00f0 && depth != 0x0080)
return (0);
- adder = (struct adder *)vax_map_physmem(va->va_paddr +
- GPX_ADDER_OFFSET, 1);
- if (adder == NULL)
- return (0);
- adder->interrupt_enable = VSYNC;
- DELAY(100000); /* enough to get a retrace interrupt */
- adder->interrupt_enable = 0;
- vax_unmap_physmem((vaddr_t)adder, 1);
+ if ((vax_confdata & (KA420_CFG_L3CON | KA420_CFG_MULTU)) == 0 &&
+ cn_tab == &wsdisplay_cons) {
+ /* when already running as console, fake things */
+ struct vsbus_softc *sc = (void *)parent;
+ sc->sc_mask = 0x08;
+ scb_fake(0x44, oldvsbus ? 0x14 : 0x15);
+ } else {
+ adder = (struct adder *)vax_map_physmem(va->va_paddr +
+ GPX_ADDER_OFFSET, 1);
+ if (adder == NULL)
+ return (0);
+ adder->interrupt_enable = VSYNC;
+ DELAY(100000); /* enough to get a retrace interrupt */
+ adder->interrupt_enable = 0;
+ vax_unmap_physmem((vaddr_t)adder, 1);
+ }
return (20);
}