xref: /netbsd-src/sys/dev/ic/pl041var.h (revision e622eac459adf11c2e710d7a4de0f05510bbbe61)
1*e622eac4Sisaki /* $NetBSD: pl041var.h,v 1.2 2019/05/08 13:40:18 isaki Exp $ */
2fa4e708eSjmcneill 
3fa4e708eSjmcneill /*-
4fa4e708eSjmcneill  * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca>
5fa4e708eSjmcneill  * All rights reserved.
6fa4e708eSjmcneill  *
7fa4e708eSjmcneill  * Redistribution and use in source and binary forms, with or without
8fa4e708eSjmcneill  * modification, are permitted provided that the following conditions
9fa4e708eSjmcneill  * are met:
10fa4e708eSjmcneill  * 1. Redistributions of source code must retain the above copyright
11fa4e708eSjmcneill  *    notice, this list of conditions and the following disclaimer.
12fa4e708eSjmcneill  * 2. Redistributions in binary form must reproduce the above copyright
13fa4e708eSjmcneill  *    notice, this list of conditions and the following disclaimer in the
14fa4e708eSjmcneill  *    documentation and/or other materials provided with the distribution.
15fa4e708eSjmcneill  *
16fa4e708eSjmcneill  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17fa4e708eSjmcneill  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18fa4e708eSjmcneill  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19fa4e708eSjmcneill  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20fa4e708eSjmcneill  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21fa4e708eSjmcneill  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22fa4e708eSjmcneill  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23fa4e708eSjmcneill  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24fa4e708eSjmcneill  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25fa4e708eSjmcneill  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26fa4e708eSjmcneill  * SUCH DAMAGE.
27fa4e708eSjmcneill  */
28fa4e708eSjmcneill 
29fa4e708eSjmcneill #ifndef _PL041VAR_H
30fa4e708eSjmcneill #define _PL041VAR_H
31fa4e708eSjmcneill 
32fa4e708eSjmcneill #include <dev/ic/ac97var.h>
33fa4e708eSjmcneill 
34fa4e708eSjmcneill struct aaci_softc {
35fa4e708eSjmcneill 	device_t		sc_dev;
36fa4e708eSjmcneill 	bus_space_tag_t		sc_bst;
37fa4e708eSjmcneill 	bus_space_handle_t	sc_bsh;
38fa4e708eSjmcneill 	kmutex_t		sc_lock;
39fa4e708eSjmcneill 	kmutex_t		sc_intr_lock;
40fa4e708eSjmcneill 	struct ac97_host_if	sc_ac97_host;
41fa4e708eSjmcneill 	struct ac97_codec_if	*sc_ac97_codec;
42fa4e708eSjmcneill 	device_t		sc_audiodev;
43fa4e708eSjmcneill 
44fa4e708eSjmcneill 	void			(*sc_pint)(void *);
45fa4e708eSjmcneill 	void			*sc_pintarg;
46fa4e708eSjmcneill 	uint32_t		*sc_pstart;
47fa4e708eSjmcneill 	uint32_t		*sc_pend;
48fa4e708eSjmcneill 	int			sc_pblksize;
49fa4e708eSjmcneill 
50fa4e708eSjmcneill 	uint32_t		*sc_pcur;
51fa4e708eSjmcneill 	int			sc_pblkresid;
52fa4e708eSjmcneill };
53fa4e708eSjmcneill 
54fa4e708eSjmcneill void	aaci_attach(struct aaci_softc *);
55fa4e708eSjmcneill int	aaci_intr(void *);
56fa4e708eSjmcneill 
57fa4e708eSjmcneill #endif /* !_PL041VAR_H */
58