Lines Matching refs:dev
28 __FBSDID("$FreeBSD: releng/11.0/sys/dev/ata/ata-isa.c 296137 2016-02-27 03:38:01Z jhibbits $");
45 #include <dev/ata/ata-all.h>
60 ata_isa_probe(device_t dev)
67 if (ISA_PNP_PROBE(device_get_parent(dev), dev, ata_ids) == ENXIO)
72 if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
77 if (bus_get_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, &tmp, &tmp)) {
78 bus_set_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID,
84 if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
86 bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io);
91 bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, ctlio);
92 bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io);
94 device_set_desc(dev, "ATA channel");
95 return (ata_probe(dev));
99 ata_isa_attach(device_t dev)
101 struct ata_channel *ch = device_get_softc(dev);
112 if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
117 if (bus_get_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, &tmp, &tmp)) {
118 bus_set_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID,
124 if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
126 bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io);
138 ata_default_registers(dev);
143 ata_generic_hw(dev);
144 return ata_attach(dev);
148 ata_isa_detach(device_t dev)
150 struct ata_channel *ch = device_get_softc(dev);
157 error = ata_detach(dev);
159 bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID,
161 bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID,
167 ata_isa_suspend(device_t dev)
169 struct ata_channel *ch = device_get_softc(dev);
174 return ata_suspend(dev);
178 ata_isa_resume(device_t dev)
180 struct ata_channel *ch = device_get_softc(dev);
185 return ata_resume(dev);