Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari Implement pci_decompose_tag().
details: https://anonhg.NetBSD.org/src/rev/b16807c144af
branches: trunk
changeset: 527006:b16807c144af
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed May 15 17:30:04 2002 +0000
description:
Implement pci_decompose_tag().
diffstat:
sys/arch/atari/include/pci_machdep.h | 4 +++-
sys/arch/atari/pci/pci_machdep.c | 17 ++++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r 90d858977ab5 -r b16807c144af sys/arch/atari/include/pci_machdep.h
--- a/sys/arch/atari/include/pci_machdep.h Wed May 15 17:15:17 2002 +0000
+++ b/sys/arch/atari/include/pci_machdep.h Wed May 15 17:30:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.8 2001/06/08 04:48:57 simonb Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.9 2002/05/15 17:30:04 thorpej Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -69,6 +69,8 @@
struct pcibus_attach_args *);
int pci_bus_maxdevs(pci_chipset_tag_t, int);
pcitag_t pci_make_tag(pci_chipset_tag_t, int, int, int);
+void pci_decompose_tag(pci_chipset_tag_t, pcitag_t, int *, int *,
+ int *);
pcireg_t pci_conf_read(pci_chipset_tag_t, pcitag_t, int);
void pci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t);
int pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
diff -r 90d858977ab5 -r b16807c144af sys/arch/atari/pci/pci_machdep.c
--- a/sys/arch/atari/pci/pci_machdep.c Wed May 15 17:15:17 2002 +0000
+++ b/sys/arch/atari/pci/pci_machdep.c Wed May 15 17:30:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.33 2002/01/09 21:19:14 leo Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.34 2002/05/15 17:30:04 thorpej Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -613,6 +613,21 @@
return ((bus << 16) | (device << 11) | (function << 8));
}
+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 = (tag >> 16) & 0xff;
+ if (dp != NULL)
+ *dp = (tag >> 11) & 0x1f;
+ if (fp != NULL)
+ *fp = (tag >> 8) & 0x7;
+}
+
int
pci_intr_map(pa, ihp)
struct pci_attach_args *pa;
Home |
Main Index |
Thread Index |
Old Index