diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 15:08:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 15:08:50 -0400 |
commit | 024a6b95181f2df6090975c8a293499d24bf8b28 (patch) | |
tree | 8da0a465bc35ab250897fb6bea1bcb64cdef9a05 /arch/arm/mach-davinci/cp_intc.c | |
parent | 349e1fba7e63b1067b5915337986060c13d9edd0 (diff) | |
parent | 5e682ef825302f2378726e44257291eaeadbfd50 (diff) |
Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (48 commits)
Revert "rtc: omap: let device wakeup capability be configured from chip init logic"
DM365: Added more PINMUX configurations for AEMIF
DM365: Make CLKOUTx available
DM365: Added PINMUX definitions for GPIO30..32
Davinci: iotable based ioremap() interception
Davinci: pinmux - use ioremap()
Davinci: aintc/cpintc - use ioremap()
Davinci: psc - use ioremap()
Davinci: timer - use ioremap()
Davinci: jtag_id - use ioremap()
Davinci: da8xx: rtc - use ioremap
Davinci: gpio - use ioremap()
davinci: edma: fix coding style issue related to breaking lines
davinci: edma: use BIT() wherever possible
davinci: edma: fix coding style issue related to usage of braces
davinci: edma: use a more intuitive name for edma_info
Davinci: serial - conditional reset via pwremu
Davinci: serial - use ioremap()
Davinci: serial - remove unnecessary define
Davinci: watchdog reset separation across socs
...
Fix up trivial conflict in arch/arm/Kconfig due to removal of "select
GENERIC_TIME"
Diffstat (limited to 'arch/arm/mach-davinci/cp_intc.c')
-rw-r--r-- | arch/arm/mach-davinci/cp_intc.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index 37311d1830eb..bb4c40ecb803 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c | |||
@@ -13,18 +13,17 @@ | |||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | 15 | ||
16 | #include <mach/common.h> | ||
16 | #include <mach/cp_intc.h> | 17 | #include <mach/cp_intc.h> |
17 | 18 | ||
18 | static void __iomem *cp_intc_base; | ||
19 | |||
20 | static inline unsigned int cp_intc_read(unsigned offset) | 19 | static inline unsigned int cp_intc_read(unsigned offset) |
21 | { | 20 | { |
22 | return __raw_readl(cp_intc_base + offset); | 21 | return __raw_readl(davinci_intc_base + offset); |
23 | } | 22 | } |
24 | 23 | ||
25 | static inline void cp_intc_write(unsigned long value, unsigned offset) | 24 | static inline void cp_intc_write(unsigned long value, unsigned offset) |
26 | { | 25 | { |
27 | __raw_writel(value, cp_intc_base + offset); | 26 | __raw_writel(value, davinci_intc_base + offset); |
28 | } | 27 | } |
29 | 28 | ||
30 | static void cp_intc_ack_irq(unsigned int irq) | 29 | static void cp_intc_ack_irq(unsigned int irq) |
@@ -100,13 +99,18 @@ static struct irq_chip cp_intc_irq_chip = { | |||
100 | .set_wake = cp_intc_set_wake, | 99 | .set_wake = cp_intc_set_wake, |
101 | }; | 100 | }; |
102 | 101 | ||
103 | void __init cp_intc_init(void __iomem *base, unsigned short num_irq, | 102 | void __init cp_intc_init(void) |
104 | u8 *irq_prio) | ||
105 | { | 103 | { |
104 | unsigned long num_irq = davinci_soc_info.intc_irq_num; | ||
105 | u8 *irq_prio = davinci_soc_info.intc_irq_prios; | ||
106 | u32 *host_map = davinci_soc_info.intc_host_map; | ||
106 | unsigned num_reg = BITS_TO_LONGS(num_irq); | 107 | unsigned num_reg = BITS_TO_LONGS(num_irq); |
107 | int i; | 108 | int i; |
108 | 109 | ||
109 | cp_intc_base = base; | 110 | davinci_intc_type = DAVINCI_INTC_TYPE_CP_INTC; |
111 | davinci_intc_base = ioremap(davinci_soc_info.intc_base, SZ_8K); | ||
112 | if (WARN_ON(!davinci_intc_base)) | ||
113 | return; | ||
110 | 114 | ||
111 | cp_intc_write(0, CP_INTC_GLOBAL_ENABLE); | 115 | cp_intc_write(0, CP_INTC_GLOBAL_ENABLE); |
112 | 116 | ||
@@ -157,6 +161,10 @@ void __init cp_intc_init(void __iomem *base, unsigned short num_irq, | |||
157 | cp_intc_write(0x0f0f0f0f, CP_INTC_CHAN_MAP(i)); | 161 | cp_intc_write(0x0f0f0f0f, CP_INTC_CHAN_MAP(i)); |
158 | } | 162 | } |
159 | 163 | ||
164 | if (host_map) | ||
165 | for (i = 0; host_map[i] != -1; i++) | ||
166 | cp_intc_write(host_map[i], CP_INTC_HOST_MAP(i)); | ||
167 | |||
160 | /* Set up genirq dispatching for cp_intc */ | 168 | /* Set up genirq dispatching for cp_intc */ |
161 | for (i = 0; i < num_irq; i++) { | 169 | for (i = 0; i < num_irq; i++) { |
162 | set_irq_chip(i, &cp_intc_irq_chip); | 170 | set_irq_chip(i, &cp_intc_irq_chip); |