xref: /netbsd-src/sys/arch/hpcmips/dev/plumicuvar.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: plumicuvar.h,v 1.3 2008/04/28 20:23:21 martin Exp $ */
29a758aabSuch 
358f851eeSuch /*-
458f851eeSuch  * Copyright (c) 1999 The NetBSD Foundation, Inc.
59a758aabSuch  * All rights reserved.
69a758aabSuch  *
758f851eeSuch  * This code is derived from software contributed to The NetBSD Foundation
858f851eeSuch  * by UCHIYAMA Yasushi.
958f851eeSuch  *
109a758aabSuch  * Redistribution and use in source and binary forms, with or without
119a758aabSuch  * modification, are permitted provided that the following conditions
129a758aabSuch  * are met:
139a758aabSuch  * 1. Redistributions of source code must retain the above copyright
149a758aabSuch  *    notice, this list of conditions and the following disclaimer.
1558f851eeSuch  * 2. Redistributions in binary form must reproduce the above copyright
1658f851eeSuch  *    notice, this list of conditions and the following disclaimer in the
1758f851eeSuch  *    documentation and/or other materials provided with the distribution.
189a758aabSuch  *
1958f851eeSuch  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2058f851eeSuch  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2158f851eeSuch  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2258f851eeSuch  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2358f851eeSuch  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2458f851eeSuch  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2558f851eeSuch  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2658f851eeSuch  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2758f851eeSuch  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2858f851eeSuch  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2958f851eeSuch  * POSSIBILITY OF SUCH DAMAGE.
309a758aabSuch  */
3158f851eeSuch 
329a758aabSuch /*
339a758aabSuch  * 1	EXT -> IO5(INT0, INT1, INT2), IO3(INT0, INT1)
349a758aabSuch  * 2	SM
359a758aabSuch  * 3	USBWAKE
369a758aabSuch  * 4	USB
379a758aabSuch  * 5	DISP
389a758aabSuch  * 6	C2SC
399a758aabSuch  * 7	C1SC
409a758aabSuch  * 8	PCC -> C1IO, C1RI, C2IO, C2RI
419a758aabSuch  */
429a758aabSuch 
439a758aabSuch /* Logical interrupt line # */
449a758aabSuch #define PLUM_INT_C1IO		0
459a758aabSuch #define PLUM_INT_C1RI		1
469a758aabSuch #define PLUM_INT_C1SC		2
479a758aabSuch #define PLUM_INT_C2IO		3
489a758aabSuch #define PLUM_INT_C2RI		4
499a758aabSuch #define PLUM_INT_C2SC		5
509a758aabSuch #define PLUM_INT_DISP		6
519a758aabSuch #define PLUM_INT_USB		7
529a758aabSuch #define PLUM_INT_USBWAKE	8
539a758aabSuch #define PLUM_INT_SM		9
549a758aabSuch #define PLUM_INT_EXT5IO0	10
559a758aabSuch #define PLUM_INT_EXT5IO1	11
569a758aabSuch #define PLUM_INT_EXT5IO2	12
579a758aabSuch #define PLUM_INT_EXT5IO3	13
589a758aabSuch #define PLUM_INT_EXT3IO0	14
599a758aabSuch #define PLUM_INT_EXT3IO1	15
609a758aabSuch 
619a758aabSuch #define PLUM_INTR_MAX		16
629a758aabSuch #define LEGAL_PRUM_INTR(x) (((x) >= 0) && ((x) < PLUM_INTR_MAX))
639a758aabSuch 
6458f851eeSuch void *plum_intr_establish(plum_chipset_tag_t, int, int, int, int (*)(void *),
6558f851eeSuch     void *);
6658f851eeSuch void plum_intr_disestablish(plum_chipset_tag_t, void *);
67