summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia/if_rayreg.h
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-24 20:53:57 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-24 20:53:57 +0000
commit6a39dd6efa87824d9c9032ab61f7692387a83d3c (patch)
tree242724764c25e51cf6fd6bd7b111bb96433c329f /sys/dev/pcmcia/if_rayreg.h
parentcf56e293fb9663924c8dba3d5b50702a40899a41 (diff)
from martin@netbsd:
Remove RAY_USE_AMEM. This option claimed to use attribute memory access for the registers, which was true, but actually the same as the driver did without this option. What it realy did is work around a stupid bug in the driver that did not use the "offset" result from the pcmcia_mem_map call mapping the CIS memory. We got away with this for a long time since on i386 and typical pcmcia bridged the offset returned will be 0. It always failed (without RAY_USE_AMEM=1) if the check for a different function CCR aliases in pcmcia.c failed and mapped the CCR base new - this time at the CCR base of this function (0xf00), so all register acceses (that had 0xf00 added) happened way off in neverland. Now we do not hardcode the CCR base to the register definitions, but instead use the offset returned by pcmcia_mem_map. This makes the driver work with and without CCR base aliases being found.
Diffstat (limited to 'sys/dev/pcmcia/if_rayreg.h')
-rw-r--r--sys/dev/pcmcia/if_rayreg.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/pcmcia/if_rayreg.h b/sys/dev/pcmcia/if_rayreg.h
index 1fbf3baec87..7ed3cd9a448 100644
--- a/sys/dev/pcmcia/if_rayreg.h
+++ b/sys/dev/pcmcia/if_rayreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rayreg.h,v 1.4 2001/06/08 17:48:22 mickey Exp $ */
+/* $OpenBSD: if_rayreg.h,v 1.5 2002/03/24 20:53:56 mickey Exp $ */
/* $NetBSD: if_rayreg.h,v 1.3 2000/08/10 11:48:46 ad Exp $ */
/*
@@ -37,26 +37,26 @@
/*
* CCR registers
*/
-#define RAY_COR (0xf00 + 0) /* config option register */
-#define RAY_CCSR (0xf00 + 1) /* card config and status register */
-#define RAY_PIN (0xf00 + 2) /* not in hw */
-#define RAY_SOCKETCOPY (0xf00 + 3) /* not used by hw */
-#define RAY_HCSIR (0xf00 + 5) /* HCS intr register */
-#define RAY_ECFIR (0xf00 + 6) /* ECF intr register */
-#define RAY_AR0 (0xf00 + 8) /* authorization register 0 (unused) */
-#define RAY_AR1 (0xf00 + 9) /* authorization register 1 (unused) */
+#define RAY_COR (0x00) /* config option register */
+#define RAY_CCSR (0x01) /* card config and status register */
+#define RAY_PIN (0x02) /* not in hw */
+#define RAY_SOCKETCOPY (0x03) /* not used by hw */
+#define RAY_HCSIR (0x05) /* HCS intr register */
+#define RAY_ECFIR (0x06) /* ECF intr register */
+#define RAY_AR0 (0x08) /* authorization register 0 (unused) */
+#define RAY_AR1 (0x09) /* authorization register 1 (unused) */
/*
* XXX these registers cannot be accessed with pcmcia.c's 14 byte mapping
* of the CCR for us
*/
#if 0
-#define RAY_PMR 0xf0a /* program mode register (unused) */
-#define RAY_TMR 0xf0b /* pc test mode register (unused) */
-#define RAY_FCWR 0xf10 /* frequency control word register */
-#define RAY_TMC1 0xf14 /* test mode control 1 (unused) */
-#define RAY_TMC2 0xf15 /* test mode control 1 (unused) */
-#define RAY_TMC3 0xf16 /* test mode control 1 (unused) */
-#define RAY_TMC4 0xf17 /* test mode control 1 (unused) */
+#define RAY_PMR 0x0a /* program mode register (unused) */
+#define RAY_TMR 0x0b /* pc test mode register (unused) */
+#define RAY_FCWR 0x10 /* frequency control word register */
+#define RAY_TMC1 0x14 /* test mode control 1 (unused) */
+#define RAY_TMC2 0x15 /* test mode control 1 (unused) */
+#define RAY_TMC3 0x16 /* test mode control 1 (unused) */
+#define RAY_TMC4 0x17 /* test mode control 1 (unused) */
#endif
/*