avila_ata.c (194753) | avila_ata.c (227701) |
---|---|
1/*- 2 * Copyright (c) 2006 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/avila_ata.c 194753 2009-06-23 19:29:23Z sam $"); | 31__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/avila_ata.c 227701 2011-11-19 10:11:50Z hselasky $"); |
32 33/* 34 * Compact Flash Support for the Avila Gateworks XScale boards. 35 * The CF slot is operated in "True IDE" mode. Registers are on 36 * the Expansion Bus connected to CS1 and CS2. Interrupts are 37 * tied to GPIO pin 12. No DMA, just PIO. 38 * 39 * The ADI Pronghorn Metro is very similar. It use CS3 and CS4 and --- 214 unchanged lines hidden (view full) --- 254 255 return 0; 256} 257 258static int 259ata_avila_detach(device_t dev) 260{ 261 struct ata_avila_softc *sc = device_get_softc(dev); | 32 33/* 34 * Compact Flash Support for the Avila Gateworks XScale boards. 35 * The CF slot is operated in "True IDE" mode. Registers are on 36 * the Expansion Bus connected to CS1 and CS2. Interrupts are 37 * tied to GPIO pin 12. No DMA, just PIO. 38 * 39 * The ADI Pronghorn Metro is very similar. It use CS3 and CS4 and --- 214 unchanged lines hidden (view full) --- 254 255 return 0; 256} 257 258static int 259ata_avila_detach(device_t dev) 260{ 261 struct ata_avila_softc *sc = device_get_softc(dev); |
262 device_t *children; 263 int nc; | |
264 265 /* XXX quiesce gpio? */ 266 267 /* detach & delete all children */ | 262 263 /* XXX quiesce gpio? */ 264 265 /* detach & delete all children */ |
268 if (device_get_children(dev, &children, &nc) == 0) { 269 if (nc > 0) 270 device_delete_child(dev, children[0]); 271 free(children, M_TEMP); 272 } | 266 device_delete_all_children(dev); |
273 274 bus_teardown_intr(dev, sc->sc_irq, sc->sc_ih); 275 bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid, sc->sc_irq); 276 277 return 0; 278} 279 280static void --- 279 unchanged lines hidden --- | 267 268 bus_teardown_intr(dev, sc->sc_irq, sc->sc_ih); 269 bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid, sc->sc_irq); 270 271 return 0; 272} 273 274static void --- 279 unchanged lines hidden --- |