csavar.h revision 53553
153553Stanimura/*- 253553Stanimura * Copyright (c) 1999 Seigo Tanimura 353553Stanimura * All rights reserved. 453553Stanimura * 553553Stanimura * Redistribution and use in source and binary forms, with or without 653553Stanimura * modification, are permitted provided that the following conditions 753553Stanimura * are met: 853553Stanimura * 1. Redistributions of source code must retain the above copyright 953553Stanimura * notice, this list of conditions and the following disclaimer. 1053553Stanimura * 2. Redistributions in binary form must reproduce the above copyright 1153553Stanimura * notice, this list of conditions and the following disclaimer in the 1253553Stanimura * documentation and/or other materials provided with the distribution. 1353553Stanimura * 1453553Stanimura * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1553553Stanimura * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1653553Stanimura * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1753553Stanimura * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1853553Stanimura * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1953553Stanimura * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2053553Stanimura * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2153553Stanimura * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2253553Stanimura * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2353553Stanimura * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2453553Stanimura * SUCH DAMAGE. 2553553Stanimura * 2653553Stanimura * $FreeBSD: head/sys/dev/sound/pci/csavar.h 53553 1999-11-22 06:07:49Z tanimura $ 2753553Stanimura */ 2853553Stanimura 2953553Stanimura#ifndef _CSA_VAR_H 3053553Stanimura#define _CSA_VAR_H 3153553Stanimura 3253553Stanimura/* Resources. */ 3353553Stanimurastruct csa_res { 3453553Stanimura int io_rid; /* io rid */ 3553553Stanimura struct resource *io; /* io */ 3653553Stanimura int mem_rid; /* memory rid */ 3753553Stanimura struct resource *mem; /* memory */ 3853553Stanimura int irq_rid; /* irq rid */ 3953553Stanimura struct resource *irq; /* irq */ 4053553Stanimura}; 4153553Stanimuratypedef struct csa_res csa_res; 4253553Stanimura 4353553Stanimura/* Common functions for csa. */ 4453553Stanimuraint csa_readcodec(csa_res *resp, u_long offset, u_int32_t *data); 4553553Stanimuraint csa_writecodec(csa_res *resp, u_long offset, u_int32_t data); 4653553Stanimura 4753553Stanimurau_int32_t csa_readio(csa_res *resp, u_long offset); 4853553Stanimuravoid csa_writeio(csa_res *resp, u_long offset, u_int32_t data); 4953553Stanimurau_int32_t csa_readmem(csa_res *resp, u_long offset); 5053553Stanimuravoid csa_writemem(csa_res *resp, u_long offset, u_int32_t data); 5153553Stanimura 5253553Stanimura#endif /* _CSA_VAR_H */ 53