ata_iobus.c (193935) | ata_iobus.c (200171) |
---|---|
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. --- 10 unchanged lines hidden (view full) --- 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 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. --- 10 unchanged lines hidden (view full) --- 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/powerpc/psim/ata_iobus.c 193935 2009-06-10 17:40:18Z imp $ | 27 * $FreeBSD: head/sys/powerpc/psim/ata_iobus.c 200171 2009-12-06 00:10:13Z mav $ |
28 */ 29 30/* 31 * PSIM local bus ATA controller 32 */ 33#include "opt_ata.h" 34#include <sys/param.h> 35#include <sys/systm.h> --- 169 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); | 28 */ 29 30/* 31 * PSIM local bus ATA controller 32 */ 33#include "opt_ata.h" 34#include <sys/param.h> 35#include <sys/systm.h> --- 169 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} |