Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Add inline accessors for pba_pc and pa_pc so tha...



details:   https://anonhg.NetBSD.org/src/rev/389dc716e07b
branches:  trunk
changeset: 766438:389dc716e07b
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jun 22 18:03:30 2011 +0000

description:
Add inline accessors for pba_pc and pa_pc so that <machine/pci_machdep.h>
can use them in inline functions.

diffstat:

 sys/dev/pci/pcivar.h |  22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diffs (43 lines):

diff -r d2f3f20728ed -r 389dc716e07b sys/dev/pci/pcivar.h
--- a/sys/dev/pci/pcivar.h      Wed Jun 22 17:52:57 2011 +0000
+++ b/sys/dev/pci/pcivar.h      Wed Jun 22 18:03:30 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcivar.h,v 1.93 2011/05/17 17:34:54 dyoung Exp $       */
+/*     $NetBSD: pcivar.h,v 1.94 2011/06/22 18:03:30 matt Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -120,6 +120,16 @@
 };
 
 /*
+ * This is used by <machine/pci_machdep.h> to access the pba_pc member.  It
+ * can't use it directly since pcibus_attach_args has yet to be defined.
+ */
+static inline pci_chipset_tag_t
+pcibus_attach_args_pc(struct pcibus_attach_args *pba)
+{
+       return pba->pba_pc;
+}
+
+/*
  * PCI device attach arguments.
  */
 struct pci_attach_args {
@@ -152,6 +162,16 @@
 };
 
 /*
+ * This is used by <machine/pci_machdep.h> to access the pa_pc member.  It
+ * can't use it directly since pci_attach_args has yet to be defined.
+ */
+static inline pci_chipset_tag_t
+pci_attach_args_pc(const struct pci_attach_args *pa)
+{
+       return pa->pa_pc;
+}
+
+/*
  * Flags given in the bus and device attachment args.
  */
 #define        PCI_FLAGS_IO_OKAY       0x01            /* I/O space is okay */



Home | Main Index | Thread Index | Old Index