aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_irq.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/of_irq.h
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'include/linux/of_irq.h')
-rw-r--r--include/linux/of_irq.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index 535cecf1e02..cd2e61ce4e8 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -6,12 +6,11 @@ struct of_irq;
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/errno.h> 7#include <linux/errno.h>
8#include <linux/irq.h> 8#include <linux/irq.h>
9#include <linux/irqdomain.h>
10#include <linux/ioport.h> 9#include <linux/ioport.h>
11#include <linux/of.h> 10#include <linux/of.h>
12 11
13/* 12/*
14 * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC 13 * irq_of_parse_and_map() is used ba all OF enabled platforms; but SPARC
15 * implements it differently. However, the prototype is the same for all, 14 * implements it differently. However, the prototype is the same for all,
16 * so declare it here regardless of the CONFIG_OF_IRQ setting. 15 * so declare it here regardless of the CONFIG_OF_IRQ setting.
17 */ 16 */
@@ -34,8 +33,6 @@ struct of_irq {
34 u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ 33 u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */
35}; 34};
36 35
37typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
38
39/* 36/*
40 * Workarounds only applied to 32bit powermac machines 37 * Workarounds only applied to 32bit powermac machines
41 */ 38 */
@@ -58,14 +55,17 @@ static inline int of_irq_map_oldworld(struct device_node *device, int index,
58#endif /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ 55#endif /* CONFIG_PPC32 && CONFIG_PPC_PMAC */
59 56
60 57
61extern int of_irq_map_raw(struct device_node *parent, const __be32 *intspec, 58extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec,
62 u32 ointsize, const __be32 *addr, 59 u32 ointsize, const u32 *addr,
63 struct of_irq *out_irq); 60 struct of_irq *out_irq);
64extern int of_irq_map_one(struct device_node *device, int index, 61extern int of_irq_map_one(struct device_node *device, int index,
65 struct of_irq *out_irq); 62 struct of_irq *out_irq);
66extern unsigned int irq_create_of_mapping(struct device_node *controller, 63extern unsigned int irq_create_of_mapping(struct device_node *controller,
67 const u32 *intspec, 64 const u32 *intspec,
68 unsigned int intsize); 65 unsigned int intsize);
66#ifdef CONFIG_IRQ_DOMAIN
67extern void irq_dispose_mapping(unsigned int irq);
68#endif
69extern int of_irq_to_resource(struct device_node *dev, int index, 69extern int of_irq_to_resource(struct device_node *dev, int index,
70 struct resource *r); 70 struct resource *r);
71extern int of_irq_count(struct device_node *dev); 71extern int of_irq_count(struct device_node *dev);
@@ -73,21 +73,7 @@ extern int of_irq_to_resource_table(struct device_node *dev,
73 struct resource *res, int nr_irqs); 73 struct resource *res, int nr_irqs);
74extern struct device_node *of_irq_find_parent(struct device_node *child); 74extern struct device_node *of_irq_find_parent(struct device_node *child);
75 75
76extern void of_irq_init(const struct of_device_id *matches);
77 76
78#endif /* CONFIG_OF_IRQ */ 77#endif /* CONFIG_OF_IRQ */
79 78#endif /* CONFIG_OF */
80#else /* !CONFIG_OF */
81static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
82 int index)
83{
84 return 0;
85}
86
87static inline void *of_irq_find_parent(struct device_node *child)
88{
89 return NULL;
90}
91#endif /* !CONFIG_OF */
92
93#endif /* __OF_IRQ_H */ 79#endif /* __OF_IRQ_H */