summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/pci_machdep.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-12-02 02:41:03 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-12-02 02:41:03 +0000
commitb82e3bee10b38d4c4af1ed87c910e8fb7dc53861 (patch)
tree88e18f37597a4987f4b03273ce5d64a9f9eb5878 /sys/arch/sparc64/dev/pci_machdep.c
parent5be4aaa7d145a69c784aa2e4ac65453b5c39e9d3 (diff)
Add pci_decompose_tag() for sparc64.
From NetBSD ok deraadt@
Diffstat (limited to 'sys/arch/sparc64/dev/pci_machdep.c')
-rw-r--r--sys/arch/sparc64/dev/pci_machdep.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c
index 867053bd25a..f77530f81fb 100644
--- a/sys/arch/sparc64/dev/pci_machdep.c
+++ b/sys/arch/sparc64/dev/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.14 2003/06/24 21:54:39 henric Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.15 2004/12/02 02:41:02 brad Exp $ */
/* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */
/*
@@ -336,6 +336,21 @@ pci_make_tag(pc, b, d, f)
return (tag);
}
+void
+pci_decompose_tag(pc, tag, bp, dp, fp)
+ pci_chipset_tag_t pc;
+ pcitag_t tag;
+ int *bp, *dp, *fp;
+{
+
+ if (bp != NULL)
+ *bp = PCITAG_BUS(tag);
+ if (dp != NULL)
+ *dp = PCITAG_DEV(tag);
+ if (fp != NULL)
+ *fp = PCITAG_FUN(tag);
+}
+
/* assume we are mapped little-endian/side-effect */
pcireg_t
pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg)