summaryrefslogtreecommitdiff
path: root/sys/dev/pci/tga.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-07-26 18:48:56 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-07-26 18:48:56 +0000
commit7458aafff0569577b463f9c368e66cb25262aa6c (patch)
tree70cdb126d1cfdb8654412193beda18a7118700fc /sys/dev/pci/tga.c
parent7499c0ea68ce760474e8b4e98e74f2e0f120cc77 (diff)
Make sure all platforms understand the flags argument of bus_space_map() and
bus_space_alloc() as a bitmask of flags, and not a boolean controlling cacheability; and make sure the three MI BUS_SPACE_MAP_xxx values documented in the manual page are defined on all platforms as well.
Diffstat (limited to 'sys/dev/pci/tga.c')
-rw-r--r--sys/dev/pci/tga.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c
index f4c70ab097b..881e013eed7 100644
--- a/sys/dev/pci/tga.c
+++ b/sys/dev/pci/tga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tga.c,v 1.31 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: tga.c,v 1.32 2009/07/26 18:48:55 miod Exp $ */
/* $NetBSD: tga.c,v 1.40 2002/03/13 15:05:18 ad Exp $ */
/*
@@ -219,14 +219,12 @@ tga_getdevconfig(memt, pc, tag, dc)
return;
DPRINTF("tga_getdevconfig: preparing to map\n");
-#ifdef __OpenBSD__
- if (bus_space_map(memt, dc->dc_pcipaddr, pcisize, 1, &dc->dc_memh))
- return;
- dc->dc_vaddr = dc->dc_memh;
-#else
if (bus_space_map(memt, dc->dc_pcipaddr, pcisize,
BUS_SPACE_MAP_PREFETCHABLE | BUS_SPACE_MAP_LINEAR, &dc->dc_memh))
return;
+#ifdef __OpenBSD__
+ dc->dc_vaddr = dc->dc_memh;
+#else
dc->dc_vaddr = (vaddr_t) bus_space_vaddr(memt, dc->dc_memh);
#endif
DPRINTF("tga_getdevconfig: mapped\n");