diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-28 17:03:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-28 17:03:14 -0400 |
commit | 0fe41b8982001cd14ee2c77cd776735a5024e98b (patch) | |
tree | 83e65d595c413d55259ea14fb97748ce5efe5707 /arch/arm/mach-mmp/irq.c | |
parent | eedf2c5296a8dfaaf9aec1a938c1d3bd73159a30 (diff) | |
parent | 9759d22c8348343b0da4e25d6150c41712686c14 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
[ARM] 5435/1: fix compile warning in sanity_check_meminfo()
[ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
[ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
imxfb: Fix TFT mode
i.MX21/27: remove ifdef CONFIG_FB_IMX
imxfb: add clock support
mxc: add arch_reset() function
clkdev: add possibility to get a clock based on the device name
i.MX1: remove fb support from mach-imx
[ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
Gemini: Add support for Teltonika RUT100
Gemini: gpiolib based GPIO support v2
MAINTAINERS: add myself as Gemini architecture maintainer
ARM: Add Gemini architecture v3
[ARM] OMAP: Fix compile for omap2_init_common_hw()
MAINTAINERS: Add myself as Faraday ARM core variant maintainer
ARM: Add support for FA526 v2
[ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
[ARM] collie: fix two minor formatting nits
...
Diffstat (limited to 'arch/arm/mach-mmp/irq.c')
-rw-r--r-- | arch/arm/mach-mmp/irq.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/irq.c b/arch/arm/mach-mmp/irq.c new file mode 100644 index 000000000000..52ff2f065eba --- /dev/null +++ b/arch/arm/mach-mmp/irq.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/irq.c | ||
3 | * | ||
4 | * Generic IRQ handling, GPIO IRQ demultiplexing, etc. | ||
5 | * | ||
6 | * Author: Bin Yang <bin.yang@marvell.com> | ||
7 | * Created: Sep 30, 2008 | ||
8 | * Copyright: Marvell International Ltd. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <mach/regs-icu.h> | ||
20 | |||
21 | #include "common.h" | ||
22 | |||
23 | #define IRQ_ROUTE_TO_AP (ICU_INT_CONF_AP_INT | ICU_INT_CONF_IRQ) | ||
24 | |||
25 | #define PRIORITY_DEFAULT 0x1 | ||
26 | #define PRIORITY_NONE 0x0 /* means IRQ disabled */ | ||
27 | |||
28 | static void icu_mask_irq(unsigned int irq) | ||
29 | { | ||
30 | __raw_writel(PRIORITY_NONE, ICU_INT_CONF(irq)); | ||
31 | } | ||
32 | |||
33 | static void icu_unmask_irq(unsigned int irq) | ||
34 | { | ||
35 | __raw_writel(IRQ_ROUTE_TO_AP | PRIORITY_DEFAULT, ICU_INT_CONF(irq)); | ||
36 | } | ||
37 | |||
38 | static struct irq_chip icu_irq_chip = { | ||
39 | .name = "icu_irq", | ||
40 | .ack = icu_mask_irq, | ||
41 | .mask = icu_mask_irq, | ||
42 | .unmask = icu_unmask_irq, | ||
43 | }; | ||
44 | |||
45 | void __init icu_init_irq(void) | ||
46 | { | ||
47 | int irq; | ||
48 | |||
49 | for (irq = 0; irq < 64; irq++) { | ||
50 | icu_mask_irq(irq); | ||
51 | set_irq_chip(irq, &icu_irq_chip); | ||
52 | set_irq_handler(irq, handle_level_irq); | ||
53 | set_irq_flags(irq, IRQF_VALID); | ||
54 | } | ||
55 | } | ||