bcm2835_dma.c (247855) | bcm2835_dma.c (250131) |
---|---|
1/* 2 * Copyright (c) 2013 Daisuke Aoyama <aoyama@peach.ne.jp> 3 * Copyright (c) 2013 Oleksandr Tymoshenko <gonzo@bluezbox.com> 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 --- 12 unchanged lines hidden (view full) --- 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 28#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2013 Daisuke Aoyama <aoyama@peach.ne.jp> 3 * Copyright (c) 2013 Oleksandr Tymoshenko <gonzo@bluezbox.com> 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 --- 12 unchanged lines hidden (view full) --- 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 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_dma.c 247855 2013-03-05 20:00:11Z gonzo $"); | 29__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_dma.c 250131 2013-05-01 04:37:34Z eadler $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/bus.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/malloc.h> 37#include <sys/module.h> --- 155 unchanged lines hidden (view full) --- 193 } 194 195 /* clear control blocks */ 196 bus_write_4(sc->sc_mem, BCM_DMA_CBADDR(ch), 0); 197 bus_write_4(sc->sc_mem, BCM_DMA_CBNEXT(ch), 0); 198 199 /* Reset control block */ 200 cb = sc->sc_dma_ch[ch].cb; | 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/bus.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/malloc.h> 37#include <sys/module.h> --- 155 unchanged lines hidden (view full) --- 193 } 194 195 /* clear control blocks */ 196 bus_write_4(sc->sc_mem, BCM_DMA_CBADDR(ch), 0); 197 bus_write_4(sc->sc_mem, BCM_DMA_CBNEXT(ch), 0); 198 199 /* Reset control block */ 200 cb = sc->sc_dma_ch[ch].cb; |
201 bzero(cb, sizeof(cb)); | 201 bzero(cb, sizeof(*cb)); |
202 cb->info = INFO_WAIT_RESP; 203} 204 205static int 206bcm_dma_init(device_t dev) 207{ 208 struct bcm_dma_softc *sc = device_get_softc(dev); 209 uint32_t mask; --- 520 unchanged lines hidden --- | 202 cb->info = INFO_WAIT_RESP; 203} 204 205static int 206bcm_dma_init(device_t dev) 207{ 208 struct bcm_dma_softc *sc = device_get_softc(dev); 209 uint32_t mask; --- 520 unchanged lines hidden --- |