diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-13 13:08:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-13 13:08:14 +0000 |
commit | 9b4e4c51a8000c84f505569ceb0a463215aa9198 (patch) | |
tree | 073f2f59cd9c2a2d21bd1d1f4818441014525398 /sys/arch/i386/pci | |
parent | b31af3a1631fc0f90cf1af173a6b47a95453bba5 (diff) |
isa0 at pcib?; netbsd via peter
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r-- | sys/arch/i386/pci/pcib.c | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/sys/arch/i386/pci/pcib.c b/sys/arch/i386/pci/pcib.c index 11524a1a647..16be67102a0 100644 --- a/sys/arch/i386/pci/pcib.c +++ b/sys/arch/i386/pci/pcib.c @@ -42,15 +42,18 @@ #include <sys/device.h> #include <machine/bus.h> +#include <dev/isa/isavar.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> #include <dev/pci/pcidevs.h> +#include "isa.h" + int pcibmatch __P((struct device *, void *, void *)); void pcibattach __P((struct device *, struct device *, void *)); - +void pcib_callback __P((struct device *)); int pcib_print __P((void *, const char *)); struct cfattach pcib_ca = { @@ -61,7 +64,6 @@ struct cfdriver pcib_cd = { NULL, "pcib", DV_DULL }; - int pcibmatch(parent, match, aux) struct device *parent; @@ -102,4 +104,36 @@ pcibattach(parent, self, aux) * Cannot attach isa bus now; must postpone for various reasons */ printf("\n"); + + config_defer(self, pcib_callback); +} + +void +pcib_callback(self) + struct device *self; +{ + struct isabus_attach_args iba; + + /* + * Attach the ISA bus behind this bridge. + */ + memset(&iba, 0, sizeof(iba)); + iba.iba_busname = "isa"; + iba.iba_iot = I386_BUS_SPACE_IO; + iba.iba_memt = I386_BUS_SPACE_MEM; +#if NISA > 0 + iba.iba_dmat = &isa_bus_dma_tag; +#endif + config_found(self, &iba, pcib_print); +} + +int +pcib_print(aux, pnp) + void *aux; + const char *pnp; +{ + /* Only ISAs can attach to pcib's; easy. */ + if (pnp) + printf("isa at %s", pnp); + return (UNCONF); } |