xref: /netbsd-src/sys/arch/mips/alchemy/dev/auaudio.c (revision cbab9cadce21ae72fac13910001079fff214cc29)
1*cbab9cadSchs /* $NetBSD: auaudio.c,v 1.9 2012/10/27 17:18:01 chs Exp $ */
2ca42af5eSsimonb 
3ca42af5eSsimonb /*
4ca42af5eSsimonb  * Copyright 2002 Wasabi Systems, Inc.
5ca42af5eSsimonb  * All rights reserved.
6ca42af5eSsimonb  *
7ca42af5eSsimonb  * Written by Simon Burge for Wasabi Systems, Inc.
8ca42af5eSsimonb  *
9ca42af5eSsimonb  * Redistribution and use in source and binary forms, with or without
10ca42af5eSsimonb  * modification, are permitted provided that the following conditions
11ca42af5eSsimonb  * are met:
12ca42af5eSsimonb  * 1. Redistributions of source code must retain the above copyright
13ca42af5eSsimonb  *    notice, this list of conditions and the following disclaimer.
14ca42af5eSsimonb  * 2. Redistributions in binary form must reproduce the above copyright
15ca42af5eSsimonb  *    notice, this list of conditions and the following disclaimer in the
16ca42af5eSsimonb  *    documentation and/or other materials provided with the distribution.
17ca42af5eSsimonb  * 3. All advertising materials mentioning features or use of this software
18ca42af5eSsimonb  *    must display the following acknowledgement:
19ca42af5eSsimonb  *      This product includes software developed for the NetBSD Project by
20ca42af5eSsimonb  *      Wasabi Systems, Inc.
21ca42af5eSsimonb  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22ca42af5eSsimonb  *    or promote products derived from this software without specific prior
23ca42af5eSsimonb  *    written permission.
24ca42af5eSsimonb  *
25ca42af5eSsimonb  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26ca42af5eSsimonb  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27ca42af5eSsimonb  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28ca42af5eSsimonb  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
29ca42af5eSsimonb  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30ca42af5eSsimonb  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31ca42af5eSsimonb  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32ca42af5eSsimonb  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33ca42af5eSsimonb  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34ca42af5eSsimonb  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35ca42af5eSsimonb  * POSSIBILITY OF SUCH DAMAGE.
36ca42af5eSsimonb  */
37ca42af5eSsimonb 
384b2744bfSlukem #include <sys/cdefs.h>
39*cbab9cadSchs __KERNEL_RCSID(0, "$NetBSD: auaudio.c,v 1.9 2012/10/27 17:18:01 chs Exp $");
404b2744bfSlukem 
41ca42af5eSsimonb #include <sys/param.h>
42ca42af5eSsimonb #include <sys/systm.h>
43ca42af5eSsimonb #include <sys/device.h>
44ca42af5eSsimonb 
45ca42af5eSsimonb #include <mips/alchemy/include/aureg.h>
46ca42af5eSsimonb #include <mips/alchemy/include/aubusvar.h>
47ca42af5eSsimonb 
48214586a7Smatt static int	auaudio_match(device_t, cfdata_t, void *);
49214586a7Smatt static void	auaudio_attach(device_t, device_t, void *);
50ca42af5eSsimonb 
51*cbab9cadSchs CFATTACH_DECL_NEW(auaudio, 0,
5289bf5a8fSthorpej     auaudio_match, auaudio_attach, NULL, NULL);
53ca42af5eSsimonb 
54ca42af5eSsimonb int
auaudio_match(device_t parent,cfdata_t match,void * aux)55214586a7Smatt auaudio_match(device_t parent, cfdata_t match, void *aux)
56ca42af5eSsimonb {
57ca42af5eSsimonb 	struct aubus_attach_args *aa = aux;
58ca42af5eSsimonb 
59ca42af5eSsimonb 	return (0);	/* XXX unimplemented! */
60d1ad2ac4Sthorpej 	if (strcmp(aa->aa_name, match->cf_name) == 0)
61ca42af5eSsimonb 		return (1);
62ca42af5eSsimonb 
63ca42af5eSsimonb 	return (0);
64ca42af5eSsimonb }
65ca42af5eSsimonb 
66ca42af5eSsimonb void
auaudio_attach(device_t parent,device_t self,void * aux)67214586a7Smatt auaudio_attach(device_t parent, device_t self, void *aux)
68ca42af5eSsimonb {
69ca42af5eSsimonb 
70ca42af5eSsimonb 	printf(": Au1X00 audio\n");	/* \n in clockattach */
71ca42af5eSsimonb }
72