summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-12-21 16:19:44 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-12-21 16:19:44 +0000
commit17d301b5ae6931f343d94a068206cbe7d06fc2c9 (patch)
tree09702d8be937e4376de604caa305cf10368d23d9 /sys/arch/hppa/dev
parentf3ece2a57675780c46bb04b0ace3a653cd918219 (diff)
Add a hack to discover all devices on (some) K-class servers.
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r--sys/arch/hppa/dev/uturn.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/arch/hppa/dev/uturn.c b/sys/arch/hppa/dev/uturn.c
index a64174973a3..2e37d5b4fea 100644
--- a/sys/arch/hppa/dev/uturn.c
+++ b/sys/arch/hppa/dev/uturn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uturn.c,v 1.3 2005/04/07 00:21:51 mickey Exp $ */
+/* $OpenBSD: uturn.c,v 1.4 2007/12/21 16:19:43 kettenis Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -92,6 +92,7 @@ uturnattach(parent, self, aux)
struct confargs *ca = aux, nca;
struct uturn_softc *sc = (struct uturn_softc *)self;
bus_space_handle_t ioh;
+ hppa_hpa_t hpa;
if (bus_space_map(ca->ca_iot, ca->ca_hpa, IOMOD_HPASIZE, 0, &ioh)) {
printf(": can't map IO space\n");
@@ -109,4 +110,17 @@ uturnattach(parent, self, aux)
nca = *ca; /* clone from us */
nca.ca_hpamask = HPPA_IOBEGIN;
pdc_scanbus(self, &nca, MAXMODBUS, 0);
+
+ /* XXX On some machines, PDC doesn't tell us about all devices. */
+ switch (cpu_hvers) {
+ case HPPA_BOARD_HP809:
+ case HPPA_BOARD_HP819:
+ case HPPA_BOARD_HP839:
+ case HPPA_BOARD_HP859:
+ hpa = ((struct iomod *)ioh)->io_io_low << 16;
+ pdc_scanbus(self, &nca, MAXMODBUS, hpa);
+ break;
+ default:
+ break;
+ }
}