xref: /netbsd-src/sys/arch/evbmips/alchemy/mach_intr.c (revision 7433666e375b3ac4cc764df5a6726be98bc1cdd5)
1*7433666eSthorpej /*	$NetBSD: mach_intr.c,v 1.8 2023/12/20 14:12:25 thorpej Exp $	*/
2d240b425Sgdamore 
3d240b425Sgdamore /*-
4d240b425Sgdamore  * Copyright (c) 2001 The NetBSD Foundation, Inc.
5d240b425Sgdamore  * All rights reserved.
6d240b425Sgdamore  *
7d240b425Sgdamore  * This code is derived from software contributed to The NetBSD Foundation
8d240b425Sgdamore  * by Jason R. Thorpe.
9d240b425Sgdamore  *
10d240b425Sgdamore  * Redistribution and use in source and binary forms, with or without
11d240b425Sgdamore  * modification, are permitted provided that the following conditions
12d240b425Sgdamore  * are met:
13d240b425Sgdamore  * 1. Redistributions of source code must retain the above copyright
14d240b425Sgdamore  *    notice, this list of conditions and the following disclaimer.
15d240b425Sgdamore  * 2. Redistributions in binary form must reproduce the above copyright
16d240b425Sgdamore  *    notice, this list of conditions and the following disclaimer in the
17d240b425Sgdamore  *    documentation and/or other materials provided with the distribution.
18d240b425Sgdamore  *
19d240b425Sgdamore  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20d240b425Sgdamore  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21d240b425Sgdamore  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22d240b425Sgdamore  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23d240b425Sgdamore  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24d240b425Sgdamore  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25d240b425Sgdamore  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26d240b425Sgdamore  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27d240b425Sgdamore  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28d240b425Sgdamore  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29d240b425Sgdamore  * POSSIBILITY OF SUCH DAMAGE.
30d240b425Sgdamore  */
31d240b425Sgdamore 
32d240b425Sgdamore /*
33d240b425Sgdamore  * Platform-specific interrupt support for the Alchemy parts.
34d240b425Sgdamore  *
35d240b425Sgdamore  * These boards just use the interrupt controller built into the
36d240b425Sgdamore  * Alchemy processors, so we just provide evbmips-compliant wrapper
37d240b425Sgdamore  * routines.
38d240b425Sgdamore  */
39d240b425Sgdamore 
40d240b425Sgdamore #include <sys/cdefs.h>
41*7433666eSthorpej __KERNEL_RCSID(0, "$NetBSD: mach_intr.c,v 1.8 2023/12/20 14:12:25 thorpej Exp $");
42d240b425Sgdamore 
43d240b425Sgdamore #include "opt_ddb.h"
44d240b425Sgdamore 
45d240b425Sgdamore #include <sys/param.h>
4651b4b9f7Smatt #include <sys/bus.h>
4751b4b9f7Smatt #include <sys/device.h>
4851b4b9f7Smatt #include <sys/intr.h>
4951b4b9f7Smatt #include <sys/kernel.h>
50d240b425Sgdamore #include <sys/systm.h>
51d240b425Sgdamore 
52d240b425Sgdamore #include <mips/locore.h>
53d240b425Sgdamore #include <mips/alchemy/include/auvar.h>
54d240b425Sgdamore #include <mips/alchemy/include/aubusvar.h>
55d240b425Sgdamore 
56d240b425Sgdamore void
evbmips_intr_init(void)57d240b425Sgdamore evbmips_intr_init(void)
58d240b425Sgdamore {
59d240b425Sgdamore 	au_intr_init();
60d240b425Sgdamore }
61d240b425Sgdamore 
62d240b425Sgdamore void
evbmips_iointr(int ipl,uint32_t ipending,struct clockframe * cf)634e8b65a1Sskrll evbmips_iointr(int ipl, uint32_t ipending, struct clockframe *cf)
64d240b425Sgdamore {
65d240b425Sgdamore 
664e8b65a1Sskrll 	au_iointr(ipl, cf->pc, ipending);
67d240b425Sgdamore }
68