summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/pci/amd756.c4
-rw-r--r--sys/arch/i386/pci/opti82c558.c4
-rw-r--r--sys/arch/i386/pci/opti82c700.c4
-rw-r--r--sys/arch/i386/pci/pci_intr_fixup.c3
-rw-r--r--sys/arch/i386/pci/pci_intr_fixup.h68
-rw-r--r--sys/arch/i386/pci/pcibios.c3
-rw-r--r--sys/arch/i386/pci/pcibiosvar.h43
-rw-r--r--sys/arch/i386/pci/piix.c4
-rw-r--r--sys/arch/i386/pci/sis85c503.c4
-rw-r--r--sys/arch/i386/pci/via82c586.c4
10 files changed, 56 insertions, 85 deletions
diff --git a/sys/arch/i386/pci/amd756.c b/sys/arch/i386/pci/amd756.c
index 2a365a9d755..5a18cbb5ba3 100644
--- a/sys/arch/i386/pci/amd756.c
+++ b/sys/arch/i386/pci/amd756.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amd756.c,v 1.1 2000/11/07 18:21:22 mickey Exp $ */
+/* $OpenBSD: amd756.c,v 1.2 2001/01/25 00:07:40 mickey Exp $ */
/* $NetBSD$ */
/*-
@@ -79,7 +79,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
-#include <i386/pci/pci_intr_fixup.h>
+#include <i386/pci/pcibiosvar.h>
#include <i386/pci/amd756reg.h>
struct viper_handle {
diff --git a/sys/arch/i386/pci/opti82c558.c b/sys/arch/i386/pci/opti82c558.c
index 2dd94b9ca7d..4fc45b674c4 100644
--- a/sys/arch/i386/pci/opti82c558.c
+++ b/sys/arch/i386/pci/opti82c558.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: opti82c558.c,v 1.4 2000/08/02 02:42:50 mickey Exp $ */
+/* $OpenBSD: opti82c558.c,v 1.5 2001/01/25 00:07:40 mickey Exp $ */
/* $NetBSD: opti82c558.c,v 1.2 2000/07/18 11:24:09 soda Exp $ */
/*-
@@ -79,7 +79,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
-#include <i386/pci/pci_intr_fixup.h>
+#include <i386/pci/pcibiosvar.h>
#include <i386/pci/opti82c558reg.h>
int opti82c558_getclink __P((pciintr_icu_handle_t, int, int *));
diff --git a/sys/arch/i386/pci/opti82c700.c b/sys/arch/i386/pci/opti82c700.c
index ff22439691c..9b9fb779383 100644
--- a/sys/arch/i386/pci/opti82c700.c
+++ b/sys/arch/i386/pci/opti82c700.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: opti82c700.c,v 1.4 2000/08/08 19:12:47 mickey Exp $ */
+/* $OpenBSD: opti82c700.c,v 1.5 2001/01/25 00:07:40 mickey Exp $ */
/* $NetBSD: opti82c700.c,v 1.2 2000/07/18 11:07:20 soda Exp $ */
/*-
@@ -79,7 +79,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
-#include <i386/pci/pci_intr_fixup.h>
+#include <i386/pci/pcibiosvar.h>
#include <i386/pci/opti82c700reg.h>
#ifdef FIRESTARDEBUG
diff --git a/sys/arch/i386/pci/pci_intr_fixup.c b/sys/arch/i386/pci/pci_intr_fixup.c
index cc6668c57b6..4a9bc997305 100644
--- a/sys/arch/i386/pci/pci_intr_fixup.c
+++ b/sys/arch/i386/pci/pci_intr_fixup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_intr_fixup.c,v 1.10 2000/11/07 18:21:22 mickey Exp $ */
+/* $OpenBSD: pci_intr_fixup.c,v 1.11 2001/01/25 00:07:40 mickey Exp $ */
/* $NetBSD: pci_intr_fixup.c,v 1.10 2000/08/10 21:18:27 soda Exp $ */
/*-
@@ -82,7 +82,6 @@
#include <dev/pci/pcidevs.h>
#include <i386/isa/icu.h>
-#include <i386/pci/pci_intr_fixup.h>
#include <i386/pci/pcibiosvar.h>
struct pciintr_link_map {
diff --git a/sys/arch/i386/pci/pci_intr_fixup.h b/sys/arch/i386/pci/pci_intr_fixup.h
deleted file mode 100644
index 294a8e013cf..00000000000
--- a/sys/arch/i386/pci/pci_intr_fixup.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* $OpenBSD: pci_intr_fixup.h,v 1.4 2000/11/07 18:21:22 mickey Exp $ */
-/* $NetBSD: pci_intr_fixup.h,v 1.1 1999/11/17 01:20:38 thorpej Exp $ */
-
-/*
- * Copyright (c) 1999, by UCHIYAMA Yasushi
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the developer may NOT be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-typedef void *pciintr_icu_handle_t;
-
-struct pciintr_icu {
- int (*pi_getclink) __P((pciintr_icu_handle_t, int, int *));
- int (*pi_get_intr) __P((pciintr_icu_handle_t, int, int *));
- int (*pi_set_intr) __P((pciintr_icu_handle_t, int, int));
- int (*pi_get_trigger) __P((pciintr_icu_handle_t, int, int *));
- int (*pi_set_trigger) __P((pciintr_icu_handle_t, int, int));
-};
-
-typedef const struct pciintr_icu *pciintr_icu_tag_t;
-
-#define pciintr_icu_getclink(t, h, link, pirqp) \
- (*(t)->pi_getclink)((h), (link), (pirqp))
-#define pciintr_icu_get_intr(t, h, pirq, irqp) \
- (*(t)->pi_get_intr)((h), (pirq), (irqp))
-#define pciintr_icu_set_intr(t, h, pirq, irq) \
- (*(t)->pi_set_intr)((h), (pirq), (irq))
-#define pciintr_icu_get_trigger(t, h, irq, triggerp) \
- (*(t)->pi_get_trigger)((h), (irq), (triggerp))
-#define pciintr_icu_set_trigger(t, h, irq, trigger) \
- (*(t)->pi_set_trigger)((h), (irq), (trigger))
-
-int pci_intr_fixup __P((pci_chipset_tag_t, bus_space_tag_t, u_int16_t *));
-
-/*
- * Init functions for our known PCI ICUs.
- */
-int piix_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
- pciintr_icu_tag_t *, pciintr_icu_handle_t *));
-int opti82c558_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
- pciintr_icu_tag_t *, pciintr_icu_handle_t *));
-int opti82c700_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
- pciintr_icu_tag_t *, pciintr_icu_handle_t *));
-int via82c586_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
- pciintr_icu_tag_t *, pciintr_icu_handle_t *));
-int sis85c503_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
- pciintr_icu_tag_t *, pciintr_icu_handle_t *));
-int amd756_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
- pciintr_icu_tag_t *, pciintr_icu_handle_t *));
diff --git a/sys/arch/i386/pci/pcibios.c b/sys/arch/i386/pci/pcibios.c
index a92b9ce7296..07f2319b723 100644
--- a/sys/arch/i386/pci/pcibios.c
+++ b/sys/arch/i386/pci/pcibios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcibios.c,v 1.19 2001/01/24 23:40:29 mickey Exp $ */
+/* $OpenBSD: pcibios.c,v 1.20 2001/01/25 00:07:40 mickey Exp $ */
/* $NetBSD: pcibios.c,v 1.5 2000/08/01 05:23:59 uch Exp $ */
/*
@@ -110,7 +110,6 @@
#include <dev/pci/pcidevs.h>
#include <i386/pci/pcibiosvar.h>
-#include <i386/pci/pci_intr_fixup.h>
#include <machine/biosvar.h>
diff --git a/sys/arch/i386/pci/pcibiosvar.h b/sys/arch/i386/pci/pcibiosvar.h
index 0a6cc981c4a..85244dbd4de 100644
--- a/sys/arch/i386/pci/pcibiosvar.h
+++ b/sys/arch/i386/pci/pcibiosvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcibiosvar.h,v 1.3 2001/01/24 23:40:29 mickey Exp $ */
+/* $OpenBSD: pcibiosvar.h,v 1.4 2001/01/25 00:07:40 mickey Exp $ */
/* $NetBSD: pcibios.h,v 1.2 2000/04/28 17:15:16 uch Exp $ */
/*
@@ -105,6 +105,30 @@ struct pciaddr {
extern struct pciaddr pciaddr;
+typedef void *pciintr_icu_handle_t;
+
+struct pciintr_icu {
+ int (*pi_getclink) __P((pciintr_icu_handle_t, int, int *));
+ int (*pi_get_intr) __P((pciintr_icu_handle_t, int, int *));
+ int (*pi_set_intr) __P((pciintr_icu_handle_t, int, int));
+ int (*pi_get_trigger) __P((pciintr_icu_handle_t, int, int *));
+ int (*pi_set_trigger) __P((pciintr_icu_handle_t, int, int));
+};
+
+typedef const struct pciintr_icu *pciintr_icu_tag_t;
+
+#define pciintr_icu_getclink(t, h, link, pirqp) \
+ (*(t)->pi_getclink)((h), (link), (pirqp))
+#define pciintr_icu_get_intr(t, h, pirq, irqp) \
+ (*(t)->pi_get_intr)((h), (pirq), (irqp))
+#define pciintr_icu_set_intr(t, h, pirq, irq) \
+ (*(t)->pi_set_intr)((h), (pirq), (irq))
+#define pciintr_icu_get_trigger(t, h, irq, triggerp) \
+ (*(t)->pi_get_trigger)((h), (irq), (triggerp))
+#define pciintr_icu_set_trigger(t, h, irq, trigger) \
+ (*(t)->pi_set_trigger)((h), (irq), (trigger))
+
+
int pcibios_flags;
#ifdef PCIBIOSVERBOSE
@@ -125,8 +149,25 @@ extern int pcibiosverbose;
#define PCIBIOS_PRINTVN(n, arg)
#endif
+int pci_intr_fixup __P((pci_chipset_tag_t, bus_space_tag_t, u_int16_t *));
int pci_bus_fixup __P((pci_chipset_tag_t, int));
void pci_addr_fixup __P((pci_chipset_tag_t, int));
void pci_device_foreach __P((pci_chipset_tag_t, int,
void (*) __P((pci_chipset_tag_t, pcitag_t))));
+/*
+ * Init functions for our known PCI ICUs.
+ */
+int piix_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
+ pciintr_icu_tag_t *, pciintr_icu_handle_t *));
+int opti82c558_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
+ pciintr_icu_tag_t *, pciintr_icu_handle_t *));
+int opti82c700_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
+ pciintr_icu_tag_t *, pciintr_icu_handle_t *));
+int via82c586_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
+ pciintr_icu_tag_t *, pciintr_icu_handle_t *));
+int sis85c503_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
+ pciintr_icu_tag_t *, pciintr_icu_handle_t *));
+int amd756_init __P((pci_chipset_tag_t, bus_space_tag_t, pcitag_t,
+ pciintr_icu_tag_t *, pciintr_icu_handle_t *));
+
diff --git a/sys/arch/i386/pci/piix.c b/sys/arch/i386/pci/piix.c
index f00402a108d..7d3843e6863 100644
--- a/sys/arch/i386/pci/piix.c
+++ b/sys/arch/i386/pci/piix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: piix.c,v 1.4 2000/08/08 19:12:48 mickey Exp $ */
+/* $OpenBSD: piix.c,v 1.5 2001/01/25 00:07:40 mickey Exp $ */
/* $NetBSD: piix.c,v 1.1 1999/11/17 01:21:20 thorpej Exp $ */
/*-
@@ -79,7 +79,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
-#include <i386/pci/pci_intr_fixup.h>
+#include <i386/pci/pcibiosvar.h>
#include <i386/pci/piixreg.h>
#include <i386/pci/piixvar.h>
diff --git a/sys/arch/i386/pci/sis85c503.c b/sys/arch/i386/pci/sis85c503.c
index ac9a40c63cd..32697ccb144 100644
--- a/sys/arch/i386/pci/sis85c503.c
+++ b/sys/arch/i386/pci/sis85c503.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sis85c503.c,v 1.4 2000/08/02 02:42:50 mickey Exp $ */
+/* $OpenBSD: sis85c503.c,v 1.5 2001/01/25 00:07:41 mickey Exp $ */
/* $NetBSD: sis85c503.c,v 1.2 2000/07/18 11:24:09 soda Exp $ */
/*-
@@ -78,7 +78,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
-#include <i386/pci/pci_intr_fixup.h>
+#include <i386/pci/pcibiosvar.h>
#include <i386/pci/sis85c503reg.h>
#include <i386/pci/piixvar.h>
diff --git a/sys/arch/i386/pci/via82c586.c b/sys/arch/i386/pci/via82c586.c
index 3894006a6c0..acc26485817 100644
--- a/sys/arch/i386/pci/via82c586.c
+++ b/sys/arch/i386/pci/via82c586.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via82c586.c,v 1.5 2001/01/16 20:49:49 mickey Exp $ */
+/* $OpenBSD: via82c586.c,v 1.6 2001/01/25 00:07:41 mickey Exp $ */
/* $NetBSD: via82c586.c,v 1.2 2000/07/18 11:24:09 soda Exp $ */
/*-
@@ -78,7 +78,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
-#include <i386/pci/pci_intr_fixup.h>
+#include <i386/pci/pcibiosvar.h>
#include <i386/pci/via82c586reg.h>
#include <i386/pci/piixvar.h>