diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-01-10 19:09:30 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-02-16 08:11:23 -0500 |
commit | 6b783f7c5dde2648fa0bbe7fc8ac80d78699e67f (patch) | |
tree | 19a92338364d75d365b0587675d19250db5855ee | |
parent | 75294957be1dee7d22dd7d90bd31334ba410e836 (diff) |
irq_domain: Remove irq_domain_add_simple()
irq_domain_add_simple() was a stop-gap measure until complete irq_domain
support was complete. This patch removes the irq_domain_add_simple()
interface.
This patch also drops the explicit irq_domain initialization performed
by the mach-versatile code because the versatile interrupt controller
already has irq_domain support built into it. This was a bug that was
hanging around quietly for a while, but with the full irq_domain which
actually verifies that irq_domain ranges are available it would cause
the registration to fail and the system wouldn't boot.
v4: Fixed number of irqs in mx5 gpio code
v2: Updated to pass in host_data pointer on irq_domain allocation.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Milton Miller <miltonm@bga.com>
Cc: Russell King <linux@arm.linux.org.uk>
Tested-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/mach-imx/imx51-dt.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx53-dt.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-msm8x60.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-generic.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/irq.c | 2 | ||||
-rw-r--r-- | include/linux/irqdomain.h | 1 | ||||
-rw-r--r-- | kernel/irq/irqdomain.c | 10 |
8 files changed, 12 insertions, 22 deletions
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index e6bad17b908c..1e03ef42faa0 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c | |||
@@ -47,7 +47,7 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { | |||
47 | static int __init imx51_tzic_add_irq_domain(struct device_node *np, | 47 | static int __init imx51_tzic_add_irq_domain(struct device_node *np, |
48 | struct device_node *interrupt_parent) | 48 | struct device_node *interrupt_parent) |
49 | { | 49 | { |
50 | irq_domain_add_simple(np, 0); | 50 | irq_domain_add_legacy(np, 128, 0, 0, &irq_domain_simple_ops, NULL); |
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
53 | 53 | ||
@@ -57,7 +57,7 @@ static int __init imx51_gpio_add_irq_domain(struct device_node *np, | |||
57 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; | 57 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; |
58 | 58 | ||
59 | gpio_irq_base -= 32; | 59 | gpio_irq_base -= 32; |
60 | irq_domain_add_simple(np, gpio_irq_base); | 60 | irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, NULL); |
61 | 61 | ||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
diff --git a/arch/arm/mach-imx/imx53-dt.c b/arch/arm/mach-imx/imx53-dt.c index 05ebb3e68679..fd5be0f20fbb 100644 --- a/arch/arm/mach-imx/imx53-dt.c +++ b/arch/arm/mach-imx/imx53-dt.c | |||
@@ -51,7 +51,7 @@ static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { | |||
51 | static int __init imx53_tzic_add_irq_domain(struct device_node *np, | 51 | static int __init imx53_tzic_add_irq_domain(struct device_node *np, |
52 | struct device_node *interrupt_parent) | 52 | struct device_node *interrupt_parent) |
53 | { | 53 | { |
54 | irq_domain_add_simple(np, 0); | 54 | irq_domain_add_legacy(np, 128, 0, 0, &irq_domain_simple_ops, NULL); |
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
@@ -61,7 +61,7 @@ static int __init imx53_gpio_add_irq_domain(struct device_node *np, | |||
61 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; | 61 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; |
62 | 62 | ||
63 | gpio_irq_base -= 32; | 63 | gpio_irq_base -= 32; |
64 | irq_domain_add_simple(np, gpio_irq_base); | 64 | irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, NULL); |
65 | 65 | ||
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index c25728106917..6075d4d62dd6 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -97,7 +97,8 @@ static int __init imx6q_gpio_add_irq_domain(struct device_node *np, | |||
97 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; | 97 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; |
98 | 98 | ||
99 | gpio_irq_base -= 32; | 99 | gpio_irq_base -= 32; |
100 | irq_domain_add_simple(np, gpio_irq_base); | 100 | irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, |
101 | NULL); | ||
101 | 102 | ||
102 | return 0; | 103 | return 0; |
103 | } | 104 | } |
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 0a113424632c..962e71169750 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -80,12 +80,8 @@ static struct of_device_id msm_dt_gic_match[] __initdata = { | |||
80 | 80 | ||
81 | static void __init msm8x60_dt_init(void) | 81 | static void __init msm8x60_dt_init(void) |
82 | { | 82 | { |
83 | struct device_node *node; | 83 | irq_domain_generate_simple(msm_dt_gic_match, MSM8X60_QGIC_DIST_PHYS, |
84 | 84 | GIC_SPI_START); | |
85 | node = of_find_matching_node_by_address(NULL, msm_dt_gic_match, | ||
86 | MSM8X60_QGIC_DIST_PHYS); | ||
87 | if (node) | ||
88 | irq_domain_add_simple(node, GIC_SPI_START); | ||
89 | 85 | ||
90 | if (of_machine_is_compatible("qcom,msm8660-surf")) { | 86 | if (of_machine_is_compatible("qcom,msm8660-surf")) { |
91 | printk(KERN_INFO "Init surf UART registers\n"); | 87 | printk(KERN_INFO "Init surf UART registers\n"); |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index d58756060483..00b1d024fa87 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -67,7 +67,7 @@ static void __init omap_generic_init(void) | |||
67 | { | 67 | { |
68 | struct device_node *node = of_find_matching_node(NULL, intc_match); | 68 | struct device_node *node = of_find_matching_node(NULL, intc_match); |
69 | if (node) | 69 | if (node) |
70 | irq_domain_add_simple(node, 0); | 70 | irq_domain_add_legacy(node, 32, 0, 0, &irq_domain_simple_ops, NULL); |
71 | 71 | ||
72 | omap_sdrc_init(NULL, NULL); | 72 | omap_sdrc_init(NULL, NULL); |
73 | 73 | ||
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c index d93ceef4a50a..37c2de9b6f26 100644 --- a/arch/arm/mach-prima2/irq.c +++ b/arch/arm/mach-prima2/irq.c | |||
@@ -68,7 +68,7 @@ void __init sirfsoc_of_irq_init(void) | |||
68 | if (!sirfsoc_intc_base) | 68 | if (!sirfsoc_intc_base) |
69 | panic("unable to map intc cpu registers\n"); | 69 | panic("unable to map intc cpu registers\n"); |
70 | 70 | ||
71 | irq_domain_add_simple(np, 0); | 71 | irq_domain_add_legacy(np, 32, 0, 0, &irq_domain_simple_ops, NULL); |
72 | 72 | ||
73 | of_node_put(np); | 73 | of_node_put(np); |
74 | 74 | ||
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 624e9ac89e79..e7379a3c4d7d 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
@@ -164,7 +164,6 @@ extern unsigned int irq_linear_revmap(struct irq_domain *host, | |||
164 | 164 | ||
165 | extern struct irq_domain_ops irq_domain_simple_ops; | 165 | extern struct irq_domain_ops irq_domain_simple_ops; |
166 | #if defined(CONFIG_OF_IRQ) | 166 | #if defined(CONFIG_OF_IRQ) |
167 | extern void irq_domain_add_simple(struct device_node *controller, int irq_base); | ||
168 | extern void irq_domain_generate_simple(const struct of_device_id *match, | 167 | extern void irq_domain_generate_simple(const struct of_device_id *match, |
169 | u64 phys_base, unsigned int irq_start); | 168 | u64 phys_base, unsigned int irq_start); |
170 | #else /* CONFIG_OF_IRQ */ | 169 | #else /* CONFIG_OF_IRQ */ |
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 2981ebfeb40c..6328d9350f04 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
@@ -722,13 +722,6 @@ struct irq_domain_ops irq_domain_simple_ops = { | |||
722 | EXPORT_SYMBOL_GPL(irq_domain_simple_ops); | 722 | EXPORT_SYMBOL_GPL(irq_domain_simple_ops); |
723 | 723 | ||
724 | #ifdef CONFIG_OF_IRQ | 724 | #ifdef CONFIG_OF_IRQ |
725 | void irq_domain_add_simple(struct device_node *controller, int irq_base) | ||
726 | { | ||
727 | irq_domain_add_legacy(controller, 32, irq_base, 0, | ||
728 | &irq_domain_simple_ops, NULL); | ||
729 | } | ||
730 | EXPORT_SYMBOL_GPL(irq_domain_add_simple); | ||
731 | |||
732 | void irq_domain_generate_simple(const struct of_device_id *match, | 725 | void irq_domain_generate_simple(const struct of_device_id *match, |
733 | u64 phys_base, unsigned int irq_start) | 726 | u64 phys_base, unsigned int irq_start) |
734 | { | 727 | { |
@@ -737,7 +730,8 @@ void irq_domain_generate_simple(const struct of_device_id *match, | |||
737 | (unsigned long long) phys_base, (int) irq_start); | 730 | (unsigned long long) phys_base, (int) irq_start); |
738 | node = of_find_matching_node_by_address(NULL, match, phys_base); | 731 | node = of_find_matching_node_by_address(NULL, match, phys_base); |
739 | if (node) | 732 | if (node) |
740 | irq_domain_add_simple(node, irq_start); | 733 | irq_domain_add_legacy(node, 32, irq_start, 0, |
734 | &irq_domain_simple_ops, NULL); | ||
741 | } | 735 | } |
742 | EXPORT_SYMBOL_GPL(irq_domain_generate_simple); | 736 | EXPORT_SYMBOL_GPL(irq_domain_generate_simple); |
743 | #endif | 737 | #endif |