1261639Sbr/*- 2261639Sbr * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3261639Sbr * All rights reserved. 4261639Sbr * 5261639Sbr * Redistribution and use in source and binary forms, with or without 6261639Sbr * modification, are permitted provided that the following conditions 7261639Sbr * are met: 8261639Sbr * 1. Redistributions of source code must retain the above copyright 9261639Sbr * notice, this list of conditions and the following disclaimer. 10261639Sbr * 2. Redistributions in binary form must reproduce the above copyright 11261639Sbr * notice, this list of conditions and the following disclaimer in the 12261639Sbr * documentation and/or other materials provided with the distribution. 13261639Sbr * 14261639Sbr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15261639Sbr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16261639Sbr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17261639Sbr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18261639Sbr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19261639Sbr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20261639Sbr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21261639Sbr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22261639Sbr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23261639Sbr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24261639Sbr * SUCH DAMAGE. 25261639Sbr * 26261639Sbr * $FreeBSD: releng/10.2/sys/arm/freescale/vybrid/vf_dmamux.h 266170 2014-05-15 18:38:19Z ian $ 27261639Sbr */ 28261639Sbr 29261639Sbrint dmamux_configure(int mux, int source, int channel, int enable); 30261639Sbr 31261639Sbrenum mux_num { 32261639Sbr MUX0, 33261639Sbr MUX1, 34261639Sbr MUX2, 35261639Sbr MUX3, 36261639Sbr}; 37261639Sbr 38261639Sbrenum mux_grp { 39261639Sbr MUXGRP0, /* MUX[0,3] */ 40261639Sbr MUXGRP1, /* MUX[1,2] */ 41261639Sbr}; 42261639Sbr 43261639Sbr/* DMAMUX */ 44261639Sbr#define MUX_READ1(_sc, _mux, _reg) \ 45261639Sbr bus_space_read_1(_sc->bst[_mux], _sc->bsh[_mux], _reg) 46261639Sbr 47261639Sbr#define MUX_WRITE1(_sc, _mux, _reg, _val) \ 48261639Sbr bus_space_write_1(_sc->bst[_mux], _sc->bsh[_mux], _reg, _val) 49