diff options
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r-- | sys/arch/i386/pci/amd756.c | 33 | ||||
-rw-r--r-- | sys/arch/i386/pci/opti82c558.c | 30 | ||||
-rw-r--r-- | sys/arch/i386/pci/opti82c700.c | 33 | ||||
-rw-r--r-- | sys/arch/i386/pci/pchb.c | 17 | ||||
-rw-r--r-- | sys/arch/i386/pci/pci_addr_fixup.c | 81 | ||||
-rw-r--r-- | sys/arch/i386/pci/pci_intr_fixup.c | 31 | ||||
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.c | 53 | ||||
-rw-r--r-- | sys/arch/i386/pci/pcib.c | 17 | ||||
-rw-r--r-- | sys/arch/i386/pci/pcibios.c | 44 | ||||
-rw-r--r-- | sys/arch/i386/pci/pcic_pci_machdep.c | 23 | ||||
-rw-r--r-- | sys/arch/i386/pci/pciide_machdep.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/pci/piix.c | 33 | ||||
-rw-r--r-- | sys/arch/i386/pci/sis85c503.c | 22 | ||||
-rw-r--r-- | sys/arch/i386/pci/via8231.c | 34 | ||||
-rw-r--r-- | sys/arch/i386/pci/via82c586.c | 30 |
15 files changed, 140 insertions, 351 deletions
diff --git a/sys/arch/i386/pci/amd756.c b/sys/arch/i386/pci/amd756.c index bd86f45dd1d..fb95fac9eff 100644 --- a/sys/arch/i386/pci/amd756.c +++ b/sys/arch/i386/pci/amd756.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amd756.c,v 1.3 2002/03/14 01:26:33 millert Exp $ */ +/* $OpenBSD: amd756.c,v 1.4 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD$ */ /*- @@ -108,12 +108,8 @@ const struct pciintr_icu amd756_pci_icu = { int -amd756_init(pc, iot, tag, ptagp, phandp) - pci_chipset_tag_t pc; - bus_space_tag_t iot; - pcitag_t tag; - pciintr_icu_tag_t *ptagp; - pciintr_icu_handle_t *phandp; +amd756_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag, + pciintr_icu_tag_t *ptagp, pciintr_icu_handle_t *phandp) { struct viper_handle *ph; @@ -136,9 +132,7 @@ amd756_init(pc, iot, tag, ptagp, phandp) } int -amd756_getclink(v, link, clinkp) - pciintr_icu_handle_t v; - int link, *clinkp; +amd756_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { if (AMD756_LEGAL_LINK(link - 1) == 0) return (1); @@ -148,9 +142,7 @@ amd756_getclink(v, link, clinkp) } int -amd756_get_intr(v, clink, irqp) - pciintr_icu_handle_t v; - int clink, *irqp; +amd756_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) { struct viper_handle *ph = v; pcireg_t reg; @@ -168,9 +160,7 @@ amd756_get_intr(v, clink, irqp) } int -amd756_set_intr(v, clink, irq) - pciintr_icu_handle_t v; - int clink, irq; +amd756_set_intr(pciintr_icu_handle_t v, int clink, int irq) { struct viper_handle *ph = v; int val; @@ -189,9 +179,7 @@ amd756_set_intr(v, clink, irq) } int -amd756_get_trigger(v, irq, triggerp) - pciintr_icu_handle_t v; - int irq, *triggerp; +amd756_get_trigger(pciintr_icu_handle_t v, int irq, int *triggerp) { struct viper_handle *ph = v; int i, pciirq; @@ -216,9 +204,7 @@ amd756_get_trigger(v, irq, triggerp) } int -amd756_set_trigger(v, irq, trigger) - pciintr_icu_handle_t v; - int irq, trigger; +amd756_set_trigger(pciintr_icu_handle_t v, int irq, int trigger) { struct viper_handle *ph = v; int i, pciirq; @@ -245,8 +231,7 @@ amd756_set_trigger(v, irq, trigger) #ifdef VIPER_DEBUG static void -amd756_pir_dump(ph) - struct viper_handle *ph; +amd756_pir_dump(struct viper_handle *ph) { int a, b; diff --git a/sys/arch/i386/pci/opti82c558.c b/sys/arch/i386/pci/opti82c558.c index 6a240fb13c0..03f067293b7 100644 --- a/sys/arch/i386/pci/opti82c558.c +++ b/sys/arch/i386/pci/opti82c558.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opti82c558.c,v 1.6 2002/03/14 01:26:33 millert Exp $ */ +/* $OpenBSD: opti82c558.c,v 1.7 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: opti82c558.c,v 1.2 2000/07/18 11:24:09 soda Exp $ */ /*- @@ -125,12 +125,8 @@ static const int viper_pirq_encode[] = { }; int -opti82c558_init(pc, iot, tag, ptagp, phandp) - pci_chipset_tag_t pc; - bus_space_tag_t iot; - pcitag_t tag; - pciintr_icu_tag_t *ptagp; - pciintr_icu_handle_t *phandp; +opti82c558_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag, + pciintr_icu_tag_t *ptagp, pciintr_icu_handle_t *phandp) { struct opti82c558_handle *ph; @@ -147,9 +143,7 @@ opti82c558_init(pc, iot, tag, ptagp, phandp) } int -opti82c558_getclink(v, link, clinkp) - pciintr_icu_handle_t v; - int link, *clinkp; +opti82c558_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { if (VIPER_LEGAL_LINK(link - 1)) { @@ -161,9 +155,7 @@ opti82c558_getclink(v, link, clinkp) } int -opti82c558_get_intr(v, clink, irqp) - pciintr_icu_handle_t v; - int clink, *irqp; +opti82c558_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) { struct opti82c558_handle *ph = v; pcireg_t reg; @@ -180,9 +172,7 @@ opti82c558_get_intr(v, clink, irqp) } int -opti82c558_set_intr(v, clink, irq) - pciintr_icu_handle_t v; - int clink, irq; +opti82c558_set_intr(pciintr_icu_handle_t v, int clink, int irq) { struct opti82c558_handle *ph = v; int shift; @@ -201,9 +191,7 @@ opti82c558_set_intr(v, clink, irq) } int -opti82c558_get_trigger(v, irq, triggerp) - pciintr_icu_handle_t v; - int irq, *triggerp; +opti82c558_get_trigger(pciintr_icu_handle_t v, int irq, int *triggerp) { struct opti82c558_handle *ph = v; pcireg_t reg; @@ -224,9 +212,7 @@ opti82c558_get_trigger(v, irq, triggerp) } int -opti82c558_set_trigger(v, irq, trigger) - pciintr_icu_handle_t v; - int irq, trigger; +opti82c558_set_trigger(pciintr_icu_handle_t v, int irq, int trigger) { struct opti82c558_handle *ph = v; int shift; diff --git a/sys/arch/i386/pci/opti82c700.c b/sys/arch/i386/pci/opti82c700.c index 07766921546..c5af374894a 100644 --- a/sys/arch/i386/pci/opti82c700.c +++ b/sys/arch/i386/pci/opti82c700.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opti82c700.c,v 1.6 2002/03/14 01:26:33 millert Exp $ */ +/* $OpenBSD: opti82c700.c,v 1.7 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: opti82c700.c,v 1.2 2000/07/18 11:07:20 soda Exp $ */ /*- @@ -113,12 +113,8 @@ void opti82c700_pir_dump(struct opti82c700_handle *); #endif int -opti82c700_init(pc, iot, tag, ptagp, phandp) - pci_chipset_tag_t pc; - bus_space_tag_t iot; - pcitag_t tag; - pciintr_icu_tag_t *ptagp; - pciintr_icu_handle_t *phandp; +opti82c700_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag, + pciintr_icu_tag_t *ptagp, pciintr_icu_handle_t *phandp) { struct opti82c700_handle *ph; @@ -137,8 +133,7 @@ opti82c700_init(pc, iot, tag, ptagp, phandp) } int -opti82c700_addr(link, addrofs, ofs) - int link, *addrofs, *ofs; +opti82c700_addr(int link, int *addrofs, int *ofs) { int regofs, src; @@ -173,9 +168,7 @@ opti82c700_addr(link, addrofs, ofs) } int -opti82c700_getclink(v, link, clinkp) - pciintr_icu_handle_t v; - int link, *clinkp; +opti82c700_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { DPRINTF(("FireStar link value 0x%x: ", link)); @@ -204,9 +197,7 @@ opti82c700_getclink(v, link, clinkp) } int -opti82c700_get_intr(v, clink, irqp) - pciintr_icu_handle_t v; - int clink, *irqp; +opti82c700_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) { struct opti82c700_handle *ph = v; pcireg_t reg; @@ -225,9 +216,7 @@ opti82c700_get_intr(v, clink, irqp) } int -opti82c700_set_intr(v, clink, irq) - pciintr_icu_handle_t v; - int clink, irq; +opti82c700_set_intr(pciintr_icu_handle_t v, int clink, int irq) { struct opti82c700_handle *ph = v; int addrofs, ofs; @@ -248,9 +237,7 @@ opti82c700_set_intr(v, clink, irq) } int -opti82c700_get_trigger(v, irq, triggerp) - pciintr_icu_handle_t v; - int irq, *triggerp; +opti82c700_get_trigger(pciintr_icu_handle_t v, int irq, int *triggerp) { struct opti82c700_handle *ph = v; int i, val, addrofs, ofs; @@ -296,9 +283,7 @@ opti82c700_get_trigger(v, irq, triggerp) } int -opti82c700_set_trigger(v, irq, trigger) - pciintr_icu_handle_t v; - int irq, trigger; +opti82c700_set_trigger(pciintr_icu_handle_t v, int irq, int trigger) { struct opti82c700_handle *ph = v; int i, val, addrofs, ofs; diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c index 7a664b416c5..466d9cf0a78 100644 --- a/sys/arch/i386/pci/pchb.c +++ b/sys/arch/i386/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.52 2006/03/13 20:10:49 brad Exp $ */ +/* $OpenBSD: pchb.c,v 1.53 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pchb.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */ /* @@ -150,9 +150,7 @@ const struct pci_matchid via_devices[] = { }; int -pchbmatch(parent, match, aux) - struct device *parent; - void *match, *aux; +pchbmatch(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = aux; @@ -177,9 +175,7 @@ pchbmatch(parent, match, aux) u_int32_t rcc_bus_visited = 1; void -pchbattach(parent, self, aux) - struct device *parent, *self; - void *aux; +pchbattach(struct device *parent, struct device *self, void *aux) { struct pchb_softc *sc = (struct pchb_softc *)self; struct pci_attach_args *pa = aux; @@ -410,9 +406,7 @@ pchbattach(parent, self, aux) } int -pchb_print(aux, pnp) - void *aux; - const char *pnp; +pchb_print(void *aux, const char *pnp) { struct pcibus_attach_args *pba = aux; @@ -427,8 +421,7 @@ pchb_print(aux, pnp) * http://csrc.nist.gov/publications/fips/fips140-1/fips1401.pdf */ void -pchb_rnd(v) - void *v; +pchb_rnd(void *v) { struct pchb_softc *sc = v; diff --git a/sys/arch/i386/pci/pci_addr_fixup.c b/sys/arch/i386/pci/pci_addr_fixup.c index bb99bf6f769..6f12fe5618a 100644 --- a/sys/arch/i386/pci/pci_addr_fixup.c +++ b/sys/arch/i386/pci/pci_addr_fixup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_addr_fixup.c,v 1.19 2006/08/14 22:48:28 deraadt Exp $ */ +/* $OpenBSD: pci_addr_fixup.c,v 1.20 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pci_addr_fixup.c,v 1.7 2000/08/03 20:10:45 nathanw Exp $ */ /*- @@ -76,10 +76,7 @@ int pciaddr_device_is_agp(pci_chipset_tag_t, pcitag_t); #define PCIADDR_ISAMEM_RESERVE (16 * 1024 * 1024) void -pci_addr_fixup(sc, pc, maxbus) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - int maxbus; +pci_addr_fixup(struct pcibios_softc *sc, pci_chipset_tag_t pc, int maxbus) { extern paddr_t avail_end; const char *verbose_header = @@ -151,10 +148,8 @@ pci_addr_fixup(sc, pc, maxbus) } void -pciaddr_resource_reserve(sc, pc, tag) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - pcitag_t tag; +pciaddr_resource_reserve(struct pcibios_softc *sc, pci_chipset_tag_t pc, + pcitag_t tag) { if (pcibios_flags & PCIBIOS_VERBOSE) pciaddr_print_devid(pc, tag); @@ -162,10 +157,8 @@ pciaddr_resource_reserve(sc, pc, tag) } void -pciaddr_resource_reserve_disabled(sc, pc, tag) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - pcitag_t tag; +pciaddr_resource_reserve_disabled(struct pcibios_softc *sc, + pci_chipset_tag_t pc, pcitag_t tag) { if (pcibios_flags & PCIBIOS_VERBOSE) pciaddr_print_devid(pc, tag); @@ -174,10 +167,8 @@ pciaddr_resource_reserve_disabled(sc, pc, tag) } void -pciaddr_resource_allocate(sc, pc, tag) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - pcitag_t tag; +pciaddr_resource_allocate(struct pcibios_softc *sc, pci_chipset_tag_t pc, + pcitag_t tag) { if (pcibios_flags & PCIBIOS_VERBOSE) pciaddr_print_devid(pc, tag); @@ -185,11 +176,8 @@ pciaddr_resource_allocate(sc, pc, tag) } void -pciaddr_resource_manage(sc, pc, tag, func) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - pcitag_t tag; - pciaddr_resource_manage_func_t func; +pciaddr_resource_manage(struct pcibios_softc *sc, pci_chipset_tag_t pc, + pcitag_t tag, pciaddr_resource_manage_func_t func) { struct extent *ex; pcireg_t val, mask; @@ -271,14 +259,9 @@ pciaddr_resource_manage(sc, pc, tag, func) } int -pciaddr_do_resource_allocate(sc, pc, tag, mapreg, ex, type, addr, size) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - pcitag_t tag; - struct extent *ex; - int mapreg, type; - u_long *addr; - bus_size_t size; +pciaddr_do_resource_allocate(struct pcibios_softc *sc, pci_chipset_tag_t pc, + pcitag_t tag, int mapreg, struct extent *ex, int type, u_long *addr, + bus_size_t size) { bus_addr_t start; int error; @@ -322,14 +305,9 @@ pciaddr_do_resource_allocate(sc, pc, tag, mapreg, ex, type, addr, size) } int -pciaddr_do_resource_reserve(sc, pc, tag, mapreg, ex, type, addr, size) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - pcitag_t tag; - struct extent *ex; - int type, mapreg; - u_long *addr; - bus_size_t size; +pciaddr_do_resource_reserve(struct pcibios_softc *sc, pci_chipset_tag_t pc, + pcitag_t tag, int mapreg, struct extent *ex, int type, u_long *addr, + bus_size_t size) { pcireg_t val; int error; @@ -356,14 +334,9 @@ pciaddr_do_resource_reserve(sc, pc, tag, mapreg, ex, type, addr, size) } int -pciaddr_do_resource_reserve_disabled(sc, pc, tag, mapreg, ex, type, addr, size) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - pcitag_t tag; - struct extent *ex; - int type, mapreg; - u_long *addr; - bus_size_t size; +pciaddr_do_resource_reserve_disabled(struct pcibios_softc *sc, + pci_chipset_tag_t pc, pcitag_t tag, int mapreg, struct extent *ex, int type, + u_long *addr, bus_size_t size) { pcireg_t val; int error; @@ -393,8 +366,7 @@ pciaddr_do_resource_reserve_disabled(sc, pc, tag, mapreg, ex, type, addr, size) } bus_addr_t -pciaddr_ioaddr(val) - u_int32_t val; +pciaddr_ioaddr(u_int32_t val) { return ((PCI_MAPREG_TYPE(val) == PCI_MAPREG_TYPE_MEM) ? PCI_MAPREG_MEM_ADDR(val) @@ -402,9 +374,7 @@ pciaddr_ioaddr(val) } void -pciaddr_print_devid(pc, tag) - pci_chipset_tag_t pc; - pcitag_t tag; +pciaddr_print_devid(pci_chipset_tag_t pc, pcitag_t tag) { int bus, device, function; pcireg_t id; @@ -416,9 +386,7 @@ pciaddr_print_devid(pc, tag) } int -pciaddr_device_is_agp(pc, tag) - pci_chipset_tag_t pc; - pcitag_t tag; +pciaddr_device_is_agp(pci_chipset_tag_t pc, pcitag_t tag) { pcireg_t class, status, rval; int off; @@ -443,10 +411,7 @@ pciaddr_device_is_agp(pc, tag) struct extent * -pciaddr_search(mem_port, startp, size) - int mem_port; - bus_addr_t *startp; - bus_size_t size; +pciaddr_search(int mem_port, bus_addr_t *startp, bus_size_t size) { extern struct cfdriver pcibios_cd; struct pcibios_softc *sc; diff --git a/sys/arch/i386/pci/pci_intr_fixup.c b/sys/arch/i386/pci/pci_intr_fixup.c index a91d27dbfc8..03827b2e851 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.55 2006/08/06 01:13:22 brad Exp $ */ +/* $OpenBSD: pci_intr_fixup.c,v 1.56 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pci_intr_fixup.c,v 1.10 2000/08/10 21:18:27 soda Exp $ */ /* @@ -251,8 +251,7 @@ pciintr_icu_lookup(id) } struct pciintr_link_map * -pciintr_link_lookup(link) - int link; +pciintr_link_lookup(int link) { struct pciintr_link_map *l; @@ -330,8 +329,7 @@ pciintr_link_alloc(pci_chipset_tag_t pc, struct pcibios_intr_routing *pir, int p } struct pcibios_intr_routing * -pciintr_pir_lookup(bus, device) - int bus, device; +pciintr_pir_lookup(int bus, int device) { struct pcibios_intr_routing *pir; int entry; @@ -350,8 +348,7 @@ pciintr_pir_lookup(bus, device) } int -pciintr_bitmap_count_irq(irq_bitmap, irqp) - int irq_bitmap, *irqp; +pciintr_bitmap_count_irq(int irq_bitmap, int *irqp) { int i, bit, count = 0, irq = I386_PCI_INTERRUPT_LINE_NO_CONNECTION; @@ -542,9 +539,7 @@ pciintr_link_fixup(void) } int -pci_intr_route_link(pc, ihp) - pci_chipset_tag_t pc; - pci_intr_handle_t *ihp; +pci_intr_route_link(pci_chipset_tag_t pc, pci_intr_handle_t *ihp) { struct pciintr_link_map *l; pcireg_t intr; @@ -611,7 +606,7 @@ pci_intr_route_link(pc, ihp) } int -pci_intr_post_fixup() +pci_intr_post_fixup(void) { struct pciintr_link_map *l; int i, pciirq; @@ -651,10 +646,8 @@ pci_intr_post_fixup() } int -pci_intr_header_fixup(pc, tag, ihp) - pci_chipset_tag_t pc; - pcitag_t tag; - pci_intr_handle_t *ihp; +pci_intr_header_fixup(pci_chipset_tag_t pc, pcitag_t tag, + pci_intr_handle_t *ihp) { struct pcibios_intr_routing *pir; struct pciintr_link_map *l; @@ -722,7 +715,7 @@ pci_intr_header_fixup(pc, tag, ihp) } if (pcibios_flags & PCIBIOS_INTRDEBUG) { - register pcireg_t id = pci_conf_read(pc, tag, PCI_ID_REG); + pcireg_t id = pci_conf_read(pc, tag, PCI_ID_REG); printf("\n%d:%d:%d %04x:%04x pin %c clink 0x%02x irq %d " "stage %d %s irq %d\n", bus, device, function, @@ -735,10 +728,8 @@ pci_intr_header_fixup(pc, tag, ihp) } int -pci_intr_fixup(sc, pc, iot) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - bus_space_tag_t iot; +pci_intr_fixup(struct pcibios_softc *sc, pci_chipset_tag_t pc, + bus_space_tag_t iot) { struct pcibios_pir_header *pirh = &pcibios_pir_header; const struct pciintr_icu_table *piit = NULL; diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c index b7690fb9d66..07d8c5722c7 100644 --- a/sys/arch/i386/pci/pci_machdep.c +++ b/sys/arch/i386/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.33 2006/06/25 07:44:54 brad Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.34 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */ /*- @@ -167,9 +167,8 @@ struct i386_bus_dma_tag pci_bus_dma_tag = { }; void -pci_attach_hook(parent, self, pba) - struct device *parent, *self; - struct pcibus_attach_args *pba; +pci_attach_hook(struct device *parent, struct device *self, + struct pcibus_attach_args *pba) { #if NBIOS > 0 @@ -183,9 +182,7 @@ pci_attach_hook(parent, self, pba) } int -pci_bus_maxdevs(pc, busno) - pci_chipset_tag_t pc; - int busno; +pci_bus_maxdevs(pci_chipset_tag_t pc, int busno) { /* @@ -201,9 +198,7 @@ pci_bus_maxdevs(pc, busno) } pcitag_t -pci_make_tag(pc, bus, device, function) - pci_chipset_tag_t pc; - int bus, device, function; +pci_make_tag(pci_chipset_tag_t pc, int bus, int device, int function) { pcitag_t tag; @@ -231,10 +226,7 @@ pci_make_tag(pc, bus, device, function) } void -pci_decompose_tag(pc, tag, bp, dp, fp) - pci_chipset_tag_t pc; - pcitag_t tag; - int *bp, *dp, *fp; +pci_decompose_tag(pci_chipset_tag_t pc, pcitag_t tag, int *bp, int *dp, int *fp) { switch (pci_mode) { @@ -260,10 +252,7 @@ pci_decompose_tag(pc, tag, bp, dp, fp) } pcireg_t -pci_conf_read(pc, tag, reg) - pci_chipset_tag_t pc; - pcitag_t tag; - int reg; +pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg) { pcireg_t data; @@ -287,11 +276,7 @@ pci_conf_read(pc, tag, reg) } void -pci_conf_write(pc, tag, reg, data) - pci_chipset_tag_t pc; - pcitag_t tag; - int reg; - pcireg_t data; +pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data) { switch (pci_mode) { @@ -312,7 +297,7 @@ pci_conf_write(pc, tag, reg, data) } int -pci_mode_detect() +pci_mode_detect(void) { #ifdef PCI_CONF_MODE @@ -420,9 +405,7 @@ not2: } int -pci_intr_map(pa, ihp) - struct pci_attach_args *pa; - pci_intr_handle_t *ihp; +pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) { #if NIOAPIC > 0 struct mp_intr_map *mip; @@ -532,9 +515,7 @@ bad: } const char * -pci_intr_string(pc, ih) - pci_chipset_tag_t pc; - pci_intr_handle_t ih; +pci_intr_string(pci_chipset_tag_t pc, pci_intr_handle_t ih) { static char irqstr[64]; int line = ih.line & APIC_INT_LINE_MASK; @@ -555,12 +536,8 @@ pci_intr_string(pc, ih) } void * -pci_intr_establish(pc, ih, level, func, arg, what) - pci_chipset_tag_t pc; - pci_intr_handle_t ih; - int level, (*func)(void *); - void *arg; - char *what; +pci_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t ih, int level, + int (*func)(void *), void *arg, char *what) { void *ret; int l = ih.line & APIC_INT_LINE_MASK; @@ -582,9 +559,7 @@ pci_intr_establish(pc, ih, level, func, arg, what) } void -pci_intr_disestablish(pc, cookie) - pci_chipset_tag_t pc; - void *cookie; +pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie) { /* XXX oh, unroute the pci int link? */ isa_intr_disestablish(NULL, cookie); diff --git a/sys/arch/i386/pci/pcib.c b/sys/arch/i386/pci/pcib.c index 92c1c49be9a..f0cc7bc2968 100644 --- a/sys/arch/i386/pci/pcib.c +++ b/sys/arch/i386/pci/pcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcib.c,v 1.19 2005/01/07 02:24:18 brad Exp $ */ +/* $OpenBSD: pcib.c,v 1.20 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pcib.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */ /*- @@ -69,9 +69,7 @@ struct cfdriver pcib_cd = { }; int -pcibmatch(parent, match, aux) - struct device *parent; - void *match, *aux; +pcibmatch(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = aux; @@ -107,9 +105,7 @@ pcibmatch(parent, match, aux) } void -pcibattach(parent, self, aux) - struct device *parent, *self; - void *aux; +pcibattach(struct device *parent, struct device *self, void *aux) { /* * Cannot attach isa bus now; must postpone for various reasons @@ -120,8 +116,7 @@ pcibattach(parent, self, aux) } void -pcib_callback(self) - struct device *self; +pcib_callback(struct device *self) { struct isabus_attach_args iba; @@ -143,9 +138,7 @@ pcib_callback(self) } int -pcib_print(aux, pnp) - void *aux; - const char *pnp; +pcib_print(void *aux, const char *pnp) { /* Only ISAs can attach to pcib's; easy. */ if (pnp) diff --git a/sys/arch/i386/pci/pcibios.c b/sys/arch/i386/pci/pcibios.c index ea83f89717e..438d3338d45 100644 --- a/sys/arch/i386/pci/pcibios.c +++ b/sys/arch/i386/pci/pcibios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcibios.c,v 1.33 2006/04/27 15:37:55 mickey Exp $ */ +/* $OpenBSD: pcibios.c,v 1.34 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pcibios.c,v 1.5 2000/08/01 05:23:59 uch Exp $ */ /* @@ -145,9 +145,7 @@ struct cfattach pcibios_ca = { }; int -pcibiosprobe(parent, match, aux) - struct device *parent; - void *match, *aux; +pcibiosprobe(struct device *parent, void *match, void *aux) { struct bios_attach_args *ba = aux; u_int32_t rev_maj, rev_min, mech1, mech2, scmech1, scmech2, maxbus; @@ -169,9 +167,7 @@ pcibiosprobe(parent, match, aux) } void -pcibiosattach(parent, self, aux) - struct device *parent, *self; - void *aux; +pcibiosattach(struct device *parent, struct device *self, void *aux) { struct pcibios_softc *sc = (struct pcibios_softc *)self; u_int32_t rev_maj, rev_min, mech1, mech2, scmech1, scmech2; @@ -241,8 +237,7 @@ pcibiosattach(parent, self, aux) } struct pcibios_intr_routing * -pcibios_pir_init(sc) - struct pcibios_softc *sc; +pcibios_pir_init(struct pcibios_softc *sc) { paddr_t pa; @@ -346,10 +341,9 @@ pcibios_pir_init(sc) } int -pcibios_get_status(sc, rev_maj, rev_min, mech1, mech2, scmech1, scmech2, maxbus) - struct pcibios_softc *sc; - u_int32_t *rev_maj, *rev_min, *mech1, *mech2, *scmech1, *scmech2, - *maxbus; +pcibios_get_status(struct pcibios_softc *sc, u_int32_t *rev_maj, + u_int32_t *rev_min, u_int32_t *mech1, u_int32_t *mech2, u_int32_t *scmech1, + u_int32_t *scmech2, u_int32_t *maxbus) { u_int32_t ax, bx, cx, edx; int rv; @@ -390,11 +384,8 @@ pcibios_get_status(sc, rev_maj, rev_min, mech1, mech2, scmech1, scmech2, maxbus) } int -pcibios_get_intr_routing(sc, table, nentries, exclirq) - struct pcibios_softc *sc; - struct pcibios_intr_routing *table; - int *nentries; - u_int16_t *exclirq; +pcibios_get_intr_routing(struct pcibios_softc *sc, + struct pcibios_intr_routing *table, int *nentries, u_int16_t *exclirq) { u_int32_t ax, bx; int rv; @@ -435,10 +426,7 @@ pcibios_get_intr_routing(sc, table, nentries, exclirq) } int -pcibios_return_code(sc, ax, func) - struct pcibios_softc *sc; - u_int16_t ax; - const char *func; +pcibios_return_code(struct pcibios_softc *sc, u_int16_t ax, const char *func) { const char *errstr; int rv = ax >> 8; @@ -492,8 +480,7 @@ pcibios_return_code(sc, ax, func) } void -pcibios_print_exclirq(sc) - struct pcibios_softc *sc; +pcibios_print_exclirq(struct pcibios_softc *sc) { int i; @@ -508,7 +495,7 @@ pcibios_print_exclirq(sc) } void -pcibios_print_pir_table() +pcibios_print_pir_table(void) { int i, j; @@ -527,11 +514,8 @@ pcibios_print_pir_table() } void -pci_device_foreach(sc, pc, maxbus, func) - struct pcibios_softc *sc; - pci_chipset_tag_t pc; - int maxbus; - void (*func)(struct pcibios_softc *, pci_chipset_tag_t, pcitag_t); +pci_device_foreach(struct pcibios_softc *sc, pci_chipset_tag_t pc, int maxbus, + void (*func)(struct pcibios_softc *, pci_chipset_tag_t, pcitag_t)) { const struct pci_quirkdata *qd; int bus, device, function, maxdevs, nfuncs; diff --git a/sys/arch/i386/pci/pcic_pci_machdep.c b/sys/arch/i386/pci/pcic_pci_machdep.c index 1861a31bfc6..e46e8c39313 100644 --- a/sys/arch/i386/pci/pcic_pci_machdep.c +++ b/sys/arch/i386/pci/pcic_pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcic_pci_machdep.c,v 1.3 2002/03/14 01:26:33 millert Exp $ */ +/* $OpenBSD: pcic_pci_machdep.c,v 1.4 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pcic_pci_machdep.c,v 1.1 1998/12/20 17:53:29 nathanw Exp $ */ /* @@ -49,16 +49,13 @@ #include <dev/pci/i82365_pcivar.h> void * -pcic_pci_machdep_intr_est(pc) - pci_chipset_tag_t pc; +pcic_pci_machdep_intr_est(pci_chipset_tag_t pc) { return NULL; } void * -pcic_pci_machdep_pcic_intr_establish(sc, fct) - struct pcic_softc *sc; - int (*fct)(void *); +pcic_pci_machdep_pcic_intr_establish(struct pcic_softc *sc, int (*fct)(void *)) { if (isa_intr_alloc(NULL, PCIC_CSC_INTR_IRQ_VALIDMASK & 0xffff, IST_EDGE, &(sc->irq))) @@ -69,21 +66,15 @@ pcic_pci_machdep_pcic_intr_establish(sc, fct) } void * -pcic_pci_machdep_chip_intr_establish(pch, pf, ipl, fct, arg, xname) - pcmcia_chipset_handle_t pch; - struct pcmcia_function *pf; - int ipl; - int (*fct)(void *); - void *arg; - char *xname; +pcic_pci_machdep_chip_intr_establish(pcmcia_chipset_handle_t pch, + struct pcmcia_function *pf, int ipl, int (*fct)(void *), void *arg, + char *xname) { return (pcic_isa_chip_intr_establish(pch, pf, ipl, fct, arg, xname)); } void -pcic_pci_machdep_chip_intr_disestablish(pch, ih) - pcmcia_chipset_handle_t pch; - void *ih; +pcic_pci_machdep_chip_intr_disestablish(pcmcia_chipset_handle_t pch, void *ih) { pcic_isa_chip_intr_disestablish(pch, ih); } diff --git a/sys/arch/i386/pci/pciide_machdep.c b/sys/arch/i386/pci/pciide_machdep.c index 072d7b6ba1f..6efa9eae90b 100644 --- a/sys/arch/i386/pci/pciide_machdep.c +++ b/sys/arch/i386/pci/pciide_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide_machdep.c,v 1.5 2002/03/14 01:26:33 millert Exp $ */ +/* $OpenBSD: pciide_machdep.c,v 1.6 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: pciide_machdep.c,v 1.2 1999/02/19 18:01:27 mycroft Exp $ */ /* @@ -53,12 +53,8 @@ #include <dev/isa/isavar.h> void * -pciide_machdep_compat_intr_establish(dev, pa, chan, func, arg) - struct device *dev; - struct pci_attach_args *pa; - int chan; - int (*func)(void *); - void *arg; +pciide_machdep_compat_intr_establish(struct device *dev, + struct pci_attach_args *pa, int chan, int (*func)(void *), void *arg) { int irq; void *cookie; diff --git a/sys/arch/i386/pci/piix.c b/sys/arch/i386/pci/piix.c index 7e06b6499b0..e5dfe2dfa28 100644 --- a/sys/arch/i386/pci/piix.c +++ b/sys/arch/i386/pci/piix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: piix.c,v 1.7 2003/03/28 23:12:33 mickey Exp $ */ +/* $OpenBSD: piix.c,v 1.8 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: piix.c,v 1.1 1999/11/17 01:21:20 thorpej Exp $ */ /*- @@ -105,12 +105,8 @@ const struct pciintr_icu piix_pci_icu = { }; int -piix_init(pc, iot, tag, ptagp, phandp) - pci_chipset_tag_t pc; - bus_space_tag_t iot; - pcitag_t tag; - pciintr_icu_tag_t *ptagp; - pciintr_icu_handle_t *phandp; +piix_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag, + pciintr_icu_tag_t *ptagp, pciintr_icu_handle_t *phandp) { struct piix_handle *ph; @@ -137,9 +133,7 @@ piix_init(pc, iot, tag, ptagp, phandp) } int -piix_getclink(v, link, clinkp) - pciintr_icu_handle_t v; - int link, *clinkp; +piix_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { DPRINTF(("PIIX link value 0x%x: ", link)); @@ -169,9 +163,7 @@ piix_getclink(v, link, clinkp) } int -piix_get_intr(v, clink, irqp) - pciintr_icu_handle_t v; - int clink, *irqp; +piix_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) { struct piix_handle *ph = v; int shift, off; @@ -197,9 +189,7 @@ piix_get_intr(v, clink, irqp) } int -piix_set_intr(v, clink, irq) - pciintr_icu_handle_t v; - int clink, irq; +piix_set_intr(pciintr_icu_handle_t v, int clink, int irq) { struct piix_handle *ph = v; int shift, off; @@ -224,9 +214,7 @@ piix_set_intr(v, clink, irq) } int -piix_get_trigger(v, irq, triggerp) - pciintr_icu_handle_t v; - int irq, *triggerp; +piix_get_trigger(pciintr_icu_handle_t v, int irq, int *triggerp) { struct piix_handle *ph = v; int off, bit; @@ -248,9 +236,7 @@ piix_get_trigger(v, irq, triggerp) } int -piix_set_trigger(v, irq, trigger) - pciintr_icu_handle_t v; - int irq, trigger; +piix_set_trigger(pciintr_icu_handle_t v, int irq, int trigger) { struct piix_handle *ph = v; int off, bit; @@ -274,8 +260,7 @@ piix_set_trigger(v, irq, trigger) #ifdef PIIX_DEBUG void -piix_pir_dump(ph) - struct piix_handle *ph; +piix_pir_dump(struct piix_handle *ph) { int i, irq; pcireg_t irqs = pci_conf_read(ph->ph_pc, ph->ph_tag, PIIX_CFG_PIRQ); diff --git a/sys/arch/i386/pci/sis85c503.c b/sys/arch/i386/pci/sis85c503.c index 8e70cb53bb2..d1d46846f8b 100644 --- a/sys/arch/i386/pci/sis85c503.c +++ b/sys/arch/i386/pci/sis85c503.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sis85c503.c,v 1.6 2002/03/14 01:26:33 millert Exp $ */ +/* $OpenBSD: sis85c503.c,v 1.7 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: sis85c503.c,v 1.2 2000/07/18 11:24:09 soda Exp $ */ /*- @@ -95,12 +95,8 @@ const struct pciintr_icu sis85c503_pci_icu = { }; int -sis85c503_init(pc, iot, tag, ptagp, phandp) - pci_chipset_tag_t pc; - bus_space_tag_t iot; - pcitag_t tag; - pciintr_icu_tag_t *ptagp; - pciintr_icu_handle_t *phandp; +sis85c503_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag, + pciintr_icu_tag_t *ptagp, pciintr_icu_handle_t *phandp) { if (piix_init(pc, iot, tag, ptagp, phandp) == 0) { @@ -112,9 +108,7 @@ sis85c503_init(pc, iot, tag, ptagp, phandp) } int -sis85c503_getclink(v, link, clinkp) - pciintr_icu_handle_t v; - int link, *clinkp; +sis85c503_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { /* Pattern 1: simple. */ @@ -134,9 +128,7 @@ sis85c503_getclink(v, link, clinkp) } int -sis85c503_get_intr(v, clink, irqp) - pciintr_icu_handle_t v; - int clink, *irqp; +sis85c503_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) { struct piix_handle *ph = v; pcireg_t reg; @@ -157,9 +149,7 @@ sis85c503_get_intr(v, clink, irqp) } int -sis85c503_set_intr(v, clink, irq) - pciintr_icu_handle_t v; - int clink, irq; +sis85c503_set_intr(pciintr_icu_handle_t v, int clink, int irq) { struct piix_handle *ph = v; int shift; diff --git a/sys/arch/i386/pci/via8231.c b/sys/arch/i386/pci/via8231.c index aa3e529d384..73dd9070944 100644 --- a/sys/arch/i386/pci/via8231.c +++ b/sys/arch/i386/pci/via8231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via8231.c,v 1.6 2005/10/27 16:41:06 mickey Exp $ */ +/* $OpenBSD: via8231.c,v 1.7 2006/09/19 11:06:34 jsg Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -140,12 +140,8 @@ static const struct mask_shft_pair via8231_routing_cnfg[VIA8231_LINK_MAX+1] = { via8231_routing_cnfg[(pirq)].shft)) int -via8231_init(pc, iot, tag, ptagp, phandp) - pci_chipset_tag_t pc; - bus_space_tag_t iot; - pcitag_t tag; - pciintr_icu_tag_t *ptagp; - pciintr_icu_handle_t *phandp; +via8231_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag, + pciintr_icu_tag_t *ptagp, pciintr_icu_handle_t *phandp) { struct via8231_handle *ph; pcireg_t id; @@ -172,9 +168,7 @@ via8231_init(pc, iot, tag, ptagp, phandp) } int -via8231_getclink(v, link, clinkp) - pciintr_icu_handle_t v; - int link, *clinkp; +via8231_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { struct via8231_handle *ph = v; @@ -189,9 +183,7 @@ via8231_getclink(v, link, clinkp) } int -via8231_get_intr(v, clink, irqp) - pciintr_icu_handle_t v; - int clink, *irqp; +via8231_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) { struct via8231_handle *ph = v; int reg, val; @@ -214,9 +206,7 @@ via8231_get_intr(v, clink, irqp) } int -via8231_set_intr(v, clink, irq) - pciintr_icu_handle_t v; - int clink, irq; +via8231_set_intr(pciintr_icu_handle_t v, int clink, int irq) { struct via8231_handle *ph = v; int reg; @@ -243,9 +233,7 @@ via8231_set_intr(v, clink, irq) } int -via8231_get_trigger(v, irq, triggerp) - pciintr_icu_handle_t v; - int irq, *triggerp; +via8231_get_trigger(pciintr_icu_handle_t v, int irq, int *triggerp) { struct via8231_handle *ph = v; int reg, clink, max, pciirq; @@ -270,9 +258,7 @@ via8231_get_trigger(v, irq, triggerp) } int -via8231_set_trigger(v, irq, trigger) - pciintr_icu_handle_t v; - int irq, trigger; +via8231_set_trigger(pciintr_icu_handle_t v, int irq, int trigger) { struct via8231_handle *ph = v; int reg, clink, max, pciirq; @@ -317,9 +303,7 @@ via8231_set_trigger(v, irq, trigger) #ifdef VIA8231_DEBUG static void -via8231_pir_dump(m, ph) - const char* m; - struct via8231_handle *ph; +via8231_pir_dump(const char *m, struct via8231_handle *ph) { int a, b; diff --git a/sys/arch/i386/pci/via82c586.c b/sys/arch/i386/pci/via82c586.c index 6e1137ea241..ce45ddedcf3 100644 --- a/sys/arch/i386/pci/via82c586.c +++ b/sys/arch/i386/pci/via82c586.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via82c586.c,v 1.9 2002/03/14 01:26:33 millert Exp $ */ +/* $OpenBSD: via82c586.c,v 1.10 2006/09/19 11:06:34 jsg Exp $ */ /* $NetBSD: via82c586.c,v 1.2 2000/07/18 11:24:09 soda Exp $ */ /*- @@ -120,12 +120,8 @@ const int vp3_cfg_intr_shift[] = { VP3_CFG_INTR_MASK) int -via82c586_init(pc, iot, tag, ptagp, phandp) - pci_chipset_tag_t pc; - bus_space_tag_t iot; - pcitag_t tag; - pciintr_icu_tag_t *ptagp; - pciintr_icu_handle_t *phandp; +via82c586_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag, + pciintr_icu_tag_t *ptagp, pciintr_icu_handle_t *phandp) { pcireg_t reg; @@ -147,9 +143,7 @@ via82c586_init(pc, iot, tag, ptagp, phandp) } int -via82c586_getclink(v, link, clinkp) - pciintr_icu_handle_t v; - int link, *clinkp; +via82c586_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { if (VP3_LEGAL_LINK(link - 1)) { @@ -161,9 +155,7 @@ via82c586_getclink(v, link, clinkp) } int -via82c586_get_intr(v, clink, irqp) - pciintr_icu_handle_t v; - int clink, *irqp; +via82c586_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) { struct piix_handle *ph = v; pcireg_t reg; @@ -181,9 +173,7 @@ via82c586_get_intr(v, clink, irqp) } int -via82c586_set_intr(v, clink, irq) - pciintr_icu_handle_t v; - int clink, irq; +via82c586_set_intr(pciintr_icu_handle_t v, int clink, int irq) { struct piix_handle *ph = v; int shift, val; @@ -206,9 +196,7 @@ via82c586_set_intr(v, clink, irq) } int -via82c586_get_trigger(v, irq, triggerp) - pciintr_icu_handle_t v; - int irq, *triggerp; +via82c586_get_trigger(pciintr_icu_handle_t v, int irq, int *triggerp) { struct piix_handle *ph = v; int i, error, check_consistency, pciirq, pcitrigger = IST_NONE; @@ -239,9 +227,7 @@ via82c586_get_trigger(v, irq, triggerp) } int -via82c586_set_trigger(v, irq, trigger) - pciintr_icu_handle_t v; - int irq, trigger; +via82c586_set_trigger(pciintr_icu_handle_t v, int irq, int trigger) { struct piix_handle *ph = v; int i, pciirq, shift, testtrig; |