summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/vga_pci.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 5e37a8ad7b1..ed352c5355a 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_pci.c,v 1.14 2002/07/15 13:23:48 mickey Exp $ */
+/* $OpenBSD: vga_pci.c,v 1.15 2003/10/31 04:10:05 drahn Exp $ */
/* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */
/*-
@@ -176,8 +176,13 @@ vga_pci_match(parent, match, aux)
/*
* If we might match, make sure that the card actually looks OK.
*/
+#ifdef ISA_SPACE_NOT_ACCESSABLE_WITH_PCI_IOT
+ if (!vga_common_probe(MD_ISA_IOT, MD_ISA_MEMT))
+ return (0);
+#else
if (!vga_common_probe(pa->pa_iot, pa->pa_memt))
return (0);
+#endif
return (1);
}
@@ -187,7 +192,9 @@ vga_pci_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
+#ifndef ISA_SPACE_NOT_ACCESSABLE_WITH_PCI_IOT
struct pci_attach_args *pa = aux;
+#endif
#ifdef PCIAGP
struct vga_pci_softc *sc = (struct vga_pci_softc *)self;
const struct agp_product *ap;
@@ -252,8 +259,13 @@ vga_pci_attach(parent, self, aux)
}
#endif
printf("\n");
+#ifdef ISA_SPACE_NOT_ACCESSABLE_WITH_PCI_IOT
+ vga_extended_attach(self, MD_ISA_IOT, ppc_isa_membus_space,
+ WSDISPLAY_TYPE_PCIVGA, vga_pci_mmap);
+#else
vga_common_attach(self, pa->pa_iot, pa->pa_memt,
WSDISPLAY_TYPE_PCIVGA);
+#endif
}
paddr_t
@@ -273,6 +285,10 @@ vga_pci_mmap(void *v, off_t off, int prot)
#endif
}
#endif
+#ifdef __pegasos__
+ /* XXX */
+ return off;
+#endif
return -1;
}