xref: /netbsd-src/sys/arch/hpcsh/dev/hd6446x/hd6446xintcvar.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: hd6446xintcvar.h,v 1.3 2008/04/28 20:23:22 martin Exp $	*/
2260c29f0Such 
3260c29f0Such /*-
4260c29f0Such  * Copyright (c) 2002 The NetBSD Foundation, Inc.
5260c29f0Such  * All rights reserved.
6260c29f0Such  *
7260c29f0Such  * This code is derived from software contributed to The NetBSD Foundation
8260c29f0Such  * by UCHIYAMA Yasushi.
9260c29f0Such  *
10260c29f0Such  * Redistribution and use in source and binary forms, with or without
11260c29f0Such  * modification, are permitted provided that the following conditions
12260c29f0Such  * are met:
13260c29f0Such  * 1. Redistributions of source code must retain the above copyright
14260c29f0Such  *    notice, this list of conditions and the following disclaimer.
15260c29f0Such  * 2. Redistributions in binary form must reproduce the above copyright
16260c29f0Such  *    notice, this list of conditions and the following disclaimer in the
17260c29f0Such  *    documentation and/or other materials provided with the distribution.
18260c29f0Such  *
19260c29f0Such  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20260c29f0Such  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21260c29f0Such  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22260c29f0Such  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23260c29f0Such  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24260c29f0Such  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25260c29f0Such  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26260c29f0Such  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27260c29f0Such  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28260c29f0Such  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29260c29f0Such  * POSSIBILITY OF SUCH DAMAGE.
30260c29f0Such  */
31260c29f0Such 
32260c29f0Such #ifndef _HPCSH_DEV_HD6446XINTCVAR_H_
33260c29f0Such #define _HPCSH_DEV_HD6446XINTCVAR_H_
34260c29f0Such 
35260c29f0Such #define _HD6446X_INTR_N		16
36260c29f0Such 
37260c29f0Such struct hd6446x_intrhand {
38260c29f0Such 	int (*hh_func)(void *);
39260c29f0Such 	void *hh_arg;
40260c29f0Such 	int hh_ipl;
417351da46Suwe 	uint16_t hh_imask;
42260c29f0Such };
43260c29f0Such 
44260c29f0Such extern struct hd6446x_intrhand hd6446x_intrhand[];
457351da46Suwe extern uint16_t hd6446x_ienable;
46260c29f0Such 
477351da46Suwe extern void hd6446x_intr_init(void);
487351da46Suwe extern void *hd6446x_intr_establish(int, int, int, int (*)(void *), void *);
497351da46Suwe extern void hd6446x_intr_disestablish(void *);
507351da46Suwe extern void hd6446x_intr_priority(int, int);
517351da46Suwe 
527351da46Suwe extern int hd6446x_intr_raise(int);
537351da46Suwe extern void hd6446x_intr_resume(int);
54260c29f0Such 
55260c29f0Such #endif /* !_HPCSH_DEV_HD6446XINTCVAR_H_ */
56