xref: /netbsd-src/sys/dev/ic/cs4215var.h (revision 729313d52c0bd93f91226cb9bb84854b7fdb7a72)
1*729313d5Sjmcneill /*	$NetBSD: cs4215var.h,v 1.4 2008/05/05 00:21:47 jmcneill Exp $	*/
271b0921aSmacallan 
371b0921aSmacallan /*
4749b17a7Smacallan  * Copyright (c) 2001 Jared D. McNeill <jmcneill@NetBSD.org>
571b0921aSmacallan  * All rights reserved.
671b0921aSmacallan  *
771b0921aSmacallan  * Redistribution and use in source and binary forms, with or without
871b0921aSmacallan  * modification, are permitted provided that the following conditions
971b0921aSmacallan  * are met:
1071b0921aSmacallan  * 1. Redistributions of source code must retain the above copyright
1171b0921aSmacallan  *    notice, this list of conditions and the following disclaimer.
1271b0921aSmacallan  * 2. Redistributions in binary form must reproduce the above copyright
1371b0921aSmacallan  *    notice, this list of conditions and the following disclaimer in the
1471b0921aSmacallan  *    documentation and/or other materials provided with the distribution.
1571b0921aSmacallan  *
1671b0921aSmacallan  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1771b0921aSmacallan  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1871b0921aSmacallan  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1971b0921aSmacallan  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2071b0921aSmacallan  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2171b0921aSmacallan  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2271b0921aSmacallan  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2371b0921aSmacallan  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2471b0921aSmacallan  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2571b0921aSmacallan  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2671b0921aSmacallan  * SUCH DAMAGE.
2771b0921aSmacallan  *
2871b0921aSmacallan  */
2971b0921aSmacallan 
3071b0921aSmacallan #include <sys/types.h>
3171b0921aSmacallan 
3271b0921aSmacallan struct cs4215_state {
33749b17a7Smacallan 	union {
34749b17a7Smacallan 		volatile uint32_t	ldata;
35749b17a7Smacallan 		volatile uint8_t	bdata[4];
36749b17a7Smacallan 	} d;
37749b17a7Smacallan 	union {
38749b17a7Smacallan 		volatile uint32_t	lcontrol;
39749b17a7Smacallan 		volatile uint8_t	bcontrol[4];
40749b17a7Smacallan 	} c;
41749b17a7Smacallan 	volatile uint8_t	onboard, offset;
42749b17a7Smacallan 	volatile uint32_t	status;
43749b17a7Smacallan 	volatile uint32_t	version;
4471b0921aSmacallan };
45