diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-06-12 22:55:46 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-07-01 09:57:37 -0400 |
commit | 544496ab5cbdae312351da4c742ae70cab08dbf2 (patch) | |
tree | 4616bfbe170dcef54dc9673e69d170d04f84d1de /arch/arm/mach-imx/imx27-dt.c | |
parent | f3eac29da1f6a477722b56ff00228e8a13f8f6c6 (diff) |
ARM: imx: move irq_domain_add_legacy call into avic driver
Move irq_domain_add_legacy call from imx27-dt.c into avic init function
and have the avic driver adopt irqdomain support for both DT and non-DT
boot.
Now avic init function calls irq_alloc_descs to get irq_base and adds
a lenacy irqdomain with the irq_base, so that the mapping between avic
irq and Linux irq number can be handled by irqdomain.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/imx27-dt.c')
-rw-r--r-- | arch/arm/mach-imx/imx27-dt.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index c734e564f204..5142ef048a60 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
13 | #include <linux/irqdomain.h> | ||
14 | #include <linux/of_irq.h> | 13 | #include <linux/of_irq.h> |
15 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
16 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
@@ -33,22 +32,8 @@ static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = { | |||
33 | { /* sentinel */ } | 32 | { /* sentinel */ } |
34 | }; | 33 | }; |
35 | 34 | ||
36 | static int __init imx27_avic_add_irq_domain(struct device_node *np, | ||
37 | struct device_node *interrupt_parent) | ||
38 | { | ||
39 | irq_domain_add_legacy(np, 64, 0, 0, &irq_domain_simple_ops, NULL); | ||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | static const struct of_device_id imx27_irq_match[] __initconst = { | ||
44 | { .compatible = "fsl,imx27-avic", .data = imx27_avic_add_irq_domain, }, | ||
45 | { /* sentinel */ } | ||
46 | }; | ||
47 | |||
48 | static void __init imx27_dt_init(void) | 35 | static void __init imx27_dt_init(void) |
49 | { | 36 | { |
50 | of_irq_init(imx27_irq_match); | ||
51 | |||
52 | of_platform_populate(NULL, of_default_bus_match_table, | 37 | of_platform_populate(NULL, of_default_bus_match_table, |
53 | imx27_auxdata_lookup, NULL); | 38 | imx27_auxdata_lookup, NULL); |
54 | } | 39 | } |