Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/psim/ata_iobus.c
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
| * the ATA device can be attached to | * the ATA device can be attached to | ||||
| */ | */ | ||||
| static int ata_iobus_attach(device_t dev); | static int ata_iobus_attach(device_t dev); | ||||
| static int ata_iobus_probe(device_t dev); | static int ata_iobus_probe(device_t dev); | ||||
| static int ata_iobus_print_child(device_t dev, device_t child); | static int ata_iobus_print_child(device_t dev, device_t child); | ||||
| struct resource *ata_iobus_alloc_resource(device_t, device_t, int, int *, | struct resource *ata_iobus_alloc_resource(device_t, device_t, int, int *, | ||||
| rman_res_t, rman_res_t, rman_res_t, | rman_res_t, rman_res_t, rman_res_t, | ||||
| u_int); | u_int); | ||||
| static int ata_iobus_release_resource(device_t, device_t, int, int, | static int ata_iobus_release_resource(device_t, device_t, struct resource *); | ||||
| struct resource *); | |||||
| static device_method_t ata_iobus_methods[] = { | static device_method_t ata_iobus_methods[] = { | ||||
| /* Device interface */ | /* Device interface */ | ||||
| DEVMETHOD(device_probe, ata_iobus_probe), | DEVMETHOD(device_probe, ata_iobus_probe), | ||||
| DEVMETHOD(device_attach, ata_iobus_attach), | DEVMETHOD(device_attach, ata_iobus_attach), | ||||
| DEVMETHOD(device_shutdown, bus_generic_shutdown), | DEVMETHOD(device_shutdown, bus_generic_shutdown), | ||||
| DEVMETHOD(device_suspend, bus_generic_suspend), | DEVMETHOD(device_suspend, bus_generic_suspend), | ||||
| DEVMETHOD(device_resume, bus_generic_resume), | DEVMETHOD(device_resume, bus_generic_resume), | ||||
| ▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, | ||||
| SYS_RES_IRQ, rid, 0, ~0, 1, flags)); | SYS_RES_IRQ, rid, 0, ~0, 1, flags)); | ||||
| } else { | } else { | ||||
| return (NULL); | return (NULL); | ||||
| } | } | ||||
| } | } | ||||
| static int | static int | ||||
| ata_iobus_release_resource(device_t dev, device_t child, int type, int rid, | ata_iobus_release_resource(device_t dev, device_t child, struct resource *r) | ||||
| struct resource *r) | |||||
| { | { | ||||
| /* no hotplug... */ | /* no hotplug... */ | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| /* | /* | ||||
| * Define the actual ATA device. This is a sub-bus to the ata-iobus layer | * Define the actual ATA device. This is a sub-bus to the ata-iobus layer | ||||
| * to allow the higher layer bus to massage the resource allocation. | * to allow the higher layer bus to massage the resource allocation. | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||