1*a98b002eSjakemsr /* $OpenBSD: auviavar.h,v 1.12 2010/09/12 02:03:35 jakemsr Exp $ */ 2094ceadfSderaadt /* $NetBSD: auviavar.h,v 1.1 2000/03/31 04:45:29 tsarna Exp $ */ 3094ceadfSderaadt 4094ceadfSderaadt /*- 5094ceadfSderaadt * Copyright (c) 2000 The NetBSD Foundation, Inc. 6094ceadfSderaadt * All rights reserved. 7094ceadfSderaadt * 8094ceadfSderaadt * This code is derived from software contributed to The NetBSD Foundation 9094ceadfSderaadt * by Tyler C. Sarna. 10094ceadfSderaadt * 11094ceadfSderaadt * Redistribution and use in source and binary forms, with or without 12094ceadfSderaadt * modification, are permitted provided that the following conditions 13094ceadfSderaadt * are met: 14094ceadfSderaadt * 1. Redistributions of source code must retain the above copyright 15094ceadfSderaadt * notice, this list of conditions and the following disclaimer. 16094ceadfSderaadt * 2. Redistributions in binary form must reproduce the above copyright 17094ceadfSderaadt * notice, this list of conditions and the following disclaimer in the 18094ceadfSderaadt * documentation and/or other materials provided with the distribution. 19094ceadfSderaadt * 20094ceadfSderaadt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 21094ceadfSderaadt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22094ceadfSderaadt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23094ceadfSderaadt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 24094ceadfSderaadt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25094ceadfSderaadt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26094ceadfSderaadt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27094ceadfSderaadt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28094ceadfSderaadt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29094ceadfSderaadt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30094ceadfSderaadt * POSSIBILITY OF SUCH DAMAGE. 31094ceadfSderaadt */ 32094ceadfSderaadt 33094ceadfSderaadt 34094ceadfSderaadt #ifndef _DEV_PCI_AUVIAVAR_H_ 35094ceadfSderaadt #define _DEV_PCI_AUVIAVAR_H_ 36094ceadfSderaadt 37094ceadfSderaadt struct auvia_softc_chan { 38094ceadfSderaadt void (*sc_intr)(void *); 39094ceadfSderaadt void *sc_arg; 40094ceadfSderaadt 41094ceadfSderaadt struct auvia_dma_op *sc_dma_ops; 42094ceadfSderaadt struct auvia_dma *sc_dma_ops_dma; 43094ceadfSderaadt u_int16_t sc_dma_op_count; 4414bd498bSjakemsr int sc_base; 45094ceadfSderaadt u_int16_t sc_reg; 46094ceadfSderaadt }; 47094ceadfSderaadt 48094ceadfSderaadt struct auvia_softc { 49094ceadfSderaadt struct device sc_dev; 505bb5580dSmickey void *sc_ih; /* interrupt handle */ 51094ceadfSderaadt 52d472e11aSmickey char sc_revision[8]; 53fc093b42Smickey u_int sc_flags; 54fc093b42Smickey #define AUVIA_FLAGS_VT8233 0x0001 55094ceadfSderaadt 56094ceadfSderaadt pci_chipset_tag_t sc_pc; 57094ceadfSderaadt pcitag_t sc_pt; 58094ceadfSderaadt 59094ceadfSderaadt bus_space_tag_t sc_iot; 60094ceadfSderaadt bus_space_handle_t sc_ioh; 61094ceadfSderaadt bus_dma_tag_t sc_dmat; 62094ceadfSderaadt 63094ceadfSderaadt struct ac97_host_if host_if; 64094ceadfSderaadt struct ac97_codec_if *codec_if; 65abf809b6Sjakemsr int bufsize; 665e02d19bSjakemsr int sc_spdif; 67094ceadfSderaadt 68*a98b002eSjakemsr pcireg_t sc_pci_junk; 69*a98b002eSjakemsr 70094ceadfSderaadt struct auvia_dma *sc_dmas; 71094ceadfSderaadt 72094ceadfSderaadt struct auvia_softc_chan sc_play, sc_record; 73094ceadfSderaadt }; 74094ceadfSderaadt 75abf809b6Sjakemsr #define AUVIA_DMALIST_MAX 255 76abf809b6Sjakemsr 77094ceadfSderaadt #endif 78