summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2005-11-28 20:27:44 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2005-11-28 20:27:44 +0000
commit163dcbfb8108627f5f925a2b79be4edcbd9385a2 (patch)
tree823dff81862713d1709d28c4254529b7acebccb7
parent97718349009029ab3f5fff034267ea582253dfdf (diff)
Added sysids for PowerVault/PowerApp ESM2 systems
Changed Register names to be more readable ok marco@
-rw-r--r--sys/arch/i386/i386/esm.c27
-rw-r--r--sys/arch/i386/i386/esmreg.h13
2 files changed, 25 insertions, 15 deletions
diff --git a/sys/arch/i386/i386/esm.c b/sys/arch/i386/i386/esm.c
index 7c7cf8e5b83..04dd74ba0e6 100644
--- a/sys/arch/i386/i386/esm.c
+++ b/sys/arch/i386/i386/esm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esm.c,v 1.16 2005/11/28 19:59:25 deraadt Exp $ */
+/* $OpenBSD: esm.c,v 1.17 2005/11/28 20:27:43 jordan Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -109,9 +109,9 @@ struct cfdriver esm_cd = {
#define EREAD(s, r) bus_space_read_1((s)->sc_iot, (s)->sc_ioh, (r))
#define EWRITE(s, r, v) bus_space_write_1((s)->sc_iot, (s)->sc_ioh, (r), (v))
-#define ECTRLWR(s, v) EWRITE((s), ESM2_TC_REG, (v))
-#define EDATARD(s) EREAD((s), ESM2_TBUF_REG)
-#define EDATAWR(s, v) EWRITE((s), ESM2_TBUF_REG, (v))
+#define ECTRLWR(s, v) EWRITE((s), ESM2_CTRL_REG, (v))
+#define EDATARD(s) EREAD((s), ESM2_DATA_REG)
+#define EDATAWR(s, v) EWRITE((s), ESM2_DATA_REG, (v))
void esm_refresh(void *);
@@ -161,6 +161,11 @@ esm_probe(void *aux)
case DELL_SYSID_6450:
case DELL_SYSID_2500:
case DELL_SYSID_2550:
+ case DELL_SYSID_PV530F:
+ case DELL_SYSID_PV735N:
+ case DELL_SYSID_PV750N:
+ case DELL_SYSID_PV755N:
+ case DELL_SYSID_PA200:
return (1);
}
@@ -198,19 +203,19 @@ esm_attach(struct device *parent, struct device *self, void *aux)
}
/* turn off interrupts here */
- x = EREAD(sc, ESM2_TIM_REG);
+ x = EREAD(sc, ESM2_INTMASK_REG);
x &= ~(ESM2_TIM_SCI_EN|ESM2_TIM_SMI_EN|ESM2_TIM_NMI2SMI);
x |= ESM2_TIM_POWER_UP_BITS;
- EWRITE(sc, ESM2_TIM_REG, x);
+ EWRITE(sc, ESM2_INTMASK_REG, x);
/* clear event doorbells */
- x = EREAD(sc, ESM2_TC_REG);
+ x = EREAD(sc, ESM2_CTRL_REG);
x &= ~ESM2_TC_HOSTBUSY;
x |= ESM2_TC_POWER_UP_BITS;
- EWRITE(sc, ESM2_TC_REG, x);
+ EWRITE(sc, ESM2_CTRL_REG, x);
/* see if card is alive */
- if (esm_bmc_ready(sc, ESM2_TC_REG, ESM2_TC_ECBUSY, 0, 1) != 0) {
+ if (esm_bmc_ready(sc, ESM2_CTRL_REG, ESM2_TC_ECBUSY, 0, 1) != 0) {
printf("%s: card is not alive\n");
bus_space_unmap(sc->sc_iot, sc->sc_ioh, 8);
return;
@@ -776,7 +781,7 @@ esm_cmd(struct esm_softc *sc, void *cmd, size_t cmdlen, void *resp,
int i;
/* Wait for card ready */
- if (esm_bmc_ready(sc, ESM2_TC_REG, ESM2_TC_READY, 0, wait) != 0)
+ if (esm_bmc_ready(sc, ESM2_CTRL_REG, ESM2_TC_READY, 0, wait) != 0)
return (1); /* busy */
/* Write command data to port */
@@ -789,7 +794,7 @@ esm_cmd(struct esm_softc *sc, void *cmd, size_t cmdlen, void *resp,
/* Ring doorbell and wait */
ECTRLWR(sc, ESM2_TC_H2ECDB);
- esm_bmc_ready(sc, ESM2_TC_REG, ESM2_TC_EC2HDB, ESM2_TC_EC2HDB, 1);
+ esm_bmc_ready(sc, ESM2_CTRL_REG, ESM2_TC_EC2HDB, ESM2_TC_EC2HDB, 1);
/* Set host busy semaphore and clear doorbell */
ECTRLWR(sc, ESM2_TC_HOSTBUSY);
diff --git a/sys/arch/i386/i386/esmreg.h b/sys/arch/i386/i386/esmreg.h
index d4d76440660..0712a549763 100644
--- a/sys/arch/i386/i386/esmreg.h
+++ b/sys/arch/i386/i386/esmreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: esmreg.h,v 1.5 2005/11/24 08:57:05 dlg Exp $ */
+/* $OpenBSD: esmreg.h,v 1.6 2005/11/28 20:27:43 jordan Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -19,9 +19,9 @@
#define ESM2_BASE_PORT 0xe0
-#define ESM2_TC_REG 4
-#define ESM2_TBUF_REG 5
-#define ESM2_TIM_REG 6
+#define ESM2_CTRL_REG 4
+#define ESM2_DATA_REG 5
+#define ESM2_INTMASK_REG 6
#define ESM2_TC_CLR_WPTR (1L << 0)
#define ESM2_TC_CLR_RPTR (1L << 1)
@@ -75,6 +75,11 @@
#define DELL_SYSID_6450 0xA2
#define DELL_SYSID_2500 0xD9
#define DELL_SYSID_2550 0xD1
+#define DELL_SYSID_PV530F 0xCD
+#define DELL_SYSID_PV735N 0xE2
+#define DELL_SYSID_PV750N 0xEE
+#define DELL_SYSID_PV755N 0xEF
+#define DELL_SYSID_PA200 0xCB
#define DELL_SYSID_EXT 0xFE
struct dell_sysid {