| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: mvsoc_intr.c,v 1.8 2013/11/20 12:16:47 kiyohara Exp $ */ | | 1 | /* $NetBSD: mvsoc_intr.c,v 1.9 2014/02/22 16:14:38 martin Exp $ */ |
2 | /* | | 2 | /* |
3 | * Copyright (c) 2010 KIYOHARA Takashi | | 3 | * Copyright (c) 2010 KIYOHARA Takashi |
4 | * All rights reserved. | | 4 | * All rights reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * | | 14 | * |
| @@ -16,37 +16,38 @@ | | | @@ -16,37 +16,38 @@ |
16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | | 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | | 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | | 18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, |
19 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | | 19 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
23 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | | 23 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
24 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 24 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
25 | * POSSIBILITY OF SUCH DAMAGE. | | 25 | * POSSIBILITY OF SUCH DAMAGE. |
26 | */ | | 26 | */ |
27 | | | 27 | |
28 | #include <sys/cdefs.h> | | 28 | #include <sys/cdefs.h> |
29 | __KERNEL_RCSID(0, "$NetBSD: mvsoc_intr.c,v 1.8 2013/11/20 12:16:47 kiyohara Exp $"); | | 29 | __KERNEL_RCSID(0, "$NetBSD: mvsoc_intr.c,v 1.9 2014/02/22 16:14:38 martin Exp $"); |
30 | | | 30 | |
31 | #include "opt_mvsoc.h" | | 31 | #include "opt_mvsoc.h" |
32 | | | 32 | |
33 | #define _INTR_PRIVATE | | 33 | #define _INTR_PRIVATE |
34 | | | 34 | |
35 | #include <sys/param.h> | | 35 | #include <sys/param.h> |
36 | #include <sys/proc.h> | | 36 | #include <sys/proc.h> |
37 | | | 37 | |
38 | #include <machine/intr.h> | | 38 | #include <machine/intr.h> |
39 | | | 39 | |
| | | 40 | #include <arm/armreg.h> |
40 | #include <arm/cpu.h> | | 41 | #include <arm/cpu.h> |
41 | #include <arm/pic/picvar.h> | | 42 | #include <arm/pic/picvar.h> |
42 | #include <arm/marvell/mvsocreg.h> | | 43 | #include <arm/marvell/mvsocreg.h> |
43 | #include <arm/marvell/mvsocvar.h> | | 44 | #include <arm/marvell/mvsocvar.h> |
44 | | | 45 | |
45 | | | 46 | |
46 | int (*find_pending_irqs)(void); | | 47 | int (*find_pending_irqs)(void); |
47 | | | 48 | |
48 | static void mvsoc_bridge_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t); | | 49 | static void mvsoc_bridge_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t); |
49 | static void mvsoc_bridge_pic_block_irqs(struct pic_softc *, size_t, uint32_t); | | 50 | static void mvsoc_bridge_pic_block_irqs(struct pic_softc *, size_t, uint32_t); |
50 | static int mvsoc_bridge_pic_find_pending_irqs(struct pic_softc *); | | 51 | static int mvsoc_bridge_pic_find_pending_irqs(struct pic_softc *); |
51 | static void mvsoc_bridge_pic_establish_irq(struct pic_softc *, | | 52 | static void mvsoc_bridge_pic_establish_irq(struct pic_softc *, |
52 | struct intrsource *); | | 53 | struct intrsource *); |