summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-04-30 21:29:34 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-04-30 21:29:34 +0000
commitaf7be847fee84096eb6ef852a0cf38f637779773 (patch)
tree83d52f570366557949283a1f16b53ecafb33b0f5 /sys/arch
parenta70e42c8cfa4d22fd24598b081ac13202d303a93 (diff)
Correctly read board version information.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sgi/gio/grtwo.c13
-rw-r--r--sys/arch/sgi/gio/grtworeg.h6
2 files changed, 10 insertions, 9 deletions
diff --git a/sys/arch/sgi/gio/grtwo.c b/sys/arch/sgi/gio/grtwo.c
index f608b7214b6..35e10692eec 100644
--- a/sys/arch/sgi/gio/grtwo.c
+++ b/sys/arch/sgi/gio/grtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grtwo.c,v 1.3 2012/04/24 20:11:26 miod Exp $ */
+/* $OpenBSD: grtwo.c,v 1.4 2012/04/30 21:29:33 miod Exp $ */
/* $NetBSD: grtwo.c,v 1.11 2009/11/22 19:09:15 mbalmer Exp $ */
/*
@@ -270,12 +270,13 @@ int
grtwo_setup_hw(struct grtwo_devconfig *dc)
{
int i = 0;
- uint32_t rd0, rd1, rd2, rd3, vc1;
+ uint8_t rd0, rd1, rd2, rd3;
+ uint32_t vc1;
- rd0 = bus_space_read_4(dc->iot, dc->ioh, GR2_REVISION_RD0);
- rd1 = bus_space_read_4(dc->iot, dc->ioh, GR2_REVISION_RD1);
- rd2 = bus_space_read_4(dc->iot, dc->ioh, GR2_REVISION_RD2);
- rd3 = bus_space_read_4(dc->iot, dc->ioh, GR2_REVISION_RD3);
+ rd0 = bus_space_read_1(dc->iot, dc->ioh, GR2_REVISION_RD0);
+ rd1 = bus_space_read_1(dc->iot, dc->ioh, GR2_REVISION_RD1);
+ rd2 = bus_space_read_1(dc->iot, dc->ioh, GR2_REVISION_RD2);
+ rd3 = bus_space_read_1(dc->iot, dc->ioh, GR2_REVISION_RD3);
/* Get various revisions */
dc->boardrev = ~rd0 & GR2_REVISION_RD0_VERSION_MASK;
diff --git a/sys/arch/sgi/gio/grtworeg.h b/sys/arch/sgi/gio/grtworeg.h
index ab994568441..33a2c2f728e 100644
--- a/sys/arch/sgi/gio/grtworeg.h
+++ b/sys/arch/sgi/gio/grtworeg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: grtworeg.h,v 1.1 2012/04/18 11:01:55 miod Exp $ */
+/* $OpenBSD: grtworeg.h,v 1.2 2012/04/30 21:29:33 miod Exp $ */
/* $NetBSD: grtworeg.h,v 1.2 2005/12/11 12:18:53 christos Exp $ */
/*
@@ -176,7 +176,7 @@
#define GR2_REVISION4_RD1_ZBUFFER 0x20
#define GR2_REVISION_RD2 0x6c008
-#define GR2_REVISION_RD2_BACKEND_REV 0x000c
+#define GR2_REVISION_RD2_BACKEND_REV 0x0c
#define GR2_REVISION_RD2_BACKEND_SHIFT 2
/* one slot = 8bpp, two slots = 16bpp, three slots = 24bpp, br < 4 only */
@@ -193,7 +193,7 @@
#define XMAP5_CLUT 0x08
#define XMAP5_CRC 0x0c
#define XMAP5_ADDRLO 0x10
-#define XMAP5_ADRHI 0x14
+#define XMAP5_ADDRHI 0x14
#define XMAP5_BYTECOUNT 0x18
#define XMAP5_FIFOSTATUS 0x1c