summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2010-04-28 19:17:03 +0000
committerdyoung <dyoung@NetBSD.org>2010-04-28 19:17:03 +0000
commit30b2d68d20ff9f4bf182ba96df108cec01e1b0df (patch)
tree5e231dcd38ede2dbe2c6d60f6101074413f7389a /sys/dev
parentd184555b354020d071306e7255762d618c9977d1 (diff)
On x86, change the bus_space_tag_t to a pointer to a struct
bus_space_tag. For now, bus_space_tag's only member is bst_type, the type of space, which is either X86_BUS_SPACE_IO or X86_BUS_SPACE_MEM. In the future, new bus_space_tag members will refer to override-functions installed by a new function, bus_space_tag_create(9). Add pointers to constant struct bus_space_tag, x86_bus_space_io and x86_bus_space_mem. Use them to replace most uses of X86_BUS_SPACE_IO and X86_BUS_SPACE_MEM. Add an x86-specific bus_space_is_equal(9) implementation that compares the two tags' bst_type.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/if_ndis/if_ndis_pci.c8
-rw-r--r--sys/dev/pci/puccn.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c
index f0f416cdaeb..8ad8db53b3d 100644
--- a/sys/dev/if_ndis/if_ndis_pci.c
+++ b/sys/dev/if_ndis/if_ndis_pci.c
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.17 2009/10/20 19:04:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.18 2010/04/28 19:17:04 dyoung Exp $");
#ifdef __FreeBSD__
__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24:36 wpaul Exp $");
#endif
@@ -276,7 +276,7 @@ void ndis_attach_pci(device_t parent, device_t self, void *aux)
}
sc->ndis_res_io->res_base = base;
sc->ndis_res_io->res_size = size;
- sc->ndis_res_io->res_tag = X86_BUS_SPACE_IO;
+ sc->ndis_res_io->res_tag = x86_bus_space_io;
bus_space_map(sc->ndis_res_io->res_tag,
sc->ndis_res_io->res_base,
sc->ndis_res_io->res_size,
@@ -303,7 +303,7 @@ void ndis_attach_pci(device_t parent, device_t self, void *aux)
}
sc->ndis_res_altmem->res_base = base;
sc->ndis_res_altmem->res_size = size;
- sc->ndis_res_altmem->res_tag = X86_BUS_SPACE_MEM;
+ sc->ndis_res_altmem->res_tag = x86_bus_space_mem;
if(bus_space_map(sc->ndis_res_altmem->res_tag,
@@ -321,7 +321,7 @@ void ndis_attach_pci(device_t parent, device_t self, void *aux)
}
sc->ndis_res_mem->res_base = base;
sc->ndis_res_mem->res_size = size;
- sc->ndis_res_mem->res_tag = X86_BUS_SPACE_MEM;
+ sc->ndis_res_mem->res_tag = x86_bus_space_mem;
if(bus_space_map(sc->ndis_res_mem->res_tag,
sc->ndis_res_mem->res_base,
diff --git a/sys/dev/pci/puccn.c b/sys/dev/pci/puccn.c
index cd85333d50c..917e3a9642b 100644
--- a/sys/dev/pci/puccn.c
+++ b/sys/dev/pci/puccn.c
@@ -1,4 +1,4 @@
-/* $NetBSD: puccn.c,v 1.9 2007/01/13 18:59:31 cube Exp $ */
+/* $NetBSD: puccn.c,v 1.10 2010/04/28 19:17:05 dyoung Exp $ */
/*
* Derived from pci.c
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puccn.c,v 1.9 2007/01/13 18:59:31 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puccn.c,v 1.10 2010/04/28 19:17:05 dyoung Exp $");
#include "opt_kgdb.h"
@@ -76,7 +76,7 @@ int
cpu_comcnprobe(struct consdev *cn, struct pci_attach_args *pa)
{
pci_mode_detect();
- pa->pa_iot = X86_BUS_SPACE_IO;
+ pa->pa_iot = x86_bus_space_io;
pa->pa_pc = 0;
pa->pa_tag = pci_make_tag(0, 0, 31, 0);
return 0;