Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arc Adapt to pci_intr_map change.



details:   https://anonhg.NetBSD.org/src/rev/151adf227f3c
branches:  trunk
changeset: 502184:151adf227f3c
user:      ur <ur%NetBSD.org@localhost>
date:      Sat Jan 13 10:46:18 2001 +0000

description:
Adapt to pci_intr_map change.

diffstat:

 sys/arch/arc/include/pci_machdep.h |  15 ++++++++++-----
 sys/arch/arc/pci/necpb.c           |  13 +++++++------
 sys/arch/arc/pci/pbcpcibus.c       |  16 ++++++++--------
 3 files changed, 25 insertions(+), 19 deletions(-)

diffs (125 lines):

diff -r 0624b9cb2a86 -r 151adf227f3c sys/arch/arc/include/pci_machdep.h
--- a/sys/arch/arc/include/pci_machdep.h        Sat Jan 13 10:33:30 2001 +0000
+++ b/sys/arch/arc/include/pci_machdep.h        Sat Jan 13 10:46:18 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.1 2000/06/09 05:33:04 soda Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.2 2001/01/13 10:46:18 ur Exp $ */
 /* NetBSD: pci_machdep.h,v 1.3 1999/03/19 03:40:46 cgd Exp  */
 
 /*
@@ -33,6 +33,11 @@
  */
 
 /*
+ * Forward declarations.
+ */
+struct pci_attach_args;
+
+/*
  * Types provided to machine-independent PCI code
  */
 typedef struct arc_pci_chipset *pci_chipset_tag_t;
@@ -52,8 +57,8 @@
                            int));
        void            (*pc_conf_write) __P((pci_chipset_tag_t, pcitag_t, int,
                            pcireg_t));
-       int             (*pc_intr_map) __P((pci_chipset_tag_t, pcitag_t, int,
-                           int, pci_intr_handle_t *));
+       int             (*pc_intr_map) __P((struct pci_attach_args *,
+                           pci_intr_handle_t *));
        const char      *(*pc_intr_string) __P((pci_chipset_tag_t,
                            pci_intr_handle_t));
        void            *(*pc_intr_establish) __P((pci_chipset_tag_t,
@@ -75,8 +80,8 @@
     (*(c)->pc_conf_read)((c), (t), (r))
 #define        pci_conf_write(c, t, r, v)                                      \
     (*(c)->pc_conf_write)((c), (t), (r), (v))
-#define        pci_intr_map(c, it, ip, il, ihp)                                \
-    (*(c)->pc_intr_map)((c), (it), (ip), (il), (ihp))
+#define        pci_intr_map(pa, ihp)                                           \
+    (*(pa)->pa_pc->pc_intr_map)((pa), (ihp))
 #define        pci_intr_string(c, ih)                                          \
     (*(c)->pc_intr_string)((c), (ih))
 #define        pci_intr_establish(c, ih, l, h, a)                              \
diff -r 0624b9cb2a86 -r 151adf227f3c sys/arch/arc/pci/necpb.c
--- a/sys/arch/arc/pci/necpb.c  Sat Jan 13 10:33:30 2001 +0000
+++ b/sys/arch/arc/pci/necpb.c  Sat Jan 13 10:46:18 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: necpb.c,v 1.6 2000/12/24 09:25:30 ur Exp $     */
+/*     $NetBSD: necpb.c,v 1.7 2001/01/13 10:46:18 ur Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
 pcireg_t       necpb_conf_read __P((pci_chipset_tag_t, pcitag_t, int));
 void           necpb_conf_write __P((pci_chipset_tag_t, pcitag_t, int,
                    pcireg_t));
-int            necpb_intr_map __P((pci_chipset_tag_t, pcitag_t, int, int,
+int            necpb_intr_map __P((struct pci_attach_args *,
                    pci_intr_handle_t *));
 const char *   necpb_intr_string __P((pci_chipset_tag_t, pci_intr_handle_t));
 void *         necpb_intr_establish __P((pci_chipset_tag_t, pci_intr_handle_t,
@@ -329,12 +329,13 @@
 }
 
 int
-necpb_intr_map(pc, intrtag, pin, line, ihp)
-       pci_chipset_tag_t pc;
-       pcitag_t intrtag;
-       int pin, line;
+necpb_intr_map(pa, ihp)
+       struct pci_attach_args *pa;
        pci_intr_handle_t *ihp;
 {
+       pci_chipset_tag_t pc = pa->pa_pc;
+       pcitag_t intrtag = pa->pa_intrtag;
+       int pin = pa->pa_intrpin;
        int bus, dev;
 
        if (pin == 0) {
diff -r 0624b9cb2a86 -r 151adf227f3c sys/arch/arc/pci/pbcpcibus.c
--- a/sys/arch/arc/pci/pbcpcibus.c      Sat Jan 13 10:33:30 2001 +0000
+++ b/sys/arch/arc/pci/pbcpcibus.c      Sat Jan 13 10:46:18 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pbcpcibus.c,v 1.5 2000/06/29 08:34:12 mrg Exp $        */
+/*     $NetBSD: pbcpcibus.c,v 1.6 2001/01/13 10:46:18 ur Exp $ */
 /*     $OpenBSD: pbcpcibus.c,v 1.7 1998/03/25 11:52:48 pefo Exp $ */
 
 /*
@@ -72,8 +72,7 @@
 pcireg_t pbc_conf_read __P((pci_chipset_tag_t, pcitag_t, int));
 void    pbc_conf_write __P((pci_chipset_tag_t, pcitag_t, int, pcireg_t));
 
-int      pbc_intr_map __P((pci_chipset_tag_t, pcitag_t, int, int,
-           pci_intr_handle_t *));
+int      pbc_intr_map __P((struct pci_attach_args *, pci_intr_handle_t *));
 const char *pbc_intr_string __P((pci_chipset_tag_t, pci_intr_handle_t));
 void     *pbc_intr_establish __P((pci_chipset_tag_t, pci_intr_handle_t,
            int, int (*)(void *), void *));
@@ -473,12 +472,13 @@
 #endif
 
 int
-pbc_intr_map(pc, bustag, buspin, line, ihp)
-       pci_chipset_tag_t pc;
-       pcitag_t bustag;
-       int buspin, line;
+pbc_intr_map(pa, ihp)
+       struct pci_attach_args *pa;
        pci_intr_handle_t *ihp;
 {
+       pci_chipset_tag_t pc = pa->pa_pc;
+       pcitag_t intrtag = pa->pa_intrtag;
+       int buspin = pa->pa_intrpin;
        int device, pirq;
 
         if (buspin == 0) {
@@ -492,7 +492,7 @@
                 return 1;
         }
 
-       pbc_decompose_tag(pc, bustag, NULL, &device, NULL);
+       pbc_decompose_tag(pc, intrtag, NULL, &device, NULL);
        pirq = buspin - 1;
 
        switch(device) {



Home | Main Index | Thread Index | Old Index