summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-07-30 21:24:20 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-07-30 21:24:20 +0000
commit1161c082493da91e94a0baa70d7c7905371f604a (patch)
tree43e5234abcd35e7b397a3459959e6ef11cfb9232 /sys/arch/hppa/dev
parent391e258a18bf2833fd9866a81634a628216860d1 (diff)
deduce the leds address from the model number and thus make some more use of that lichtenblinkenschmutz on some more machinens
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r--sys/arch/hppa/dev/lasi.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/sys/arch/hppa/dev/lasi.c b/sys/arch/hppa/dev/lasi.c
index eeddda4de95..5d8dd361046 100644
--- a/sys/arch/hppa/dev/lasi.c
+++ b/sys/arch/hppa/dev/lasi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lasi.c,v 1.13 2003/04/08 20:48:39 mickey Exp $ */
+/* $OpenBSD: lasi.c,v 1.14 2003/07/30 21:24:19 mickey Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -171,6 +171,49 @@ lasiattach(parent, self, aux)
sc->sc_ic.gsc_dv = sc;
sc->sc_ic.gsc_base = sc->sc_trs;
+#ifdef USELEDS
+ /* figure out the leds address */
+ switch (cpu_hvers) {
+ case HPPA_BOARD_HP712_60:
+ case HPPA_BOARD_HP712_80:
+ case HPPA_BOARD_HP712_100:
+ case HPPA_BOARD_HP743I_64:
+ case HPPA_BOARD_HP743I_100:
+ case HPPA_BOARD_HP712_120:
+ break; /* only has one led. works different */
+
+ case HPPA_BOARD_HP715_64:
+ case HPPA_BOARD_HP715_100:
+ case HPPA_BOARD_HP715_100XC:
+ case HPPA_BOARD_HP725_100:
+ case HPPA_BOARD_HP725_120:
+ if (bus_space_map(ca->ca_iot, ca->ca_hpa - 0x20000,
+ 4, 0, (bus_space_handle_t *)&machine_ledaddr))
+ machine_ledaddr = NULL;
+ machine_ledword = 1;
+ break;
+
+ case HPPA_BOARD_HP780_C100:
+ case HPPA_BOARD_HP780_C110:
+ case HPPA_BOARD_HP770_J200:
+ case HPPA_BOARD_HP770_J210:
+ case HPPA_BOARD_HP779_C132L:
+ case HPPA_BOARD_HP779_C160L:
+ case HPPA_BOARD_HP779_C180L:
+ case HPPA_BOARD_HP779_C160L1:
+ if (bus_space_map(ca->ca_iot, 0xf0190000,
+ 4, 0, (bus_space_handle_t *)&machine_ledaddr))
+ machine_ledaddr = NULL;
+ machine_ledword = 1;
+ break;
+
+ default:
+ machine_ledaddr = (u_int8_t *)sc->sc_hw;
+ machine_ledword = 1;
+ break;
+ }
+#endif
+
sc->ga.ga_ca = *ca; /* clone from us */
if (!sc->sc_phantomassed) {
sc->ga.ga_dp.dp_bc[0] = sc->ga.ga_dp.dp_bc[1];