fhc.c (200874) | fhc.c (206018) |
---|---|
1/*- 2 * Copyright (c) 2003 Jake Burkholder. 3 * Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, 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 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Jake Burkholder. 3 * Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, 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 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/sparc64/fhc/fhc.c 200874 2009-12-22 21:02:46Z marius $"); | 29__FBSDID("$FreeBSD: head/sys/sparc64/fhc/fhc.c 206018 2010-03-31 22:19:00Z marius $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/bus.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> 37#include <sys/pcpu.h> --- 165 unchanged lines hidden (view full) --- 203 device_printf(dev, "board %d, ", board); 204 if (OF_getprop_alloc(node, "board-model", 1, (void **)&name) != -1) { 205 printf("model %s\n", name); 206 free(name, M_OFWPROP); 207 } else 208 printf("model unknown\n"); 209 210 for (i = FHC_FANFAIL; i <= FHC_TOD; i++) { | 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/bus.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> 37#include <sys/pcpu.h> --- 165 unchanged lines hidden (view full) --- 203 device_printf(dev, "board %d, ", board); 204 if (OF_getprop_alloc(node, "board-model", 1, (void **)&name) != -1) { 205 printf("model %s\n", name); 206 free(name, M_OFWPROP); 207 } else 208 printf("model unknown\n"); 209 210 for (i = FHC_FANFAIL; i <= FHC_TOD; i++) { |
211 bus_write_4(sc->sc_memres[i], FHC_ICLR, 0x0); | 211 bus_write_4(sc->sc_memres[i], FHC_ICLR, INTCLR_IDLE); |
212 (void)bus_read_4(sc->sc_memres[i], FHC_ICLR); 213 } 214 215 sc->sc_ign = board << 1; 216 bus_write_4(sc->sc_memres[FHC_IGN], 0x0, sc->sc_ign); 217 sc->sc_ign = bus_read_4(sc->sc_memres[FHC_IGN], 0x0); 218 219 ctrl = bus_read_4(sc->sc_memres[FHC_INTERNAL], FHC_CTRL); --- 166 unchanged lines hidden (view full) --- 386} 387 388static void 389fhc_intr_clear(void *arg) 390{ 391 struct intr_vector *iv = arg; 392 struct fhc_icarg *fica = iv->iv_icarg; 393 | 212 (void)bus_read_4(sc->sc_memres[i], FHC_ICLR); 213 } 214 215 sc->sc_ign = board << 1; 216 bus_write_4(sc->sc_memres[FHC_IGN], 0x0, sc->sc_ign); 217 sc->sc_ign = bus_read_4(sc->sc_memres[FHC_IGN], 0x0); 218 219 ctrl = bus_read_4(sc->sc_memres[FHC_INTERNAL], FHC_CTRL); --- 166 unchanged lines hidden (view full) --- 386} 387 388static void 389fhc_intr_clear(void *arg) 390{ 391 struct intr_vector *iv = arg; 392 struct fhc_icarg *fica = iv->iv_icarg; 393 |
394 bus_write_4(fica->fica_memres, FHC_ICLR, 0x0); | 394 bus_write_4(fica->fica_memres, FHC_ICLR, INTCLR_IDLE); |
395 (void)bus_read_4(fica->fica_memres, FHC_ICLR); 396} 397 398static int 399fhc_setup_intr(device_t bus, device_t child, struct resource *r, int flags, 400 driver_filter_t *filt, driver_intr_t *func, void *arg, void **cookiep) 401{ 402 struct fhc_softc *sc; --- 122 unchanged lines hidden --- | 395 (void)bus_read_4(fica->fica_memres, FHC_ICLR); 396} 397 398static int 399fhc_setup_intr(device_t bus, device_t child, struct resource *r, int flags, 400 driver_filter_t *filt, driver_intr_t *func, void *arg, void **cookiep) 401{ 402 struct fhc_softc *sc; --- 122 unchanged lines hidden --- |