summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
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
parent5be4aaa7d145a69c784aa2e4ac65453b5c39e9d3 (diff)
Add pci_decompose_tag() for sparc64.
From NetBSD ok deraadt@
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/pci_machdep.c17
-rw-r--r--sys/arch/sparc64/dev/vgafb.c4
2 files changed, 18 insertions, 3 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)
diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c
index 7cb33d541c2..efe9dd9ec9c 100644
--- a/sys/arch/sparc64/dev/vgafb.c
+++ b/sys/arch/sparc64/dev/vgafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb.c,v 1.36 2004/11/30 13:23:19 miod Exp $ */
+/* $OpenBSD: vgafb.c,v 1.37 2004/12/02 02:41:02 brad Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -225,7 +225,7 @@ vgafb_ioctl(v, cmd, data, flags, p)
sel = (struct pcisel *)data;
sel->pc_bus = PCITAG_BUS(sc->sc_pcitag);
sel->pc_dev = PCITAG_DEV(sc->sc_pcitag);
- sel->pc_func = PCITAG_FUNC(sc->sc_pcitag);
+ sel->pc_func = PCITAG_FUN(sc->sc_pcitag);
break;
case WSDISPLAYIO_SVIDEO: