diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-09-15 22:32:39 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-10-24 11:43:04 +0100 |
commit | 2361613206e66ce59cc0e08efa8d98ec15b84ed1 (patch) | |
tree | 5e4f5fc33f715202f71770890dcc09ac09a2d851 /include/linux/of_irq.h | |
parent | e6d30ab1e7d1281784672c0fc2ffa385cfb7279e (diff) | |
download | lwn-2361613206e66ce59cc0e08efa8d98ec15b84ed1.tar.gz lwn-2361613206e66ce59cc0e08efa8d98ec15b84ed1.zip |
of/irq: Refactor interrupt-map parsing
All the users of of_irq_parse_raw pass in a raw interrupt specifier from
the device tree and expect it to be returned (possibly modified) in an
of_phandle_args structure. However, the primary function of
of_irq_parse_raw() is to check for translations due to the presence of
one or more interrupt-map properties. The actual placing of the data
into an of_phandle_args structure is trivial. If it is refactored to
accept an of_phandle_args structure directly, then it becomes possible
to consume of_phandle_args from other sources. This is important for an
upcoming patch that allows a device to be connected to more than one
interrupt parent. It also simplifies the code a bit.
The biggest complication with this patch is that the old version works
on the interrupt specifiers in __be32 form, but the of_phandle_args
structure is intended to carry it in the cpu-native version. A bit of
churn was required to make this work. In the end it results in tighter
code, so the churn is worth it.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/linux/of_irq.h')
-rw-r--r-- | include/linux/of_irq.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 3bbba8d6adc8..c0d6dfe80895 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -31,10 +31,7 @@ static inline int of_irq_parse_oldworld(struct device_node *device, int index, } #endif /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ - -extern int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec, - u32 ointsize, const __be32 *addr, - struct of_phandle_args *out_irq); +extern int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq); extern int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_args *out_irq); extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data); |