bcm2835_mbox.c (261410) | bcm2835_mbox.c (261884) |
---|---|
1/*- 2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c 261410 2014-02-02 19:17:28Z ian $"); | 28__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c 261884 2014-02-14 11:18:15Z brueffer $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/malloc.h> 36#include <sys/rman.h> --- 128 unchanged lines hidden (view full) --- 165 /* Setup and enable the timer */ 166 if (bus_setup_intr(dev, sc->irq_res, INTR_MPSAFE | INTR_TYPE_MISC, 167 NULL, bcm_mbox_intr, sc, &sc->intr_hl) != 0) { 168 bus_release_resource(dev, SYS_RES_IRQ, rid, sc->irq_res); 169 device_printf(dev, "Unable to setup the clock irq handler.\n"); 170 return (ENXIO); 171 } 172 | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/malloc.h> 36#include <sys/rman.h> --- 128 unchanged lines hidden (view full) --- 165 /* Setup and enable the timer */ 166 if (bus_setup_intr(dev, sc->irq_res, INTR_MPSAFE | INTR_TYPE_MISC, 167 NULL, bcm_mbox_intr, sc, &sc->intr_hl) != 0) { 168 bus_release_resource(dev, SYS_RES_IRQ, rid, sc->irq_res); 169 device_printf(dev, "Unable to setup the clock irq handler.\n"); 170 return (ENXIO); 171 } 172 |
173 mtx_init(&sc->lock, "vcio mbox", MTX_DEF, 0); | 173 mtx_init(&sc->lock, "vcio mbox", NULL, MTX_DEF); |
174 for (i = 0; i < BCM2835_MBOX_CHANS; i++) { 175 sc->valid[0] = 0; 176 sc->msg[0] = 0; 177 } 178 179 /* Read all pending messages */ 180 bcm_mbox_intr(sc); 181 --- 70 unchanged lines hidden --- | 174 for (i = 0; i < BCM2835_MBOX_CHANS; i++) { 175 sc->valid[0] = 0; 176 sc->msg[0] = 0; 177 } 178 179 /* Read all pending messages */ 180 bcm_mbox_intr(sc); 181 --- 70 unchanged lines hidden --- |