summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/include/rbus_machdep.h10
-rw-r--r--sys/arch/hppa/include/rbus_machdep.h7
-rw-r--r--sys/arch/hppa64/include/rbus_machdep.h7
-rw-r--r--sys/arch/i386/include/rbus_machdep.h10
-rw-r--r--sys/arch/macppc/include/rbus_machdep.h12
-rw-r--r--sys/arch/sparc64/include/rbus_machdep.h13
6 files changed, 31 insertions, 28 deletions
diff --git a/sys/arch/amd64/include/rbus_machdep.h b/sys/arch/amd64/include/rbus_machdep.h
index f61370b904a..ad7f47a104e 100644
--- a/sys/arch/amd64/include/rbus_machdep.h
+++ b/sys/arch/amd64/include/rbus_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus_machdep.h,v 1.4 2008/07/02 03:00:00 fgsch Exp $ */
+/* $OpenBSD: rbus_machdep.h,v 1.5 2009/07/21 21:20:01 miod Exp $ */
/* $NetBSD: rbus_machdep.h,v 1.2 1999/10/15 06:43:05 haya Exp $ */
/*
@@ -36,11 +36,11 @@
struct pci_attach_args; /* XXX */
-#define md_space_map(bt, physaddr, size, flags, bshp) \
- _bus_space_map((bt), (physaddr), (size), (flags), (bshp))
+#define md_space_map(rbt, physaddr, size, flags, bshp) \
+ _bus_space_map((rbt)->rb_bt, (physaddr), (size), (flags), (bshp))
-#define md_space_unmap(bt, bsh, size, adrp) \
- _bus_space_unmap((bt), (bsh), (size), (adrp))
+#define md_space_unmap(rbt, bsh, size, adrp) \
+ _bus_space_unmap((rbt)->rb_bt, (bsh), (size), (adrp))
rbus_tag_t rbus_pccbb_parent_io(struct device *,
struct pci_attach_args *);
diff --git a/sys/arch/hppa/include/rbus_machdep.h b/sys/arch/hppa/include/rbus_machdep.h
index 8298e6be799..3ae9ac5b0de 100644
--- a/sys/arch/hppa/include/rbus_machdep.h
+++ b/sys/arch/hppa/include/rbus_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus_machdep.h,v 1.3 2007/12/16 14:34:37 kettenis Exp $ */
+/* $OpenBSD: rbus_machdep.h,v 1.4 2009/07/21 21:20:03 miod Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -31,7 +31,8 @@
#define _ARCH_HPPA_HPPA_RBUS_MACHDEP_H_
static __inline int
-md_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp)
+md_space_map(rbus_tag_t rbt, bus_addr_t bpa, bus_size_t size, int flags,
+ bus_space_handle_t *bshp)
{
if (bshp)
*(bshp) = bpa;
@@ -39,7 +40,7 @@ md_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags, bus
return (0);
}
-#define md_space_unmap(t,bsh,s,addrp) do { *(addrp) = (bsh); } while (0)
+#define md_space_unmap(rbt,bsh,s,addrp) do { *(addrp) = (bsh); } while (0)
struct pci_attach_args;
diff --git a/sys/arch/hppa64/include/rbus_machdep.h b/sys/arch/hppa64/include/rbus_machdep.h
index 7a84faa57f5..501241b7952 100644
--- a/sys/arch/hppa64/include/rbus_machdep.h
+++ b/sys/arch/hppa64/include/rbus_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus_machdep.h,v 1.3 2007/12/20 13:58:01 kettenis Exp $ */
+/* $OpenBSD: rbus_machdep.h,v 1.4 2009/07/21 21:20:05 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -22,7 +22,8 @@
#define _ARCH_HPPA64_HPPA64_RBUS_MACHDEP_H_
static __inline int
-md_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp)
+md_space_map(rbus_tag_t rbt, bus_addr_t bpa, bus_size_t size, int flags,
+ bus_space_handle_t *bshp)
{
if (bshp)
*(bshp) = bpa;
@@ -30,7 +31,7 @@ md_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags, bus
return (0);
}
-#define md_space_unmap(t,bsh,s,addrp) do { *(addrp) = (bsh); } while (0)
+#define md_space_unmap(rbt,bsh,s,addrp) do { *(addrp) = (bsh); } while (0)
struct pci_attach_args;
diff --git a/sys/arch/i386/include/rbus_machdep.h b/sys/arch/i386/include/rbus_machdep.h
index e1098c2e94c..a884b3133ea 100644
--- a/sys/arch/i386/include/rbus_machdep.h
+++ b/sys/arch/i386/include/rbus_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus_machdep.h,v 1.6 2008/07/02 03:00:00 fgsch Exp $ */
+/* $OpenBSD: rbus_machdep.h,v 1.7 2009/07/21 21:20:05 miod Exp $ */
/* $NetBSD: rbus_machdep.h,v 1.2 1999/10/15 06:43:05 haya Exp $ */
/*
@@ -36,11 +36,11 @@
struct pci_attach_args; /* XXX */
-#define md_space_map(bt, physaddr, size, flags, bshp) \
- _bus_space_map((bt), (physaddr), (size), (flags), (bshp))
+#define md_space_map(rbt, physaddr, size, flags, bshp) \
+ _bus_space_map((rbt)->rb_bt, (physaddr), (size), (flags), (bshp))
-#define md_space_unmap(bt, bsh, size, adrp) \
- _bus_space_unmap((bt), (bsh), (size), (adrp))
+#define md_space_unmap(rbt, bsh, size, adrp) \
+ _bus_space_unmap((rbt)->rb_bt, (bsh), (size), (adrp))
rbus_tag_t rbus_pccbb_parent_io(struct device *,
struct pci_attach_args *);
diff --git a/sys/arch/macppc/include/rbus_machdep.h b/sys/arch/macppc/include/rbus_machdep.h
index 69efb48cb08..a371dc209a9 100644
--- a/sys/arch/macppc/include/rbus_machdep.h
+++ b/sys/arch/macppc/include/rbus_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus_machdep.h,v 1.3 2007/12/09 17:02:56 kettenis Exp $ */
+/* $OpenBSD: rbus_machdep.h,v 1.4 2009/07/21 21:20:05 miod Exp $ */
/* $NetBSD: rbus_machdep.h,v 1.2 1999/10/15 06:43:05 haya Exp $ */
/*
@@ -40,18 +40,18 @@ struct pci_attach_args; /* XXX */
void _bus_space_unmap(bus_space_tag_t, bus_space_handle_t,
bus_size_t, bus_addr_t *);
-#define md_space_map(bt, physaddr, size, flags, bshp) \
- bus_space_map((bt), (physaddr), (size), (flags), (bshp))
+#define md_space_map(rbt, physaddr, size, flags, bshp) \
+ bus_space_map((rbt)->rb_bt, (physaddr), (size), (flags), (bshp))
/* XXX */
bus_addr_t bus_space_unmap_p(bus_space_tag_t t, bus_space_handle_t bsh,
bus_size_t size);
-#define md_space_unmap(bt, bsh, size, adrp) \
+#define md_space_unmap(rbt, bsh, size, adrp) \
do { \
- *adrp = bus_space_unmap_p((bt), (bsh), (size)); \
- if (bt->bus_io) { \
+ *adrp = bus_space_unmap_p((rbt)->rb_bt, (bsh), (size)); \
+ if ((rbt)->rb_bt->bus_io) { \
*adrp = *adrp & 0xffff; \
} \
} while (0)
diff --git a/sys/arch/sparc64/include/rbus_machdep.h b/sys/arch/sparc64/include/rbus_machdep.h
index 939f3c7c738..ef1a927ce2b 100644
--- a/sys/arch/sparc64/include/rbus_machdep.h
+++ b/sys/arch/sparc64/include/rbus_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus_machdep.h,v 1.2 2007/11/25 00:38:49 kettenis Exp $ */
+/* $OpenBSD: rbus_machdep.h,v 1.3 2009/07/21 21:20:05 miod Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
@@ -24,12 +24,13 @@ struct pci_attach_args;
rbus_tag_t rbus_pccbb_parent_io(struct device *, struct pci_attach_args *);
rbus_tag_t rbus_pccbb_parent_mem(struct device *, struct pci_attach_args *);
-#define md_space_map(t, addr, size, flags, hp) \
- bus_space_map((t), (addr), (size), (flags), (hp))
-#define md_space_unmap(t, h, size, addrp) \
+#define md_space_map(rbt, addr, size, flags, hp) \
+ bus_space_map((rbt)->rb_bt, (addr), (size), (flags), (hp))
+#define md_space_unmap(rbt, h, size, addrp) \
do { \
- *addrp = (t)->sparc_bus_addr((t), (t), (h)); \
- bus_space_unmap((t), (h), (size)); \
+ *addrp = (rbt)->rb_bt->sparc_bus_addr((rbt)->rb_bt, \
+ (rbt)->rb_bt, (h)); \
+ bus_space_unmap((rbt)->rb_bt, (h), (size)); \
} while (0)
void pccbb_attach_hook(struct device *, struct device *,