xref: /openbsd-src/sys/arch/armv7/sunxi/sxiintc.h (revision 556e9d606cfa98e2b1fd3c641078ef5d536b7c0f)
1*556e9d60Sjsg /*	$OpenBSD: sxiintc.h,v 1.4 2024/04/29 12:33:17 jsg Exp $ */
22b7dae4aSkettenis /*
32b7dae4aSkettenis  * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
42b7dae4aSkettenis  *
52b7dae4aSkettenis  * Permission to use, copy, modify, and distribute this software for any
62b7dae4aSkettenis  * purpose with or without fee is hereby granted, provided that the above
72b7dae4aSkettenis  * copyright notice and this permission notice appear in all copies.
82b7dae4aSkettenis  *
92b7dae4aSkettenis  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
102b7dae4aSkettenis  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
112b7dae4aSkettenis  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
122b7dae4aSkettenis  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
132b7dae4aSkettenis  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
142b7dae4aSkettenis  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
152b7dae4aSkettenis  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
162b7dae4aSkettenis  */
172b7dae4aSkettenis 
182b7dae4aSkettenis #ifndef _SXIINTC_H_
192b7dae4aSkettenis #define _SXIINTC_H_
202b7dae4aSkettenis 
212b7dae4aSkettenis #ifndef _LOCORE
222b7dae4aSkettenis 
232b7dae4aSkettenis #include <arm/armreg.h>
242b7dae4aSkettenis #include <arm/cpufunc.h>
252b7dae4aSkettenis #include <machine/intr.h>
262b7dae4aSkettenis #include <arm/softintr.h>
272b7dae4aSkettenis 
282b7dae4aSkettenis #define SI_TO_IRQBIT(si)  (1U<<(si))
292b7dae4aSkettenis void sxiintc_setipl(int);
302b7dae4aSkettenis void sxiintc_splx(int);
312b7dae4aSkettenis int sxiintc_splraise(int);
322b7dae4aSkettenis int sxiintc_spllower(int);
332b7dae4aSkettenis 
342b7dae4aSkettenis void sxiintc_irq_handler(void *);
35789e88a4Spatrick void *sxiintc_intr_establish(int, int, struct cpu_info *,
36789e88a4Spatrick     int (*)(void *), void *, char *);
372b7dae4aSkettenis void sxiintc_intr_disestablish(void *);
382b7dae4aSkettenis const char *sxiintc_intr_string(void *);
392b7dae4aSkettenis 
402b7dae4aSkettenis #endif /* ! _LOCORE */
412b7dae4aSkettenis 
422b7dae4aSkettenis #endif /* _SXIINTC_H_ */
432b7dae4aSkettenis 
44