diff options
| author | Doug Rabson <dfr@FreeBSD.org> | 2000-02-19 09:44:06 +0000 |
|---|---|---|
| committer | Doug Rabson <dfr@FreeBSD.org> | 2000-02-19 09:44:06 +0000 |
| commit | 6874d6295891c78642d490bb49dc326217622348 (patch) | |
| tree | 47f06f3ac693b9db82e76d3bbe62c77de52c0b90 | |
| parent | ff6f5bfb912086314c9c46e6021ea21cd3633a2a (diff) | |
Notes
| -rw-r--r-- | sys/dev/pci/pci.c | 7 | ||||
| -rw-r--r-- | sys/dev/pci/pcivar.h | 1 | ||||
| -rw-r--r-- | sys/pci/pci.c | 7 | ||||
| -rw-r--r-- | sys/pci/pcisupport.c | 49 | ||||
| -rw-r--r-- | sys/pci/pcivar.h | 1 |
5 files changed, 9 insertions, 56 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index ab051a6774cd..e6c060d10042 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1205,10 +1205,9 @@ pci_probe_nomatch(device_t dev, device_t child) dinfo = device_get_ivars(child); cfg = &dinfo->cfg; desc = pci_ata_match(child); - if (!desc) - desc = pci_usb_match(child); - if (!desc) - desc = "unknown card"; + if (!desc) desc = pci_usb_match(child); + if (!desc) desc = pci_vga_match(child); + if (!desc) desc = "unknown card"; device_printf(dev, desc); printf(" (vendor=0x%04x, dev=0x%04x) at %d.%d", cfg->vendor, diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index d066860e99a3..9c345c08d969 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -152,6 +152,7 @@ extern u_int32_t pci_numdevs; const char *pci_ata_match(struct device *dev); const char *pci_usb_match(struct device *dev); +const char *pci_vga_match(struct device *dev); /* low level PCI config register functions provided by pcibus.c */ diff --git a/sys/pci/pci.c b/sys/pci/pci.c index ab051a6774cd..e6c060d10042 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1205,10 +1205,9 @@ pci_probe_nomatch(device_t dev, device_t child) dinfo = device_get_ivars(child); cfg = &dinfo->cfg; desc = pci_ata_match(child); - if (!desc) - desc = pci_usb_match(child); - if (!desc) - desc = "unknown card"; + if (!desc) desc = pci_usb_match(child); + if (!desc) desc = pci_vga_match(child); + if (!desc) desc = "unknown card"; device_printf(dev, desc); printf(" (vendor=0x%04x, dev=0x%04x) at %d.%d", cfg->vendor, diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index 6cb125b93f91..143375f8d099 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -1338,7 +1338,7 @@ DRIVER_MODULE(chip, pci, chip_driver, chip_devclass, 0, 0); **--------------------------------------------------------- */ -static const char* vga_match(device_t dev) +const char* pci_vga_match(device_t dev) { u_int id = pci_get_devid(dev); const char *vendor, *chip, *type; @@ -1819,53 +1819,6 @@ static const char* vga_match(device_t dev) return type; } -static int vga_probe(device_t dev) -{ - const char *desc; - - desc = vga_match(dev); - if (desc) { - device_set_desc(dev, desc); - return -10000; /* Low match priority */ - } - - return ENXIO; -} - -static int vga_attach(device_t dev) -{ -/* -** If the assigned addresses are remapped, -** the console driver has to be informed about the new address. -*/ -#if 0 - vm_offset_t va; - vm_offset_t pa; - int reg; - for (reg = PCI_MAP_REG_START; reg < PCI_MAP_REG_END; reg += 4) - (void) pci_map_mem (tag, reg, &va, &pa); -#endif - return 0; -} - -static device_method_t vga_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, vga_probe), - DEVMETHOD(device_attach, vga_attach), - - { 0, 0 } -}; - -static driver_t vga_driver = { - "vga-pci", - vga_methods, - 1, -}; - -static devclass_t vga_devclass; - -DRIVER_MODULE(vga, pci, vga_driver, vga_devclass, 0, 0); - /*--------------------------------------------------------- ** ** Devices to ignore diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h index d066860e99a3..9c345c08d969 100644 --- a/sys/pci/pcivar.h +++ b/sys/pci/pcivar.h @@ -152,6 +152,7 @@ extern u_int32_t pci_numdevs; const char *pci_ata_match(struct device *dev); const char *pci_usb_match(struct device *dev); +const char *pci_vga_match(struct device *dev); /* low level PCI config register functions provided by pcibus.c */ |
