diff options
author | Cyril Chemparathy <cyril@ti.com> | 2010-05-07 17:06:37 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-05-13 13:05:28 -0400 |
commit | bd808947040ba53b2b0e52dde598a9414fb27bba (patch) | |
tree | 868535ab01e9a7a754d255c77b2ab839f8b4f3ca /arch/arm/mach-davinci/cp_intc.c | |
parent | e4c822c7e98cdda78b10a696b030fc20b22dcab4 (diff) |
Davinci: aintc/cpintc - use ioremap()
This patch implements the following:
- interrupt initialization uses ioremap() instead of passing a virtual address
via davinci_soc_info.
- machine definitions directly point to cp_intc_init() or davinci_irq_init()
- davinci_intc_type and davinci_intc_base now get initialized in controller
specific init functions instead of davinci_common_init()
- minor fix in davinci_irq_init() to use intc_irq_num instead of
DAVINCI_N_AINTC_IRQ
Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/cp_intc.c')
-rw-r--r-- | arch/arm/mach-davinci/cp_intc.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index 2a8d26ee4bbf..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, u32 *host_map) | ||
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 | ||