summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/dev/lasi.c45
-rw-r--r--sys/arch/hppa/hppa/machdep.c14
-rw-r--r--sys/arch/hppa/include/cpu.h3
3 files changed, 54 insertions, 8 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];
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index ccc4c1f37f1..41f7992cb3a 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.106 2003/05/22 19:27:50 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.107 2003/07/30 21:24:19 mickey Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -140,6 +140,7 @@ char machine[] = MACHINE_ARCH;
char cpu_model[128];
enum hppa_cpu_type cpu_type;
const char *cpu_typename;
+int cpu_hvers;
#ifdef COMPAT_HPUX
int cpu_model_hpux; /* contains HPUX_SYSCONF_CPU* kind of value */
#endif
@@ -458,17 +459,18 @@ hppa_init(start)
{
const char *p, *q;
char buf[32];
- int lev, hv;
+ int lev;
lev = 0xa + (*cpu_desidhash)();
- hv = pdc_model.hvers >> 4;
- if (!hv) {
+ cpu_hvers = pdc_model.hvers >> 4;
+ if (!cpu_hvers) {
p = "(UNKNOWN)";
q = lev == 0xa? "1.0" : "1.1";
} else {
- p = hppa_mod_info(HPPA_TYPE_BOARD, hv);
+ p = hppa_mod_info(HPPA_TYPE_BOARD, cpu_hvers);
if (!p) {
- snprintf(buf, sizeof buf, "(UNKNOWN 0x%x)", hv);
+ snprintf(buf, sizeof buf, "(UNKNOWN 0x%x)",
+ cpu_hvers);
p = buf;
}
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h
index 87a64c9734d..02727c8315c 100644
--- a/sys/arch/hppa/include/cpu.h
+++ b/sys/arch/hppa/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.36 2002/11/27 21:47:14 mickey Exp $ */
+/* $OpenBSD: cpu.h,v 1.37 2003/07/30 21:24:19 mickey Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff
@@ -74,6 +74,7 @@ enum hppa_cpu_type {
};
extern enum hppa_cpu_type cpu_type;
extern const char *cpu_typename;
+extern int cpu_hvers;
#endif
/*