diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
commit | 2cf4d4514d5b43c1f3b64bd0ec8b9853bde8f1dc (patch) | |
tree | e35a625496acc6ac852846d40b8851186b9d1ac4 /arch/arm/plat-stmp3xxx/irq.c | |
parent | 44b7532b8b464f606053562400719c9c21276037 (diff) | |
parent | ce53895a5d24e0ee19fb92f56c17323fb4c9ab27 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
MAINTAINERS: EB110ATX is not ebsa110
MAINTAINERS: update Eric Miao's email address and status
fb: add support of LCD display controller on pxa168/910 (base layer)
[ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
[ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
[ARM] 5544/1: Trust PrimeCell resource sizes
[ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
[ARM] pxa/sharpsl_pm: drop set_irq_type calls
[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
[ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
[ARM] sa1100: remove unused collie_pm.c
[ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
[ARM] 5550/1: Add default configure file for w90p910 platform
[ARM] 5549/1: Add clock api for w90p910 platform.
[ARM] 5548/1: Add gpio api for w90p910 platform
[ARM] 5551/1: Add multi-function pin api for w90p910 platform.
[ARM] Make ARM_VIC_NR depend on ARM_VIC
[ARM] 5546/1: ARM PL022 SSP/SPI driver v3
ARM: OMAP4: SMP: Update defconfig for OMAP4430
ARM: OMAP4: SMP: Enable SMP support for OMAP4430
...
Diffstat (limited to 'arch/arm/plat-stmp3xxx/irq.c')
-rw-r--r-- | arch/arm/plat-stmp3xxx/irq.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/plat-stmp3xxx/irq.c b/arch/arm/plat-stmp3xxx/irq.c new file mode 100644 index 000000000000..20de4e0401ef --- /dev/null +++ b/arch/arm/plat-stmp3xxx/irq.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Freescale STMP37XX/STMP378X common interrupt handling code | ||
3 | * | ||
4 | * Author: Vladislav Buzov <vbuzov@embeddedalley.com> | ||
5 | * | ||
6 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * The code contained herein is licensed under the GNU General Public | ||
12 | * License. You may obtain a copy of the GNU General Public License | ||
13 | * Version 2 or later at the following locations: | ||
14 | * | ||
15 | * http://www.opensource.org/licenses/gpl-license.html | ||
16 | * http://www.gnu.org/copyleft/gpl.html | ||
17 | */ | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/irq.h> | ||
22 | #include <linux/sysdev.h> | ||
23 | |||
24 | #include <mach/stmp3xxx.h> | ||
25 | #include <mach/platform.h> | ||
26 | #include <mach/regs-icoll.h> | ||
27 | |||
28 | void __init stmp3xxx_init_irq(struct irq_chip *chip) | ||
29 | { | ||
30 | unsigned int i, lv; | ||
31 | |||
32 | /* Reset the interrupt controller */ | ||
33 | stmp3xxx_reset_block(REGS_ICOLL_BASE + HW_ICOLL_CTRL, true); | ||
34 | |||
35 | /* Disable all interrupts initially */ | ||
36 | for (i = 0; i < NR_REAL_IRQS; i++) { | ||
37 | chip->mask(i); | ||
38 | set_irq_chip(i, chip); | ||
39 | set_irq_handler(i, handle_level_irq); | ||
40 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | ||
41 | } | ||
42 | |||
43 | /* Ensure vector is cleared */ | ||
44 | for (lv = 0; lv < 4; lv++) | ||
45 | __raw_writel(1 << lv, REGS_ICOLL_BASE + HW_ICOLL_LEVELACK); | ||
46 | __raw_writel(0, REGS_ICOLL_BASE + HW_ICOLL_VECTOR); | ||
47 | |||
48 | /* Barrier */ | ||
49 | (void)__raw_readl(REGS_ICOLL_BASE + HW_ICOLL_STAT); | ||
50 | } | ||
51 | |||