diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-18 13:09:59 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-06-28 15:41:33 -0400 |
commit | e3873444990dd6f8a095d1f72b5ad45192f8c506 (patch) | |
tree | 9e9fbc43fd4ffde3ac7d41827e0ab9c5f98363f0 /arch/microblaze/kernel | |
parent | b505ff5e7291cca6379549297e3852ce3622d550 (diff) |
of/irq: Move irq_of_parse_and_map() to common code
Merge common code between PowerPC and Microblaze. SPARC implements
irq_of_parse_and_map(), but the implementation is different, so it
does not use this code.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r-- | arch/microblaze/kernel/irq.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/microblaze/kernel/irq.c b/arch/microblaze/kernel/irq.c index 8f120aca123d..dd32b09b4a3c 100644 --- a/arch/microblaze/kernel/irq.c +++ b/arch/microblaze/kernel/irq.c | |||
@@ -17,20 +17,10 @@ | |||
17 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
18 | #include <linux/kernel_stat.h> | 18 | #include <linux/kernel_stat.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/of_irq.h> | ||
20 | 21 | ||
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
22 | 23 | ||
23 | unsigned int irq_of_parse_and_map(struct device_node *dev, int index) | ||
24 | { | ||
25 | struct of_irq oirq; | ||
26 | |||
27 | if (of_irq_map_one(dev, index, &oirq)) | ||
28 | return NO_IRQ; | ||
29 | |||
30 | return oirq.specifier[0]; | ||
31 | } | ||
32 | EXPORT_SYMBOL_GPL(irq_of_parse_and_map); | ||
33 | |||
34 | static u32 concurrent_irq; | 24 | static u32 concurrent_irq; |
35 | 25 | ||
36 | void __irq_entry do_IRQ(struct pt_regs *regs) | 26 | void __irq_entry do_IRQ(struct pt_regs *regs) |
@@ -104,7 +94,7 @@ unsigned int irq_create_mapping(struct irq_host *host, irq_hw_number_t hwirq) | |||
104 | EXPORT_SYMBOL_GPL(irq_create_mapping); | 94 | EXPORT_SYMBOL_GPL(irq_create_mapping); |
105 | 95 | ||
106 | unsigned int irq_create_of_mapping(struct device_node *controller, | 96 | unsigned int irq_create_of_mapping(struct device_node *controller, |
107 | u32 *intspec, unsigned int intsize) | 97 | const u32 *intspec, unsigned int intsize) |
108 | { | 98 | { |
109 | return intspec[0]; | 99 | return intspec[0]; |
110 | } | 100 | } |