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/include | |
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/include')
-rw-r--r-- | arch/microblaze/include/asm/irq.h | 24 | ||||
-rw-r--r-- | arch/microblaze/include/asm/prom.h | 26 |
2 files changed, 1 insertions, 49 deletions
diff --git a/arch/microblaze/include/asm/irq.h b/arch/microblaze/include/asm/irq.h index 31a35c33df63..ec5583d6111c 100644 --- a/arch/microblaze/include/asm/irq.h +++ b/arch/microblaze/include/asm/irq.h | |||
@@ -27,17 +27,6 @@ extern unsigned int nr_irq; | |||
27 | struct pt_regs; | 27 | struct pt_regs; |
28 | extern void do_IRQ(struct pt_regs *regs); | 28 | extern void do_IRQ(struct pt_regs *regs); |
29 | 29 | ||
30 | /** | ||
31 | * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space | ||
32 | * @device: Device node of the device whose interrupt is to be mapped | ||
33 | * @index: Index of the interrupt to map | ||
34 | * | ||
35 | * This function is a wrapper that chains of_irq_map_one() and | ||
36 | * irq_create_of_mapping() to make things easier to callers | ||
37 | */ | ||
38 | struct device_node; | ||
39 | extern unsigned int irq_of_parse_and_map(struct device_node *dev, int index); | ||
40 | |||
41 | /** FIXME - not implement | 30 | /** FIXME - not implement |
42 | * irq_dispose_mapping - Unmap an interrupt | 31 | * irq_dispose_mapping - Unmap an interrupt |
43 | * @virq: linux virq number of the interrupt to unmap | 32 | * @virq: linux virq number of the interrupt to unmap |
@@ -62,17 +51,4 @@ struct irq_host; | |||
62 | extern unsigned int irq_create_mapping(struct irq_host *host, | 51 | extern unsigned int irq_create_mapping(struct irq_host *host, |
63 | irq_hw_number_t hwirq); | 52 | irq_hw_number_t hwirq); |
64 | 53 | ||
65 | /** | ||
66 | * irq_create_of_mapping - Map a hardware interrupt into linux virq space | ||
67 | * @controller: Device node of the interrupt controller | ||
68 | * @inspec: Interrupt specifier from the device-tree | ||
69 | * @intsize: Size of the interrupt specifier from the device-tree | ||
70 | * | ||
71 | * This function is identical to irq_create_mapping except that it takes | ||
72 | * as input informations straight from the device-tree (typically the results | ||
73 | * of the of_irq_map_*() functions. | ||
74 | */ | ||
75 | extern unsigned int irq_create_of_mapping(struct device_node *controller, | ||
76 | u32 *intspec, unsigned int intsize); | ||
77 | |||
78 | #endif /* _ASM_MICROBLAZE_IRQ_H */ | 54 | #endif /* _ASM_MICROBLAZE_IRQ_H */ |
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index e7d67a329bd7..e9fb2eb0035d 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #ifndef __ASSEMBLY__ | 20 | #ifndef __ASSEMBLY__ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/of_irq.h> | ||
23 | #include <linux/of_fdt.h> | 24 | #include <linux/of_fdt.h> |
24 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
@@ -92,18 +93,6 @@ extern const void *of_get_mac_address(struct device_node *np); | |||
92 | * OF interrupt mapping | 93 | * OF interrupt mapping |
93 | */ | 94 | */ |
94 | 95 | ||
95 | /* This structure is returned when an interrupt is mapped. The controller | ||
96 | * field needs to be put() after use | ||
97 | */ | ||
98 | |||
99 | #define OF_MAX_IRQ_SPEC 4 /* We handle specifiers of at most 4 cells */ | ||
100 | |||
101 | struct of_irq { | ||
102 | struct device_node *controller; /* Interrupt controller node */ | ||
103 | u32 size; /* Specifier size */ | ||
104 | u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ | ||
105 | }; | ||
106 | |||
107 | /** | 96 | /** |
108 | * of_irq_map_init - Initialize the irq remapper | 97 | * of_irq_map_init - Initialize the irq remapper |
109 | * @flags: flags defining workarounds to enable | 98 | * @flags: flags defining workarounds to enable |
@@ -139,19 +128,6 @@ extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, | |||
139 | struct of_irq *out_irq); | 128 | struct of_irq *out_irq); |
140 | 129 | ||
141 | /** | 130 | /** |
142 | * of_irq_map_one - Resolve an interrupt for a device | ||
143 | * @device: the device whose interrupt is to be resolved | ||
144 | * @index: index of the interrupt to resolve | ||
145 | * @out_irq: structure of_irq filled by this function | ||
146 | * | ||
147 | * This function resolves an interrupt, walking the tree, for a given | ||
148 | * device-tree node. It's the high level pendant to of_irq_map_raw(). | ||
149 | * It also implements the workarounds for OldWolrd Macs. | ||
150 | */ | ||
151 | extern int of_irq_map_one(struct device_node *device, int index, | ||
152 | struct of_irq *out_irq); | ||
153 | |||
154 | /** | ||
155 | * of_irq_map_pci - Resolve the interrupt for a PCI device | 131 | * of_irq_map_pci - Resolve the interrupt for a PCI device |
156 | * @pdev: the device whose interrupt is to be resolved | 132 | * @pdev: the device whose interrupt is to be resolved |
157 | * @out_irq: structure of_irq filled by this function | 133 | * @out_irq: structure of_irq filled by this function |