- Retire acpi_pcib_resume(). It is has just been an alias for
bus_generic_resume() since the pci_link(4) driver was added. - Change the ACPI PCI-PCI bridge driver to inherit most of its methods from the generic PCI-PCI bridge driver. In particular, this will now restore PCI config registers for ACPI PCI-PCI bridges. Tested by: Oleg Sharoyko osharoiko of gmail
This commit is contained in:
parent
6ece019fcf
commit
7d23a9b3d5
@ -171,13 +171,6 @@ acpi_pcib_attach(device_t dev, ACPI_BUFFER *prt, int busno)
|
||||
return_VALUE (bus_generic_attach(dev));
|
||||
}
|
||||
|
||||
int
|
||||
acpi_pcib_resume(device_t dev)
|
||||
{
|
||||
|
||||
return (bus_generic_resume(dev));
|
||||
}
|
||||
|
||||
static void
|
||||
prt_lookup_device(ACPI_PCI_ROUTING_TABLE *entry, void *arg)
|
||||
{
|
||||
|
@ -65,7 +65,6 @@ struct acpi_hpcib_softc {
|
||||
|
||||
static int acpi_pcib_acpi_probe(device_t bus);
|
||||
static int acpi_pcib_acpi_attach(device_t bus);
|
||||
static int acpi_pcib_acpi_resume(device_t bus);
|
||||
static int acpi_pcib_read_ivar(device_t dev, device_t child,
|
||||
int which, uintptr_t *result);
|
||||
static int acpi_pcib_write_ivar(device_t dev, device_t child,
|
||||
@ -94,7 +93,7 @@ static device_method_t acpi_pcib_acpi_methods[] = {
|
||||
DEVMETHOD(device_attach, acpi_pcib_acpi_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, acpi_pcib_acpi_resume),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, bus_generic_print_child),
|
||||
@ -257,13 +256,6 @@ acpi_pcib_acpi_attach(device_t dev)
|
||||
return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus));
|
||||
}
|
||||
|
||||
static int
|
||||
acpi_pcib_acpi_resume(device_t dev)
|
||||
{
|
||||
|
||||
return (acpi_pcib_resume(dev));
|
||||
}
|
||||
|
||||
/*
|
||||
* Support for standard PCI bridge ivars.
|
||||
*/
|
||||
|
@ -65,7 +65,6 @@ struct acpi_pcib_lookup_info {
|
||||
|
||||
static int acpi_pcib_pci_probe(device_t bus);
|
||||
static int acpi_pcib_pci_attach(device_t bus);
|
||||
static int acpi_pcib_pci_resume(device_t bus);
|
||||
static int acpi_pcib_read_ivar(device_t dev, device_t child,
|
||||
int which, uintptr_t *result);
|
||||
static int acpi_pcib_pci_route_interrupt(device_t pcib,
|
||||
@ -75,39 +74,20 @@ static device_method_t acpi_pcib_pci_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, acpi_pcib_pci_probe),
|
||||
DEVMETHOD(device_attach, acpi_pcib_pci_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, acpi_pcib_pci_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, bus_generic_print_child),
|
||||
DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar),
|
||||
DEVMETHOD(bus_write_ivar, pcib_write_ivar),
|
||||
DEVMETHOD(bus_alloc_resource, pcib_alloc_resource),
|
||||
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
|
||||
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
|
||||
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
|
||||
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
|
||||
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
|
||||
|
||||
/* pcib interface */
|
||||
DEVMETHOD(pcib_maxslots, pcib_maxslots),
|
||||
DEVMETHOD(pcib_read_config, pcib_read_config),
|
||||
DEVMETHOD(pcib_write_config, pcib_write_config),
|
||||
DEVMETHOD(pcib_route_interrupt, acpi_pcib_pci_route_interrupt),
|
||||
DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi),
|
||||
DEVMETHOD(pcib_release_msi, pcib_release_msi),
|
||||
DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix),
|
||||
DEVMETHOD(pcib_release_msix, pcib_release_msix),
|
||||
DEVMETHOD(pcib_map_msi, pcib_map_msi),
|
||||
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
|
||||
sizeof(struct acpi_pcib_softc));
|
||||
DEFINE_CLASS_1(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
|
||||
sizeof(struct acpi_pcib_softc), pcib_driver);
|
||||
DRIVER_MODULE(acpi_pcib, pci, acpi_pcib_pci_driver, pcib_devclass, 0, 0);
|
||||
MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1);
|
||||
|
||||
@ -141,13 +121,6 @@ acpi_pcib_pci_attach(device_t dev)
|
||||
return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_pcibsc.secbus));
|
||||
}
|
||||
|
||||
static int
|
||||
acpi_pcib_pci_resume(device_t dev)
|
||||
{
|
||||
|
||||
return (acpi_pcib_resume(dev));
|
||||
}
|
||||
|
||||
static int
|
||||
acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
|
||||
{
|
||||
|
@ -31,13 +31,14 @@
|
||||
#define _ACPI_PCIBVAR_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
void acpi_pci_link_add_reference(device_t dev, int index, device_t pcib,
|
||||
int slot, int pin);
|
||||
int acpi_pci_link_route_interrupt(device_t dev, int index);
|
||||
int acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno);
|
||||
int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
|
||||
ACPI_BUFFER *prtbuf);
|
||||
int acpi_pcib_resume(device_t dev);
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_ACPI_PCIBVAR_H_ */
|
||||
|
@ -37,6 +37,7 @@
|
||||
* Export portions of generic PCI:PCI bridge support so that it can be
|
||||
* used by subclasses.
|
||||
*/
|
||||
DECLARE_CLASS(pcib_driver);
|
||||
|
||||
/*
|
||||
* Bridge-specific data.
|
||||
|
Loading…
Reference in New Issue
Block a user