Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ahci/ahci_pci.c
Show First 20 Lines • Show All 734 Lines • ▼ Show 20 Lines | static device_method_t ahci_methods[] = { | ||||
DEVMETHOD(device_detach, ahci_pci_detach), | DEVMETHOD(device_detach, ahci_pci_detach), | ||||
DEVMETHOD(device_suspend, ahci_pci_suspend), | DEVMETHOD(device_suspend, ahci_pci_suspend), | ||||
DEVMETHOD(device_resume, ahci_pci_resume), | DEVMETHOD(device_resume, ahci_pci_resume), | ||||
DEVMETHOD(bus_print_child, ahci_print_child), | DEVMETHOD(bus_print_child, ahci_print_child), | ||||
DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), | DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), | ||||
DEVMETHOD(bus_release_resource, ahci_release_resource), | DEVMETHOD(bus_release_resource, ahci_release_resource), | ||||
DEVMETHOD(bus_setup_intr, ahci_setup_intr), | DEVMETHOD(bus_setup_intr, ahci_setup_intr), | ||||
DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), | DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), | ||||
DEVMETHOD(bus_child_location_str, ahci_child_location_str), | DEVMETHOD(bus_child_location, ahci_child_location), | ||||
DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), | DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
static driver_t ahci_driver = { | static driver_t ahci_driver = { | ||||
"ahci", | "ahci", | ||||
ahci_methods, | ahci_methods, | ||||
sizeof(struct ahci_controller) | sizeof(struct ahci_controller) | ||||
}; | }; | ||||
DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); | DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); | ||||
/* Also matches class / subclass / progid XXX need to add when we have masking support */ | /* Also matches class / subclass / progid XXX need to add when we have masking support */ | ||||
MODULE_PNP_INFO("W32:vendor/device", pci, ahci, ahci_ids, | MODULE_PNP_INFO("W32:vendor/device", pci, ahci, ahci_ids, | ||||
nitems(ahci_ids) - 1); | nitems(ahci_ids) - 1); | ||||
static device_method_t ahci_ata_methods[] = { | static device_method_t ahci_ata_methods[] = { | ||||
DEVMETHOD(device_probe, ahci_ata_probe), | DEVMETHOD(device_probe, ahci_ata_probe), | ||||
DEVMETHOD(device_attach, ahci_pci_attach), | DEVMETHOD(device_attach, ahci_pci_attach), | ||||
DEVMETHOD(device_detach, ahci_pci_detach), | DEVMETHOD(device_detach, ahci_pci_detach), | ||||
DEVMETHOD(device_suspend, ahci_pci_suspend), | DEVMETHOD(device_suspend, ahci_pci_suspend), | ||||
DEVMETHOD(device_resume, ahci_pci_resume), | DEVMETHOD(device_resume, ahci_pci_resume), | ||||
DEVMETHOD(bus_print_child, ahci_print_child), | DEVMETHOD(bus_print_child, ahci_print_child), | ||||
DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), | DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), | ||||
DEVMETHOD(bus_release_resource, ahci_release_resource), | DEVMETHOD(bus_release_resource, ahci_release_resource), | ||||
DEVMETHOD(bus_setup_intr, ahci_setup_intr), | DEVMETHOD(bus_setup_intr, ahci_setup_intr), | ||||
DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), | DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), | ||||
DEVMETHOD(bus_child_location_str, ahci_child_location_str), | DEVMETHOD(bus_child_location, ahci_child_location), | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
static driver_t ahci_ata_driver = { | static driver_t ahci_ata_driver = { | ||||
"ahci", | "ahci", | ||||
ahci_ata_methods, | ahci_ata_methods, | ||||
sizeof(struct ahci_controller) | sizeof(struct ahci_controller) | ||||
}; | }; | ||||
DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); | DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); |