ata_iobus.c (10b3b54548f2290bbe8d8f88c59c28d12b7a635d) | ata_iobus.c (066f913a94b134b6d5e32b6af88f297c7da9c031) |
---|---|
1/*- 2 * Copyright 2002 by Peter Grehan. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 196 unchanged lines hidden (view full) --- 205 206 207/* 208 * Define the actual ATA device. This is a sub-bus to the ata-iobus layer 209 * to allow the higher layer bus to massage the resource allocation. 210 */ 211 212static int ata_iobus_sub_probe(device_t dev); | 1/*- 2 * Copyright 2002 by Peter Grehan. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 196 unchanged lines hidden (view full) --- 205 206 207/* 208 * Define the actual ATA device. This is a sub-bus to the ata-iobus layer 209 * to allow the higher layer bus to massage the resource allocation. 210 */ 211 212static int ata_iobus_sub_probe(device_t dev); |
213static void ata_iobus_sub_setmode(device_t parent, device_t dev); | 213static int ata_iobus_sub_setmode(device_t dev, int target, int mode); |
214 215static device_method_t ata_iobus_sub_methods[] = { 216 /* Device interface */ 217 DEVMETHOD(device_probe, ata_iobus_sub_probe), 218 DEVMETHOD(device_attach, ata_attach), 219 DEVMETHOD(device_detach, ata_detach), 220 DEVMETHOD(device_resume, ata_resume), 221 --- 18 unchanged lines hidden (view full) --- 240 /* Only a single unit per controller thus far */ 241 ch->unit = 0; 242 ch->flags = (ATA_USE_16BIT|ATA_NO_SLAVE); 243 ata_generic_hw(dev); 244 245 return ata_probe(dev); 246} 247 | 214 215static device_method_t ata_iobus_sub_methods[] = { 216 /* Device interface */ 217 DEVMETHOD(device_probe, ata_iobus_sub_probe), 218 DEVMETHOD(device_attach, ata_attach), 219 DEVMETHOD(device_detach, ata_detach), 220 DEVMETHOD(device_resume, ata_resume), 221 --- 18 unchanged lines hidden (view full) --- 240 /* Only a single unit per controller thus far */ 241 ch->unit = 0; 242 ch->flags = (ATA_USE_16BIT|ATA_NO_SLAVE); 243 ata_generic_hw(dev); 244 245 return ata_probe(dev); 246} 247 |
248static void 249ata_iobus_sub_setmode(device_t parent, device_t dev) | 248static int 249ata_iobus_sub_setmode(device_t parent, int target, int mode); |
250{ | 250{ |
251 struct ata_device *atadev = device_get_softc(dev); 252 | |
253 /* Only ever PIO mode here... */ | 251 /* Only ever PIO mode here... */ |
254 atadev->mode = ATA_PIO; | 252 return (ATA_PIO); |
255} | 253} |