diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 20:36:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 20:36:02 -0400 |
commit | 3645f0cd96fbf72c614673c5f4b1a8675f82a379 (patch) | |
tree | 84539c44e461eb9451cc0320dec70eedc9724796 /arch/arm/mach-imx | |
parent | f1d2c07d331f717da79a42952be7dc1c0d35f846 (diff) | |
parent | c7b0807b9d4faddd87a75a5acb079e5dbfedd211 (diff) |
Merge tag 'irq' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc sparse IRQ conversion from Arnd Bergmann:
"The I.MX platform is getting converted to use sparse IRQs. We are
doing this for all platforms over time, because this is one of the
requirements for building a multiplatform kernel, and generally a good
idea."
* tag 'irq' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: imx: select USE_OF
ARM: imx: Fix build error due to missing irqs.h include
ARM: imx: enable SPARSE_IRQ for imx platform
ARM: fiq: change FIQ_START to a variable
tty: serial: imx: remove the use of MXC_INTERNAL_IRQS
ARM: imx: remove unneeded mach/irq.h inclusion
i2c: imx: remove unneeded mach/irqs.h inclusion
ARM: imx: add a legacy irqdomain for mx31ads
ARM: imx: add a legacy irqdomain for 3ds_debugboard
ARM: imx: pass gpio than irq number into mxc_expio_init
ARM: imx: leave irq_base of wm8350_platform_data uninitialized
dma: ipu: remove the use of ipu_platform_data
ARM: imx: move irq_domain_add_legacy call into avic driver
ARM: imx: move irq_domain_add_legacy call into tzic driver
gpio/mxc: move irq_domain_add_legacy call into gpio driver
ARM: imx: eliminate macro IRQ_GPIOx()
ARM: imx: eliminate macro IOMUX_TO_IRQ()
ARM: imx: eliminate macro IMX_GPIO_TO_IRQ()
Diffstat (limited to 'arch/arm/mach-imx')
45 files changed, 194 insertions, 278 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 7616101a35f0..afd542ad6f97 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -382,7 +382,6 @@ config MACH_IMX27IPCAM | |||
382 | config MACH_IMX27_DT | 382 | config MACH_IMX27_DT |
383 | bool "Support i.MX27 platforms from device tree" | 383 | bool "Support i.MX27 platforms from device tree" |
384 | select SOC_IMX27 | 384 | select SOC_IMX27 |
385 | select USE_OF | ||
386 | help | 385 | help |
387 | Include support for Freescale i.MX27 based platforms | 386 | Include support for Freescale i.MX27 based platforms |
388 | using the device tree for discovery | 387 | using the device tree for discovery |
@@ -674,7 +673,6 @@ comment "i.MX51 machines:" | |||
674 | config MACH_IMX51_DT | 673 | config MACH_IMX51_DT |
675 | bool "Support i.MX51 platforms from device tree" | 674 | bool "Support i.MX51 platforms from device tree" |
676 | select SOC_IMX51 | 675 | select SOC_IMX51 |
677 | select USE_OF | ||
678 | select MACH_MX51_BABBAGE | 676 | select MACH_MX51_BABBAGE |
679 | help | 677 | help |
680 | Include support for Freescale i.MX51 based platforms | 678 | Include support for Freescale i.MX51 based platforms |
@@ -770,7 +768,6 @@ comment "i.MX53 machines:" | |||
770 | config MACH_IMX53_DT | 768 | config MACH_IMX53_DT |
771 | bool "Support i.MX53 platforms from device tree" | 769 | bool "Support i.MX53 platforms from device tree" |
772 | select SOC_IMX53 | 770 | select SOC_IMX53 |
773 | select USE_OF | ||
774 | select MACH_MX53_ARD | 771 | select MACH_MX53_ARD |
775 | select MACH_MX53_EVK | 772 | select MACH_MX53_EVK |
776 | select MACH_MX53_LOCO | 773 | select MACH_MX53_LOCO |
@@ -845,7 +842,6 @@ config SOC_IMX6Q | |||
845 | select MFD_ANATOP | 842 | select MFD_ANATOP |
846 | select PINCTRL | 843 | select PINCTRL |
847 | select PINCTRL_IMX6Q | 844 | select PINCTRL_IMX6Q |
848 | select USE_OF | ||
849 | 845 | ||
850 | help | 846 | help |
851 | This enables support for Freescale i.MX6 Quad processor. | 847 | This enables support for Freescale i.MX6 Quad processor. |
diff --git a/arch/arm/mach-imx/devices-imx31.h b/arch/arm/mach-imx/devices-imx31.h index 13f533d0aa5c..8b2ceb45bb83 100644 --- a/arch/arm/mach-imx/devices-imx31.h +++ b/arch/arm/mach-imx/devices-imx31.h | |||
@@ -42,8 +42,8 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[]; | |||
42 | #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) | 42 | #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) |
43 | 43 | ||
44 | extern const struct imx_ipu_core_data imx31_ipu_core_data; | 44 | extern const struct imx_ipu_core_data imx31_ipu_core_data; |
45 | #define imx31_add_ipu_core(pdata) \ | 45 | #define imx31_add_ipu_core() \ |
46 | imx_add_ipu_core(&imx31_ipu_core_data, pdata) | 46 | imx_add_ipu_core(&imx31_ipu_core_data) |
47 | #define imx31_alloc_mx3_camera(pdata) \ | 47 | #define imx31_alloc_mx3_camera(pdata) \ |
48 | imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata) | 48 | imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata) |
49 | #define imx31_add_mx3_sdc_fb(pdata) \ | 49 | #define imx31_add_mx3_sdc_fb(pdata) \ |
diff --git a/arch/arm/mach-imx/devices-imx35.h b/arch/arm/mach-imx/devices-imx35.h index 4815be1ee675..c3e9f206ac2b 100644 --- a/arch/arm/mach-imx/devices-imx35.h +++ b/arch/arm/mach-imx/devices-imx35.h | |||
@@ -50,8 +50,8 @@ extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[]; | |||
50 | #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) | 50 | #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) |
51 | 51 | ||
52 | extern const struct imx_ipu_core_data imx35_ipu_core_data; | 52 | extern const struct imx_ipu_core_data imx35_ipu_core_data; |
53 | #define imx35_add_ipu_core(pdata) \ | 53 | #define imx35_add_ipu_core() \ |
54 | imx_add_ipu_core(&imx35_ipu_core_data, pdata) | 54 | imx_add_ipu_core(&imx35_ipu_core_data) |
55 | #define imx35_alloc_mx3_camera(pdata) \ | 55 | #define imx35_alloc_mx3_camera(pdata) \ |
56 | imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata) | 56 | imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata) |
57 | #define imx35_add_mx3_sdc_fb(pdata) \ | 57 | #define imx35_add_mx3_sdc_fb(pdata) \ |
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index b46cab0ced53..fd3177f9e79a 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -266,7 +266,7 @@ static struct spi_board_info __maybe_unused | |||
266 | .bus_num = 0, | 266 | .bus_num = 0, |
267 | .chip_select = 0, | 267 | .chip_select = 0, |
268 | .max_speed_hz = 1500000, | 268 | .max_speed_hz = 1500000, |
269 | .irq = IRQ_GPIOD(25), | 269 | /* irq number is run-time assigned */ |
270 | .platform_data = &ads7846_config, | 270 | .platform_data = &ads7846_config, |
271 | .mode = SPI_MODE_2, | 271 | .mode = SPI_MODE_2, |
272 | }, | 272 | }, |
@@ -329,6 +329,7 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
329 | /* SPI_CS0 init */ | 329 | /* SPI_CS0 init */ |
330 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); | 330 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); |
331 | imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data); | 331 | imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data); |
332 | eukrea_mbimx27_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(4, 25)); | ||
332 | spi_register_board_info(eukrea_mbimx27_spi_board_info, | 333 | spi_register_board_info(eukrea_mbimx27_spi_board_info, |
333 | ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); | 334 | ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); |
334 | 335 | ||
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c index 557f6c486053..6e9dd12a6961 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c | |||
@@ -95,10 +95,6 @@ static const struct fb_videomode fb_modedb[] = { | |||
95 | }, | 95 | }, |
96 | }; | 96 | }; |
97 | 97 | ||
98 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
99 | .irq_base = MXC_IPU_IRQ_START, | ||
100 | }; | ||
101 | |||
102 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 98 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
103 | .name = "CMO-QVGA", | 99 | .name = "CMO-QVGA", |
104 | .mode = fb_modedb, | 100 | .mode = fb_modedb, |
@@ -287,7 +283,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
287 | printk(KERN_ERR "error setting mbimxsd pads !\n"); | 283 | printk(KERN_ERR "error setting mbimxsd pads !\n"); |
288 | 284 | ||
289 | imx35_add_imx_uart1(&uart_pdata); | 285 | imx35_add_imx_uart1(&uart_pdata); |
290 | imx35_add_ipu_core(&mx3_ipu_data); | 286 | imx35_add_ipu_core(); |
291 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 287 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
292 | 288 | ||
293 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 289 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index 52efe4d5149b..e80d5235dac0 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,35 +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 int __init imx27_gpio_add_irq_domain(struct device_node *np, | ||
44 | struct device_node *interrupt_parent) | ||
45 | { | ||
46 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; | ||
47 | |||
48 | gpio_irq_base -= 32; | ||
49 | irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, | ||
50 | NULL); | ||
51 | |||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | static const struct of_device_id imx27_irq_match[] __initconst = { | ||
56 | { .compatible = "fsl,imx27-avic", .data = imx27_avic_add_irq_domain, }, | ||
57 | { .compatible = "fsl,imx27-gpio", .data = imx27_gpio_add_irq_domain, }, | ||
58 | { /* sentinel */ } | ||
59 | }; | ||
60 | |||
61 | static void __init imx27_dt_init(void) | 35 | static void __init imx27_dt_init(void) |
62 | { | 36 | { |
63 | of_irq_init(imx27_irq_match); | ||
64 | |||
65 | of_platform_populate(NULL, of_default_bus_match_table, | 37 | of_platform_populate(NULL, of_default_bus_match_table, |
66 | imx27_auxdata_lookup, NULL); | 38 | imx27_auxdata_lookup, NULL); |
67 | } | 39 | } |
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index 18e78dba4298..d4067fe36357 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/irqdomain.h> | ||
15 | #include <linux/of_irq.h> | 14 | #include <linux/of_irq.h> |
16 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
17 | #include <linux/pinctrl/machine.h> | 16 | #include <linux/pinctrl/machine.h> |
@@ -45,30 +44,6 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { | |||
45 | { /* sentinel */ } | 44 | { /* sentinel */ } |
46 | }; | 45 | }; |
47 | 46 | ||
48 | static int __init imx51_tzic_add_irq_domain(struct device_node *np, | ||
49 | struct device_node *interrupt_parent) | ||
50 | { | ||
51 | irq_domain_add_legacy(np, 128, 0, 0, &irq_domain_simple_ops, NULL); | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | static int __init imx51_gpio_add_irq_domain(struct device_node *np, | ||
56 | struct device_node *interrupt_parent) | ||
57 | { | ||
58 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; | ||
59 | |||
60 | gpio_irq_base -= 32; | ||
61 | irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, NULL); | ||
62 | |||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | static const struct of_device_id imx51_irq_match[] __initconst = { | ||
67 | { .compatible = "fsl,imx51-tzic", .data = imx51_tzic_add_irq_domain, }, | ||
68 | { .compatible = "fsl,imx51-gpio", .data = imx51_gpio_add_irq_domain, }, | ||
69 | { /* sentinel */ } | ||
70 | }; | ||
71 | |||
72 | static const struct of_device_id imx51_iomuxc_of_match[] __initconst = { | 47 | static const struct of_device_id imx51_iomuxc_of_match[] __initconst = { |
73 | { .compatible = "fsl,imx51-iomuxc-babbage", .data = imx51_babbage_common_init, }, | 48 | { .compatible = "fsl,imx51-iomuxc-babbage", .data = imx51_babbage_common_init, }, |
74 | { /* sentinel */ } | 49 | { /* sentinel */ } |
@@ -80,8 +55,6 @@ static void __init imx51_dt_init(void) | |||
80 | const struct of_device_id *of_id; | 55 | const struct of_device_id *of_id; |
81 | void (*func)(void); | 56 | void (*func)(void); |
82 | 57 | ||
83 | of_irq_init(imx51_irq_match); | ||
84 | |||
85 | pinctrl_provide_dummies(); | 58 | pinctrl_provide_dummies(); |
86 | 59 | ||
87 | node = of_find_matching_node(NULL, imx51_iomuxc_of_match); | 60 | node = of_find_matching_node(NULL, imx51_iomuxc_of_match); |
diff --git a/arch/arm/mach-imx/imx53-dt.c b/arch/arm/mach-imx/imx53-dt.c index eb04b6248e48..fdd90805d98e 100644 --- a/arch/arm/mach-imx/imx53-dt.c +++ b/arch/arm/mach-imx/imx53-dt.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/irqdomain.h> | ||
19 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
20 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
21 | #include <linux/pinctrl/machine.h> | 20 | #include <linux/pinctrl/machine.h> |
@@ -52,30 +51,6 @@ static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { | |||
52 | { /* sentinel */ } | 51 | { /* sentinel */ } |
53 | }; | 52 | }; |
54 | 53 | ||
55 | static int __init imx53_tzic_add_irq_domain(struct device_node *np, | ||
56 | struct device_node *interrupt_parent) | ||
57 | { | ||
58 | irq_domain_add_legacy(np, 128, 0, 0, &irq_domain_simple_ops, NULL); | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | static int __init imx53_gpio_add_irq_domain(struct device_node *np, | ||
63 | struct device_node *interrupt_parent) | ||
64 | { | ||
65 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; | ||
66 | |||
67 | gpio_irq_base -= 32; | ||
68 | irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, NULL); | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static const struct of_device_id imx53_irq_match[] __initconst = { | ||
74 | { .compatible = "fsl,imx53-tzic", .data = imx53_tzic_add_irq_domain, }, | ||
75 | { .compatible = "fsl,imx53-gpio", .data = imx53_gpio_add_irq_domain, }, | ||
76 | { /* sentinel */ } | ||
77 | }; | ||
78 | |||
79 | static const struct of_device_id imx53_iomuxc_of_match[] __initconst = { | 54 | static const struct of_device_id imx53_iomuxc_of_match[] __initconst = { |
80 | { .compatible = "fsl,imx53-iomuxc-ard", .data = imx53_ard_common_init, }, | 55 | { .compatible = "fsl,imx53-iomuxc-ard", .data = imx53_ard_common_init, }, |
81 | { .compatible = "fsl,imx53-iomuxc-evk", .data = imx53_evk_common_init, }, | 56 | { .compatible = "fsl,imx53-iomuxc-evk", .data = imx53_evk_common_init, }, |
@@ -103,8 +78,6 @@ static void __init imx53_dt_init(void) | |||
103 | const struct of_device_id *of_id; | 78 | const struct of_device_id *of_id; |
104 | void (*func)(void); | 79 | void (*func)(void); |
105 | 80 | ||
106 | of_irq_init(imx53_irq_match); | ||
107 | |||
108 | pinctrl_provide_dummies(); | 81 | pinctrl_provide_dummies(); |
109 | 82 | ||
110 | node = of_find_matching_node(NULL, imx53_iomuxc_of_match); | 83 | node = of_find_matching_node(NULL, imx53_iomuxc_of_match); |
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index f4a63ee9e217..7b99a79722b6 100644 --- a/arch/arm/mach-imx/mach-apf9328.c +++ b/arch/arm/mach-imx/mach-apf9328.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/dm9000.h> | 20 | #include <linux/dm9000.h> |
21 | #include <linux/gpio.h> | ||
21 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
22 | 23 | ||
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
@@ -26,7 +27,6 @@ | |||
26 | 27 | ||
27 | #include <mach/common.h> | 28 | #include <mach/common.h> |
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <mach/irqs.h> | ||
30 | #include <mach/iomux-mx1.h> | 30 | #include <mach/iomux-mx1.h> |
31 | 31 | ||
32 | #include "devices-imx1.h" | 32 | #include "devices-imx1.h" |
@@ -87,8 +87,7 @@ static struct resource dm9000_resources[] = { | |||
87 | .end = MX1_CS4_PHYS + 0x00C00003, | 87 | .end = MX1_CS4_PHYS + 0x00C00003, |
88 | .flags = IORESOURCE_MEM, | 88 | .flags = IORESOURCE_MEM, |
89 | }, { | 89 | }, { |
90 | .start = IRQ_GPIOB(14), | 90 | /* irq number is run-time assigned */ |
91 | .end = IRQ_GPIOB(14), | ||
92 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 91 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
93 | }, | 92 | }, |
94 | }; | 93 | }; |
@@ -129,6 +128,8 @@ static void __init apf9328_init(void) | |||
129 | 128 | ||
130 | imx1_add_imx_i2c(&apf9328_i2c_data); | 129 | imx1_add_imx_i2c(&apf9328_i2c_data); |
131 | 130 | ||
131 | dm9000_resources[2].start = gpio_to_irq(IMX_GPIO_NR(2, 14)); | ||
132 | dm9000_resources[2].end = gpio_to_irq(IMX_GPIO_NR(2, 14)); | ||
132 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 133 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
133 | } | 134 | } |
134 | 135 | ||
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index c650145d1646..2c6ab3273f9e 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -367,10 +367,6 @@ static const struct fb_videomode fb_modedb[] = { | |||
367 | }, | 367 | }, |
368 | }; | 368 | }; |
369 | 369 | ||
370 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
371 | .irq_base = MXC_IPU_IRQ_START, | ||
372 | }; | ||
373 | |||
374 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 370 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
375 | .name = "CRT-VGA", | 371 | .name = "CRT-VGA", |
376 | .mode = fb_modedb, | 372 | .mode = fb_modedb, |
@@ -408,7 +404,8 @@ static int armadillo5x0_sdhc1_init(struct device *dev, | |||
408 | gpio_direction_input(gpio_wp); | 404 | gpio_direction_input(gpio_wp); |
409 | 405 | ||
410 | /* When supported the trigger type have to be BOTH */ | 406 | /* When supported the trigger type have to be BOTH */ |
411 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), detect_irq, | 407 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)), |
408 | detect_irq, | ||
412 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 409 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
413 | "sdhc-detect", data); | 410 | "sdhc-detect", data); |
414 | 411 | ||
@@ -429,7 +426,7 @@ err_gpio_free: | |||
429 | 426 | ||
430 | static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) | 427 | static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) |
431 | { | 428 | { |
432 | free_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), data); | 429 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)), data); |
433 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); | 430 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); |
434 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); | 431 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); |
435 | } | 432 | } |
@@ -450,8 +447,7 @@ static struct resource armadillo5x0_smc911x_resources[] = { | |||
450 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, | 447 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, |
451 | .flags = IORESOURCE_MEM, | 448 | .flags = IORESOURCE_MEM, |
452 | }, { | 449 | }, { |
453 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | 450 | /* irq number is run-time assigned */ |
454 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
455 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 451 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
456 | }, | 452 | }, |
457 | }; | 453 | }; |
@@ -498,6 +494,10 @@ static void __init armadillo5x0_init(void) | |||
498 | 494 | ||
499 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 495 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
500 | 496 | ||
497 | armadillo5x0_smc911x_resources[1].start = | ||
498 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
499 | armadillo5x0_smc911x_resources[1].end = | ||
500 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
501 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 501 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
502 | imx_add_gpio_keys(&armadillo5x0_button_data); | 502 | imx_add_gpio_keys(&armadillo5x0_button_data); |
503 | imx31_add_imx_i2c1(NULL); | 503 | imx31_add_imx_i2c1(NULL); |
@@ -513,7 +513,7 @@ static void __init armadillo5x0_init(void) | |||
513 | imx31_add_mxc_mmc(0, &sdhc_pdata); | 513 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
514 | 514 | ||
515 | /* Register FB */ | 515 | /* Register FB */ |
516 | imx31_add_ipu_core(&mx3_ipu_data); | 516 | imx31_add_ipu_core(); |
517 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 517 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
518 | 518 | ||
519 | /* Register NOR Flash */ | 519 | /* Register NOR Flash */ |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 9a3b06e688c5..2bb9e18d9ee1 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -169,28 +169,28 @@ static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = { | |||
169 | static struct plat_serial8250_port serial_platform_data[] = { | 169 | static struct plat_serial8250_port serial_platform_data[] = { |
170 | { | 170 | { |
171 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x200000), | 171 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x200000), |
172 | .irq = IRQ_GPIOB(23), | 172 | /* irq number is run-time assigned */ |
173 | .uartclk = 14745600, | 173 | .uartclk = 14745600, |
174 | .regshift = 1, | 174 | .regshift = 1, |
175 | .iotype = UPIO_MEM, | 175 | .iotype = UPIO_MEM, |
176 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 176 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
177 | }, { | 177 | }, { |
178 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x400000), | 178 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x400000), |
179 | .irq = IRQ_GPIOB(22), | 179 | /* irq number is run-time assigned */ |
180 | .uartclk = 14745600, | 180 | .uartclk = 14745600, |
181 | .regshift = 1, | 181 | .regshift = 1, |
182 | .iotype = UPIO_MEM, | 182 | .iotype = UPIO_MEM, |
183 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 183 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
184 | }, { | 184 | }, { |
185 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x800000), | 185 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x800000), |
186 | .irq = IRQ_GPIOB(27), | 186 | /* irq number is run-time assigned */ |
187 | .uartclk = 14745600, | 187 | .uartclk = 14745600, |
188 | .regshift = 1, | 188 | .regshift = 1, |
189 | .iotype = UPIO_MEM, | 189 | .iotype = UPIO_MEM, |
190 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 190 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
191 | }, { | 191 | }, { |
192 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x1000000), | 192 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x1000000), |
193 | .irq = IRQ_GPIOB(30), | 193 | /* irq number is run-time assigned */ |
194 | .uartclk = 14745600, | 194 | .uartclk = 14745600, |
195 | .regshift = 1, | 195 | .regshift = 1, |
196 | .iotype = UPIO_MEM, | 196 | .iotype = UPIO_MEM, |
@@ -279,6 +279,10 @@ static void __init eukrea_cpuimx27_init(void) | |||
279 | #endif | 279 | #endif |
280 | 280 | ||
281 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 281 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
282 | serial_platform_data[0].irq = IMX_GPIO_NR(2, 23); | ||
283 | serial_platform_data[1].irq = IMX_GPIO_NR(2, 22); | ||
284 | serial_platform_data[2].irq = IMX_GPIO_NR(2, 27); | ||
285 | serial_platform_data[3].irq = IMX_GPIO_NR(2, 30); | ||
282 | platform_device_register(&serial_device); | 286 | platform_device_register(&serial_device); |
283 | #endif | 287 | #endif |
284 | 288 | ||
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 1634e54ffed5..d49b0ec6bdec 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -71,7 +71,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | |||
71 | }, { | 71 | }, { |
72 | I2C_BOARD_INFO("tsc2007", 0x48), | 72 | I2C_BOARD_INFO("tsc2007", 0x48), |
73 | .platform_data = &tsc2007_info, | 73 | .platform_data = &tsc2007_info, |
74 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), | 74 | /* irq number is run-time assigned */ |
75 | }, | 75 | }, |
76 | }; | 76 | }; |
77 | 77 | ||
@@ -172,6 +172,7 @@ static void __init eukrea_cpuimx35_init(void) | |||
172 | imx35_add_imx_uart0(&uart_pdata); | 172 | imx35_add_imx_uart0(&uart_pdata); |
173 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); | 173 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); |
174 | 174 | ||
175 | eukrea_cpuimx35_i2c_devices[1].irq = gpio_to_irq(TSC2007_IRQGPIO); | ||
175 | i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices, | 176 | i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices, |
176 | ARRAY_SIZE(eukrea_cpuimx35_i2c_devices)); | 177 | ARRAY_SIZE(eukrea_cpuimx35_i2c_devices)); |
177 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); | 178 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); |
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c index e78b40b41462..b87cc49ab1e8 100644 --- a/arch/arm/mach-imx/mach-cpuimx51sd.c +++ b/arch/arm/mach-imx/mach-cpuimx51sd.c | |||
@@ -258,7 +258,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = { | |||
258 | .mode = SPI_MODE_0, | 258 | .mode = SPI_MODE_0, |
259 | .chip_select = 0, | 259 | .chip_select = 0, |
260 | .platform_data = &mcp251x_info, | 260 | .platform_data = &mcp251x_info, |
261 | .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO) | 261 | /* irq number is run-time assigned */ |
262 | }, | 262 | }, |
263 | }; | 263 | }; |
264 | 264 | ||
@@ -309,6 +309,7 @@ static void __init eukrea_cpuimx51sd_init(void) | |||
309 | msleep(20); | 309 | msleep(20); |
310 | gpio_set_value(CAN_RST, 1); | 310 | gpio_set_value(CAN_RST, 1); |
311 | imx51_add_ecspi(0, &cpuimx51sd_ecspi1_pdata); | 311 | imx51_add_ecspi(0, &cpuimx51sd_ecspi1_pdata); |
312 | cpuimx51sd_spi_device[0].irq = gpio_to_irq(CAN_IRQGPIO); | ||
312 | spi_register_board_info(cpuimx51sd_spi_device, | 313 | spi_register_board_info(cpuimx51sd_spi_device, |
313 | ARRAY_SIZE(cpuimx51sd_spi_device)); | 314 | ARRAY_SIZE(cpuimx51sd_spi_device)); |
314 | 315 | ||
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index ba09552fe5fe..f264ddddd47c 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
41 | #include <asm/system_info.h> | 41 | #include <asm/system_info.h> |
42 | #include <mach/common.h> | 42 | #include <mach/common.h> |
43 | #include <mach/hardware.h> | ||
43 | #include <mach/iomux-mx27.h> | 44 | #include <mach/iomux-mx27.h> |
44 | 45 | ||
45 | #include "devices-imx27.h" | 46 | #include "devices-imx27.h" |
@@ -47,7 +48,7 @@ | |||
47 | #define TVP5150_RSTN (GPIO_PORTC + 18) | 48 | #define TVP5150_RSTN (GPIO_PORTC + 18) |
48 | #define TVP5150_PWDN (GPIO_PORTC + 19) | 49 | #define TVP5150_PWDN (GPIO_PORTC + 19) |
49 | #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17) | 50 | #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17) |
50 | #define SDHC1_IRQ IRQ_GPIOB(25) | 51 | #define SDHC1_IRQ_GPIO IMX_GPIO_NR(2, 25) |
51 | 52 | ||
52 | #define MOTHERBOARD_BIT2 (GPIO_PORTD + 31) | 53 | #define MOTHERBOARD_BIT2 (GPIO_PORTD + 31) |
53 | #define MOTHERBOARD_BIT1 (GPIO_PORTD + 30) | 54 | #define MOTHERBOARD_BIT1 (GPIO_PORTD + 30) |
@@ -307,14 +308,14 @@ static int visstrim_m10_sdhc1_init(struct device *dev, | |||
307 | { | 308 | { |
308 | int ret; | 309 | int ret; |
309 | 310 | ||
310 | ret = request_irq(SDHC1_IRQ, detect_irq, IRQF_TRIGGER_FALLING, | 311 | ret = request_irq(gpio_to_irq(SDHC1_IRQ_GPIO), detect_irq, |
311 | "mmc-detect", data); | 312 | IRQF_TRIGGER_FALLING, "mmc-detect", data); |
312 | return ret; | 313 | return ret; |
313 | } | 314 | } |
314 | 315 | ||
315 | static void visstrim_m10_sdhc1_exit(struct device *dev, void *data) | 316 | static void visstrim_m10_sdhc1_exit(struct device *dev, void *data) |
316 | { | 317 | { |
317 | free_irq(SDHC1_IRQ, data); | 318 | free_irq(gpio_to_irq(SDHC1_IRQ_GPIO), data); |
318 | } | 319 | } |
319 | 320 | ||
320 | static const struct imxmmc_platform_data visstrim_m10_sdhc_pdata __initconst = { | 321 | static const struct imxmmc_platform_data visstrim_m10_sdhc_pdata __initconst = { |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 140f55010630..426d2087c460 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/irqdomain.h> | ||
20 | #include <linux/of.h> | 19 | #include <linux/of.h> |
21 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
22 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
@@ -177,21 +176,8 @@ static void __init imx6q_map_io(void) | |||
177 | imx6q_clock_map_io(); | 176 | imx6q_clock_map_io(); |
178 | } | 177 | } |
179 | 178 | ||
180 | static int __init imx6q_gpio_add_irq_domain(struct device_node *np, | ||
181 | struct device_node *interrupt_parent) | ||
182 | { | ||
183 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; | ||
184 | |||
185 | gpio_irq_base -= 32; | ||
186 | irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, | ||
187 | NULL); | ||
188 | |||
189 | return 0; | ||
190 | } | ||
191 | |||
192 | static const struct of_device_id imx6q_irq_match[] __initconst = { | 179 | static const struct of_device_id imx6q_irq_match[] __initconst = { |
193 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | 180 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, |
194 | { .compatible = "fsl,imx6q-gpio", .data = imx6q_gpio_add_irq_domain, }, | ||
195 | { /* sentinel */ } | 181 | { /* sentinel */ } |
196 | }; | 182 | }; |
197 | 183 | ||
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index 15a26e908260..5d08533ab2c7 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
@@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
73 | { | 73 | { |
74 | .membase = KZM_ARM11_IO_ADDRESS(KZM_ARM11_16550), | 74 | .membase = KZM_ARM11_IO_ADDRESS(KZM_ARM11_16550), |
75 | .mapbase = KZM_ARM11_16550, | 75 | .mapbase = KZM_ARM11_16550, |
76 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), | 76 | /* irq number is run-time assigned */ |
77 | .irqflags = IRQ_TYPE_EDGE_RISING, | 77 | .irqflags = IRQ_TYPE_EDGE_RISING, |
78 | .uartclk = 14745600, | 78 | .uartclk = 14745600, |
79 | .regshift = 0, | 79 | .regshift = 0, |
@@ -91,8 +91,7 @@ static struct resource serial8250_resources[] = { | |||
91 | .flags = IORESOURCE_MEM, | 91 | .flags = IORESOURCE_MEM, |
92 | }, | 92 | }, |
93 | { | 93 | { |
94 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), | 94 | /* irq number is run-time assigned */ |
95 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), | ||
96 | .flags = IORESOURCE_IRQ, | 95 | .flags = IORESOURCE_IRQ, |
97 | }, | 96 | }, |
98 | }; | 97 | }; |
@@ -125,6 +124,13 @@ static int __init kzm_init_ext_uart(void) | |||
125 | tmp |= 0x2; | 124 | tmp |= 0x2; |
126 | __raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1)); | 125 | __raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1)); |
127 | 126 | ||
127 | serial_platform_data[0].irq = | ||
128 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
129 | serial8250_resources[1].start = | ||
130 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
131 | serial8250_resources[1].end = | ||
132 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
133 | |||
128 | return platform_device_register(&serial_device); | 134 | return platform_device_register(&serial_device); |
129 | } | 135 | } |
130 | #else | 136 | #else |
@@ -152,8 +158,7 @@ static struct resource kzm_smsc9118_resources[] = { | |||
152 | .flags = IORESOURCE_MEM, | 158 | .flags = IORESOURCE_MEM, |
153 | }, | 159 | }, |
154 | { | 160 | { |
155 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_2), | 161 | /* irq number is run-time assigned */ |
156 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_2), | ||
157 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 162 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
158 | }, | 163 | }, |
159 | }; | 164 | }; |
@@ -184,6 +189,11 @@ static int __init kzm_init_smsc9118(void) | |||
184 | 189 | ||
185 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 190 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
186 | 191 | ||
192 | kzm_smsc9118_resources[1].start = | ||
193 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2)); | ||
194 | kzm_smsc9118_resources[1].end = | ||
195 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2)); | ||
196 | |||
187 | return platform_device_register(&kzm_smsc9118_device); | 197 | return platform_device_register(&kzm_smsc9118_device); |
188 | } | 198 | } |
189 | #else | 199 | #else |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 7274e7928136..667f359a2e8b 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/iomux-mx1.h> | 28 | #include <mach/iomux-mx1.h> |
29 | #include <mach/irqs.h> | ||
30 | 29 | ||
31 | #include "devices-imx1.h" | 30 | #include "devices-imx1.h" |
32 | 31 | ||
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 3e7401fca76c..ed22e3fe6ec8 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -38,7 +38,7 @@ | |||
38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | 38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) |
39 | 39 | ||
40 | #define MX21ADS_CS8900A_MMIO_SIZE 0x200000 | 40 | #define MX21ADS_CS8900A_MMIO_SIZE 0x200000 |
41 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) | 41 | #define MX21ADS_CS8900A_IRQ_GPIO IMX_GPIO_NR(5, 11) |
42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) | 42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) |
43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) | 43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) |
44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) | 44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) |
@@ -159,9 +159,10 @@ static struct platform_device mx21ads_nor_mtd_device = { | |||
159 | .resource = &mx21ads_flash_resource, | 159 | .resource = &mx21ads_flash_resource, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static const struct resource mx21ads_cs8900_resources[] __initconst = { | 162 | static struct resource mx21ads_cs8900_resources[] __initdata = { |
163 | DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), | 163 | DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), |
164 | DEFINE_RES_IRQ(MX21ADS_CS8900A_IRQ), | 164 | /* irq number is run-time assigned */ |
165 | DEFINE_RES_IRQ(-1), | ||
165 | }; | 166 | }; |
166 | 167 | ||
167 | static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = { | 168 | static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = { |
@@ -241,13 +242,13 @@ static int mx21ads_sdhc_get_ro(struct device *dev) | |||
241 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, | 242 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, |
242 | void *data) | 243 | void *data) |
243 | { | 244 | { |
244 | return request_irq(IRQ_GPIOD(25), detect_irq, | 245 | return request_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), detect_irq, |
245 | IRQF_TRIGGER_FALLING, "mmc-detect", data); | 246 | IRQF_TRIGGER_FALLING, "mmc-detect", data); |
246 | } | 247 | } |
247 | 248 | ||
248 | static void mx21ads_sdhc_exit(struct device *dev, void *data) | 249 | static void mx21ads_sdhc_exit(struct device *dev, void *data) |
249 | { | 250 | { |
250 | free_irq(IRQ_GPIOD(25), data); | 251 | free_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), data); |
251 | } | 252 | } |
252 | 253 | ||
253 | static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { | 254 | static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { |
@@ -304,6 +305,11 @@ static void __init mx21ads_board_init(void) | |||
304 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 305 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
305 | 306 | ||
306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 307 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
308 | |||
309 | mx21ads_cs8900_resources[1].start = | ||
310 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); | ||
311 | mx21ads_cs8900_resources[1].end = | ||
312 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); | ||
307 | platform_device_register_full(&mx21ads_cs8900_devinfo); | 313 | platform_device_register_full(&mx21ads_cs8900_devinfo); |
308 | } | 314 | } |
309 | 315 | ||
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index ce9a5c26290c..58c24c1a7ab7 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <mach/common.h> | 40 | #include <mach/common.h> |
41 | #include <mach/iomux-mx27.h> | 41 | #include <mach/iomux-mx27.h> |
42 | #include <mach/ulpi.h> | 42 | #include <mach/ulpi.h> |
43 | #include <mach/irqs.h> | ||
44 | #include <mach/3ds_debugboard.h> | 43 | #include <mach/3ds_debugboard.h> |
45 | 44 | ||
46 | #include "devices-imx27.h" | 45 | #include "devices-imx27.h" |
@@ -48,7 +47,6 @@ | |||
48 | #define SD1_EN_GPIO IMX_GPIO_NR(2, 25) | 47 | #define SD1_EN_GPIO IMX_GPIO_NR(2, 25) |
49 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) | 48 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) |
50 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) | 49 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) |
51 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) | ||
52 | #define PMIC_INT IMX_GPIO_NR(3, 14) | 50 | #define PMIC_INT IMX_GPIO_NR(3, 14) |
53 | #define SPI1_SS0 IMX_GPIO_NR(4, 28) | 51 | #define SPI1_SS0 IMX_GPIO_NR(4, 28) |
54 | #define SD1_CD IMX_GPIO_NR(2, 26) | 52 | #define SD1_CD IMX_GPIO_NR(2, 26) |
@@ -445,7 +443,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
445 | .bus_num = 1, | 443 | .bus_num = 1, |
446 | .chip_select = 0, /* SS0 */ | 444 | .chip_select = 0, /* SS0 */ |
447 | .platform_data = &mc13783_pdata, | 445 | .platform_data = &mc13783_pdata, |
448 | .irq = IMX_GPIO_TO_IRQ(PMIC_INT), | 446 | /* irq number is run-time assigned */ |
449 | .mode = SPI_CS_HIGH, | 447 | .mode = SPI_CS_HIGH, |
450 | }, { | 448 | }, { |
451 | .modalias = "l4f00242t03", | 449 | .modalias = "l4f00242t03", |
@@ -496,10 +494,11 @@ static void __init mx27pdk_init(void) | |||
496 | 494 | ||
497 | imx27_add_spi_imx1(&spi2_pdata); | 495 | imx27_add_spi_imx1(&spi2_pdata); |
498 | imx27_add_spi_imx0(&spi1_pdata); | 496 | imx27_add_spi_imx0(&spi1_pdata); |
497 | mx27_3ds_spi_devs[0].irq = gpio_to_irq(PMIC_INT); | ||
499 | spi_register_board_info(mx27_3ds_spi_devs, | 498 | spi_register_board_info(mx27_3ds_spi_devs, |
500 | ARRAY_SIZE(mx27_3ds_spi_devs)); | 499 | ARRAY_SIZE(mx27_3ds_spi_devs)); |
501 | 500 | ||
502 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 501 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, IMX_GPIO_NR(3, 28))) |
503 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); | 502 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); |
504 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); | 503 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); |
505 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 504 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 7936bb32264d..7dc59bac0e55 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -246,25 +246,25 @@ static const struct imx_fb_platform_data mx27ads_fb_data __initconst = { | |||
246 | static int mx27ads_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 246 | static int mx27ads_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
247 | void *data) | 247 | void *data) |
248 | { | 248 | { |
249 | return request_irq(IRQ_GPIOE(21), detect_irq, IRQF_TRIGGER_RISING, | 249 | return request_irq(gpio_to_irq(IMX_GPIO_NR(5, 21)), detect_irq, |
250 | "sdhc1-card-detect", data); | 250 | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); |
251 | } | 251 | } |
252 | 252 | ||
253 | static int mx27ads_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | 253 | static int mx27ads_sdhc2_init(struct device *dev, irq_handler_t detect_irq, |
254 | void *data) | 254 | void *data) |
255 | { | 255 | { |
256 | return request_irq(IRQ_GPIOB(7), detect_irq, IRQF_TRIGGER_RISING, | 256 | return request_irq(gpio_to_irq(IMX_GPIO_NR(2, 7)), detect_irq, |
257 | "sdhc2-card-detect", data); | 257 | IRQF_TRIGGER_RISING, "sdhc2-card-detect", data); |
258 | } | 258 | } |
259 | 259 | ||
260 | static void mx27ads_sdhc1_exit(struct device *dev, void *data) | 260 | static void mx27ads_sdhc1_exit(struct device *dev, void *data) |
261 | { | 261 | { |
262 | free_irq(IRQ_GPIOE(21), data); | 262 | free_irq(gpio_to_irq(IMX_GPIO_NR(5, 21)), data); |
263 | } | 263 | } |
264 | 264 | ||
265 | static void mx27ads_sdhc2_exit(struct device *dev, void *data) | 265 | static void mx27ads_sdhc2_exit(struct device *dev, void *data) |
266 | { | 266 | { |
267 | free_irq(IRQ_GPIOB(7), data); | 267 | free_irq(gpio_to_irq(IMX_GPIO_NR(2, 7)), data); |
268 | } | 268 | } |
269 | 269 | ||
270 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 270 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 928e1dcbc6a7..8915f937b7d5 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -44,9 +44,6 @@ | |||
44 | 44 | ||
45 | #include "devices-imx31.h" | 45 | #include "devices-imx31.h" |
46 | 46 | ||
47 | /* CPLD IRQ line for external uart, external ethernet etc */ | ||
48 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) | ||
49 | |||
50 | static int mx31_3ds_pins[] = { | 47 | static int mx31_3ds_pins[] = { |
51 | /* UART1 */ | 48 | /* UART1 */ |
52 | MX31_PIN_CTS1__CTS1, | 49 | MX31_PIN_CTS1__CTS1, |
@@ -277,10 +274,6 @@ static const struct fb_videomode fb_modedb[] = { | |||
277 | }, | 274 | }, |
278 | }; | 275 | }; |
279 | 276 | ||
280 | static struct ipu_platform_data mx3_ipu_data = { | ||
281 | .irq_base = MXC_IPU_IRQ_START, | ||
282 | }; | ||
283 | |||
284 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 277 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
285 | .name = "Epson-VGA", | 278 | .name = "Epson-VGA", |
286 | .mode = fb_modedb, | 279 | .mode = fb_modedb, |
@@ -317,7 +310,7 @@ static int mx31_3ds_sdhc1_init(struct device *dev, | |||
317 | return ret; | 310 | return ret; |
318 | } | 311 | } |
319 | 312 | ||
320 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 313 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), |
321 | detect_irq, IRQF_DISABLED | | 314 | detect_irq, IRQF_DISABLED | |
322 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | 315 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, |
323 | "sdhc1-detect", data); | 316 | "sdhc1-detect", data); |
@@ -336,7 +329,7 @@ gpio_free: | |||
336 | 329 | ||
337 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) | 330 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) |
338 | { | 331 | { |
339 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), data); | 332 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), data); |
340 | gpio_free_array(mx31_3ds_sdhc1_gpios, | 333 | gpio_free_array(mx31_3ds_sdhc1_gpios, |
341 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); | 334 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); |
342 | } | 335 | } |
@@ -539,7 +532,7 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
539 | .bus_num = 1, | 532 | .bus_num = 1, |
540 | .chip_select = 1, /* SS2 */ | 533 | .chip_select = 1, /* SS2 */ |
541 | .platform_data = &mc13783_pdata, | 534 | .platform_data = &mc13783_pdata, |
542 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | 535 | /* irq number is run-time assigned */ |
543 | .mode = SPI_CS_HIGH, | 536 | .mode = SPI_CS_HIGH, |
544 | }, { | 537 | }, { |
545 | .modalias = "l4f00242t03", | 538 | .modalias = "l4f00242t03", |
@@ -714,6 +707,7 @@ static void __init mx31_3ds_init(void) | |||
714 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); | 707 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); |
715 | 708 | ||
716 | imx31_add_spi_imx1(&spi1_pdata); | 709 | imx31_add_spi_imx1(&spi1_pdata); |
710 | mx31_3ds_spi_devs[0].irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
717 | spi_register_board_info(mx31_3ds_spi_devs, | 711 | spi_register_board_info(mx31_3ds_spi_devs, |
718 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 712 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
719 | 713 | ||
@@ -736,7 +730,7 @@ static void __init mx31_3ds_init(void) | |||
736 | if (!otg_mode_host) | 730 | if (!otg_mode_host) |
737 | imx31_add_fsl_usb2_udc(&usbotg_pdata); | 731 | imx31_add_fsl_usb2_udc(&usbotg_pdata); |
738 | 732 | ||
739 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 733 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, IOMUX_TO_GPIO(MX31_PIN_GPIO1_1))) |
740 | printk(KERN_WARNING "Init of the debug board failed, all " | 734 | printk(KERN_WARNING "Init of the debug board failed, all " |
741 | "devices on the debug board are unusable.\n"); | 735 | "devices on the debug board are unusable.\n"); |
742 | imx31_add_imx2_wdt(); | 736 | imx31_add_imx2_wdt(); |
@@ -744,7 +738,7 @@ static void __init mx31_3ds_init(void) | |||
744 | imx31_add_mxc_mmc(0, &sdhc1_pdata); | 738 | imx31_add_mxc_mmc(0, &sdhc1_pdata); |
745 | 739 | ||
746 | imx31_add_spi_imx0(&spi0_pdata); | 740 | imx31_add_spi_imx0(&spi0_pdata); |
747 | imx31_add_ipu_core(&mx3_ipu_data); | 741 | imx31_add_ipu_core(); |
748 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 742 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
749 | 743 | ||
750 | /* CSI */ | 744 | /* CSI */ |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 4518e5448227..d37f4809c556 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/irqdomain.h> | ||
24 | 25 | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -62,20 +63,18 @@ | |||
62 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) | 63 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) |
63 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) | 64 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) |
64 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | 65 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) |
65 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | ||
66 | 66 | ||
67 | #define MXC_EXP_IO_BASE MXC_BOARD_IRQ_START | 67 | #define EXPIO_INT_XUART_INTA 10 |
68 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | 68 | #define EXPIO_INT_XUART_INTB 11 |
69 | |||
70 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) | ||
71 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) | ||
72 | 69 | ||
73 | #define MXC_MAX_EXP_IO_LINES 16 | 70 | #define MXC_MAX_EXP_IO_LINES 16 |
74 | 71 | ||
75 | /* CS8900 */ | 72 | /* CS8900 */ |
76 | #define EXPIO_INT_ENET_INT (MXC_EXP_IO_BASE + 8) | 73 | #define EXPIO_INT_ENET_INT 8 |
77 | #define CS4_CS8900_MMIO_START 0x20000 | 74 | #define CS4_CS8900_MMIO_START 0x20000 |
78 | 75 | ||
76 | static struct irq_domain *domain; | ||
77 | |||
79 | /* | 78 | /* |
80 | * The serial port definition structure. | 79 | * The serial port definition structure. |
81 | */ | 80 | */ |
@@ -83,7 +82,6 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
83 | { | 82 | { |
84 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), | 83 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), |
85 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTA), | 84 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTA), |
86 | .irq = EXPIO_INT_XUART_INTA, | ||
87 | .uartclk = 14745600, | 85 | .uartclk = 14745600, |
88 | .regshift = 0, | 86 | .regshift = 0, |
89 | .iotype = UPIO_MEM, | 87 | .iotype = UPIO_MEM, |
@@ -91,7 +89,6 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
91 | }, { | 89 | }, { |
92 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), | 90 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), |
93 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTB), | 91 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTB), |
94 | .irq = EXPIO_INT_XUART_INTB, | ||
95 | .uartclk = 14745600, | 92 | .uartclk = 14745600, |
96 | .regshift = 0, | 93 | .regshift = 0, |
97 | .iotype = UPIO_MEM, | 94 | .iotype = UPIO_MEM, |
@@ -108,9 +105,9 @@ static struct platform_device serial_device = { | |||
108 | }, | 105 | }, |
109 | }; | 106 | }; |
110 | 107 | ||
111 | static const struct resource mx31ads_cs8900_resources[] __initconst = { | 108 | static struct resource mx31ads_cs8900_resources[] __initdata = { |
112 | DEFINE_RES_MEM(MX31_CS4_BASE_ADDR + CS4_CS8900_MMIO_START, SZ_64K), | 109 | DEFINE_RES_MEM(MX31_CS4_BASE_ADDR + CS4_CS8900_MMIO_START, SZ_64K), |
113 | DEFINE_RES_IRQ(EXPIO_INT_ENET_INT), | 110 | DEFINE_RES_IRQ(-1), |
114 | }; | 111 | }; |
115 | 112 | ||
116 | static const struct platform_device_info mx31ads_cs8900_devinfo __initconst = { | 113 | static const struct platform_device_info mx31ads_cs8900_devinfo __initconst = { |
@@ -122,11 +119,19 @@ static const struct platform_device_info mx31ads_cs8900_devinfo __initconst = { | |||
122 | 119 | ||
123 | static int __init mxc_init_extuart(void) | 120 | static int __init mxc_init_extuart(void) |
124 | { | 121 | { |
122 | serial_platform_data[0].irq = irq_find_mapping(domain, | ||
123 | EXPIO_INT_XUART_INTA); | ||
124 | serial_platform_data[1].irq = irq_find_mapping(domain, | ||
125 | EXPIO_INT_XUART_INTB); | ||
125 | return platform_device_register(&serial_device); | 126 | return platform_device_register(&serial_device); |
126 | } | 127 | } |
127 | 128 | ||
128 | static void __init mxc_init_ext_ethernet(void) | 129 | static void __init mxc_init_ext_ethernet(void) |
129 | { | 130 | { |
131 | mx31ads_cs8900_resources[1].start = | ||
132 | irq_find_mapping(domain, EXPIO_INT_ENET_INT); | ||
133 | mx31ads_cs8900_resources[1].end = | ||
134 | irq_find_mapping(domain, EXPIO_INT_ENET_INT); | ||
130 | platform_device_register_full( | 135 | platform_device_register_full( |
131 | (struct platform_device_info *)&mx31ads_cs8900_devinfo); | 136 | (struct platform_device_info *)&mx31ads_cs8900_devinfo); |
132 | } | 137 | } |
@@ -157,12 +162,12 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
157 | imr_val = __raw_readw(PBC_INTMASK_SET_REG); | 162 | imr_val = __raw_readw(PBC_INTMASK_SET_REG); |
158 | int_valid = __raw_readw(PBC_INTSTATUS_REG) & imr_val; | 163 | int_valid = __raw_readw(PBC_INTSTATUS_REG) & imr_val; |
159 | 164 | ||
160 | expio_irq = MXC_EXP_IO_BASE; | 165 | expio_irq = 0; |
161 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { | 166 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { |
162 | if ((int_valid & 1) == 0) | 167 | if ((int_valid & 1) == 0) |
163 | continue; | 168 | continue; |
164 | 169 | ||
165 | generic_handle_irq(expio_irq); | 170 | generic_handle_irq(irq_find_mapping(domain, expio_irq)); |
166 | } | 171 | } |
167 | } | 172 | } |
168 | 173 | ||
@@ -172,7 +177,7 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
172 | */ | 177 | */ |
173 | static void expio_mask_irq(struct irq_data *d) | 178 | static void expio_mask_irq(struct irq_data *d) |
174 | { | 179 | { |
175 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); | 180 | u32 expio = d->hwirq; |
176 | /* mask the interrupt */ | 181 | /* mask the interrupt */ |
177 | __raw_writew(1 << expio, PBC_INTMASK_CLEAR_REG); | 182 | __raw_writew(1 << expio, PBC_INTMASK_CLEAR_REG); |
178 | __raw_readw(PBC_INTMASK_CLEAR_REG); | 183 | __raw_readw(PBC_INTMASK_CLEAR_REG); |
@@ -184,7 +189,7 @@ static void expio_mask_irq(struct irq_data *d) | |||
184 | */ | 189 | */ |
185 | static void expio_ack_irq(struct irq_data *d) | 190 | static void expio_ack_irq(struct irq_data *d) |
186 | { | 191 | { |
187 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); | 192 | u32 expio = d->hwirq; |
188 | /* clear the interrupt status */ | 193 | /* clear the interrupt status */ |
189 | __raw_writew(1 << expio, PBC_INTSTATUS_REG); | 194 | __raw_writew(1 << expio, PBC_INTSTATUS_REG); |
190 | } | 195 | } |
@@ -195,7 +200,7 @@ static void expio_ack_irq(struct irq_data *d) | |||
195 | */ | 200 | */ |
196 | static void expio_unmask_irq(struct irq_data *d) | 201 | static void expio_unmask_irq(struct irq_data *d) |
197 | { | 202 | { |
198 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); | 203 | u32 expio = d->hwirq; |
199 | /* unmask the interrupt */ | 204 | /* unmask the interrupt */ |
200 | __raw_writew(1 << expio, PBC_INTMASK_SET_REG); | 205 | __raw_writew(1 << expio, PBC_INTMASK_SET_REG); |
201 | } | 206 | } |
@@ -209,7 +214,8 @@ static struct irq_chip expio_irq_chip = { | |||
209 | 214 | ||
210 | static void __init mx31ads_init_expio(void) | 215 | static void __init mx31ads_init_expio(void) |
211 | { | 216 | { |
212 | int i; | 217 | int irq_base; |
218 | int i, irq; | ||
213 | 219 | ||
214 | printk(KERN_INFO "MX31ADS EXPIO(CPLD) hardware\n"); | 220 | printk(KERN_INFO "MX31ADS EXPIO(CPLD) hardware\n"); |
215 | 221 | ||
@@ -221,13 +227,21 @@ static void __init mx31ads_init_expio(void) | |||
221 | /* disable the interrupt and clear the status */ | 227 | /* disable the interrupt and clear the status */ |
222 | __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG); | 228 | __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG); |
223 | __raw_writew(0xFFFF, PBC_INTSTATUS_REG); | 229 | __raw_writew(0xFFFF, PBC_INTSTATUS_REG); |
224 | for (i = MXC_EXP_IO_BASE; i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES); | 230 | |
225 | i++) { | 231 | irq_base = irq_alloc_descs(-1, 0, MXC_MAX_EXP_IO_LINES, numa_node_id()); |
232 | WARN_ON(irq_base < 0); | ||
233 | |||
234 | domain = irq_domain_add_legacy(NULL, MXC_MAX_EXP_IO_LINES, irq_base, 0, | ||
235 | &irq_domain_simple_ops, NULL); | ||
236 | WARN_ON(!domain); | ||
237 | |||
238 | for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) { | ||
226 | irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq); | 239 | irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq); |
227 | set_irq_flags(i, IRQF_VALID); | 240 | set_irq_flags(i, IRQF_VALID); |
228 | } | 241 | } |
229 | irq_set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_HIGH); | 242 | irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_4)); |
230 | irq_set_chained_handler(EXPIO_PARENT_INT, mx31ads_expio_irq_handler); | 243 | irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH); |
244 | irq_set_chained_handler(irq, mx31ads_expio_irq_handler); | ||
231 | } | 245 | } |
232 | 246 | ||
233 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | 247 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 |
@@ -479,7 +493,6 @@ static int mx31_wm8350_init(struct wm8350 *wm8350) | |||
479 | 493 | ||
480 | static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { | 494 | static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { |
481 | .init = mx31_wm8350_init, | 495 | .init = mx31_wm8350_init, |
482 | .irq_base = MXC_BOARD_IRQ_START + MXC_MAX_EXP_IO_LINES, | ||
483 | }; | 496 | }; |
484 | #endif | 497 | #endif |
485 | 498 | ||
@@ -488,13 +501,17 @@ static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { | |||
488 | { | 501 | { |
489 | I2C_BOARD_INFO("wm8350", 0x1a), | 502 | I2C_BOARD_INFO("wm8350", 0x1a), |
490 | .platform_data = &mx31_wm8350_pdata, | 503 | .platform_data = &mx31_wm8350_pdata, |
491 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | 504 | /* irq number is run-time assigned */ |
492 | }, | 505 | }, |
493 | #endif | 506 | #endif |
494 | }; | 507 | }; |
495 | 508 | ||
496 | static void __init mxc_init_i2c(void) | 509 | static void __init mxc_init_i2c(void) |
497 | { | 510 | { |
511 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | ||
512 | mx31ads_i2c1_devices[0].irq = | ||
513 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
514 | #endif | ||
498 | i2c_register_board_info(1, mx31ads_i2c1_devices, | 515 | i2c_register_board_info(1, mx31ads_i2c1_devices, |
499 | ARRAY_SIZE(mx31ads_i2c1_devices)); | 516 | ARRAY_SIZE(mx31ads_i2c1_devices)); |
500 | 517 | ||
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 83714b0cc290..34b9bf075daf 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -65,8 +65,7 @@ static struct resource smsc91x_resources[] = { | |||
65 | .flags = IORESOURCE_MEM, | 65 | .flags = IORESOURCE_MEM, |
66 | }, | 66 | }, |
67 | { | 67 | { |
68 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | 68 | /* irq number is run-time assigned */ |
69 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
70 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | 69 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, |
71 | } | 70 | } |
72 | }; | 71 | }; |
@@ -233,7 +232,7 @@ static struct spi_board_info mc13783_dev __initdata = { | |||
233 | .bus_num = 1, | 232 | .bus_num = 1, |
234 | .chip_select = 0, | 233 | .chip_select = 0, |
235 | .platform_data = &mc13783_pdata, | 234 | .platform_data = &mc13783_pdata, |
236 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | 235 | /* irq number is run-time assigned */ |
237 | }; | 236 | }; |
238 | 237 | ||
239 | static struct platform_device *devices[] __initdata = { | 238 | static struct platform_device *devices[] __initdata = { |
@@ -285,10 +284,15 @@ static void __init mx31lilly_board_init(void) | |||
285 | 284 | ||
286 | imx31_add_spi_imx0(&spi0_pdata); | 285 | imx31_add_spi_imx0(&spi0_pdata); |
287 | imx31_add_spi_imx1(&spi1_pdata); | 286 | imx31_add_spi_imx1(&spi1_pdata); |
287 | mc13783_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
288 | spi_register_board_info(&mc13783_dev, 1); | 288 | spi_register_board_info(&mc13783_dev, 1); |
289 | 289 | ||
290 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 290 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
291 | 291 | ||
292 | smsc91x_resources[1].start = | ||
293 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
294 | smsc91x_resources[1].end = | ||
295 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
292 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 296 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
293 | 297 | ||
294 | /* USB */ | 298 | /* USB */ |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index 686c60587980..c8785b39eaed 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <mach/common.h> | 43 | #include <mach/common.h> |
44 | #include <mach/board-mx31lite.h> | 44 | #include <mach/board-mx31lite.h> |
45 | #include <mach/iomux-mx3.h> | 45 | #include <mach/iomux-mx3.h> |
46 | #include <mach/irqs.h> | ||
47 | #include <mach/ulpi.h> | 46 | #include <mach/ulpi.h> |
48 | 47 | ||
49 | #include "devices-imx31.h" | 48 | #include "devices-imx31.h" |
@@ -83,8 +82,7 @@ static struct resource smsc911x_resources[] = { | |||
83 | .end = MX31_CS4_BASE_ADDR + 0x100, | 82 | .end = MX31_CS4_BASE_ADDR + 0x100, |
84 | .flags = IORESOURCE_MEM, | 83 | .flags = IORESOURCE_MEM, |
85 | }, { | 84 | }, { |
86 | .start = IOMUX_TO_IRQ(MX31_PIN_SFS6), | 85 | /* irq number is run-time assigned */ |
87 | .end = IOMUX_TO_IRQ(MX31_PIN_SFS6), | ||
88 | .flags = IORESOURCE_IRQ, | 86 | .flags = IORESOURCE_IRQ, |
89 | }, | 87 | }, |
90 | }; | 88 | }; |
@@ -124,7 +122,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = { | |||
124 | .bus_num = 1, | 122 | .bus_num = 1, |
125 | .chip_select = 0, | 123 | .chip_select = 0, |
126 | .platform_data = &mc13783_pdata, | 124 | .platform_data = &mc13783_pdata, |
127 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | 125 | /* irq number is run-time assigned */ |
128 | }; | 126 | }; |
129 | 127 | ||
130 | /* | 128 | /* |
@@ -258,6 +256,7 @@ static void __init mx31lite_init(void) | |||
258 | imx31_add_mxc_nand(&mx31lite_nand_board_info); | 256 | imx31_add_mxc_nand(&mx31lite_nand_board_info); |
259 | 257 | ||
260 | imx31_add_spi_imx1(&spi1_pdata); | 258 | imx31_add_spi_imx1(&spi1_pdata); |
259 | mc13783_spi_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
261 | spi_register_board_info(&mc13783_spi_dev, 1); | 260 | spi_register_board_info(&mc13783_spi_dev, 1); |
262 | 261 | ||
263 | /* USB */ | 262 | /* USB */ |
@@ -274,6 +273,10 @@ static void __init mx31lite_init(void) | |||
274 | pr_warning("could not get LAN irq gpio\n"); | 273 | pr_warning("could not get LAN irq gpio\n"); |
275 | else { | 274 | else { |
276 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | 275 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); |
276 | smsc911x_resources[1].start = | ||
277 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | ||
278 | smsc911x_resources[1].end = | ||
279 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | ||
277 | platform_device_register(&smsc911x_device); | 280 | platform_device_register(&smsc911x_device); |
278 | } | 281 | } |
279 | } | 282 | } |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 63e84e67b990..d46290b288ed 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -303,7 +303,7 @@ static struct imx_ssi_platform_data moboard_ssi_pdata = { | |||
303 | static struct spi_board_info moboard_spi_board_info[] __initdata = { | 303 | static struct spi_board_info moboard_spi_board_info[] __initdata = { |
304 | { | 304 | { |
305 | .modalias = "mc13783", | 305 | .modalias = "mc13783", |
306 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | 306 | /* irq number is run-time assigned */ |
307 | .max_speed_hz = 300000, | 307 | .max_speed_hz = 300000, |
308 | .bus_num = 1, | 308 | .bus_num = 1, |
309 | .chip_select = 0, | 309 | .chip_select = 0, |
@@ -473,10 +473,6 @@ static const struct gpio_led_platform_data mx31moboard_led_pdata __initconst = { | |||
473 | .leds = mx31moboard_leds, | 473 | .leds = mx31moboard_leds, |
474 | }; | 474 | }; |
475 | 475 | ||
476 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
477 | .irq_base = MXC_IPU_IRQ_START, | ||
478 | }; | ||
479 | |||
480 | static struct platform_device *devices[] __initdata = { | 476 | static struct platform_device *devices[] __initdata = { |
481 | &mx31moboard_flash, | 477 | &mx31moboard_flash, |
482 | }; | 478 | }; |
@@ -494,7 +490,7 @@ static int __init mx31moboard_init_cam(void) | |||
494 | int dma, ret = -ENOMEM; | 490 | int dma, ret = -ENOMEM; |
495 | struct platform_device *pdev; | 491 | struct platform_device *pdev; |
496 | 492 | ||
497 | imx31_add_ipu_core(&mx3_ipu_data); | 493 | imx31_add_ipu_core(); |
498 | 494 | ||
499 | pdev = imx31_alloc_mx3_camera(&camera_pdata); | 495 | pdev = imx31_alloc_mx3_camera(&camera_pdata); |
500 | if (IS_ERR(pdev)) | 496 | if (IS_ERR(pdev)) |
@@ -557,6 +553,8 @@ static void __init mx31moboard_init(void) | |||
557 | 553 | ||
558 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); | 554 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); |
559 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | 555 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); |
556 | moboard_spi_board_info[0].irq = | ||
557 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
560 | spi_register_board_info(moboard_spi_board_info, | 558 | spi_register_board_info(moboard_spi_board_info, |
561 | ARRAY_SIZE(moboard_spi_board_info)); | 559 | ARRAY_SIZE(moboard_spi_board_info)); |
562 | 560 | ||
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 69018e5c52de..504983c68aa8 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
47 | #include <mach/common.h> | 47 | #include <mach/common.h> |
48 | #include <mach/iomux-mx35.h> | 48 | #include <mach/iomux-mx35.h> |
49 | #include <mach/irqs.h> | ||
50 | #include <mach/3ds_debugboard.h> | 49 | #include <mach/3ds_debugboard.h> |
51 | #include <video/platform_lcd.h> | 50 | #include <video/platform_lcd.h> |
52 | 51 | ||
@@ -80,10 +79,6 @@ static const struct fb_videomode fb_modedb[] = { | |||
80 | }, | 79 | }, |
81 | }; | 80 | }; |
82 | 81 | ||
83 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
84 | .irq_base = MXC_IPU_IRQ_START, | ||
85 | }; | ||
86 | |||
87 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 82 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
88 | .name = "Ceramate-CLAA070VC01", | 83 | .name = "Ceramate-CLAA070VC01", |
89 | .mode = fb_modedb, | 84 | .mode = fb_modedb, |
@@ -136,8 +131,6 @@ static struct platform_device mx35_3ds_lcd = { | |||
136 | .dev.platform_data = &mx35_3ds_lcd_data, | 131 | .dev.platform_data = &mx35_3ds_lcd_data, |
137 | }; | 132 | }; |
138 | 133 | ||
139 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 1)) | ||
140 | |||
141 | static const struct imxuart_platform_data uart_pdata __initconst = { | 134 | static const struct imxuart_platform_data uart_pdata __initconst = { |
142 | .flags = IMXUART_HAVE_RTSCTS, | 135 | .flags = IMXUART_HAVE_RTSCTS, |
143 | }; | 136 | }; |
@@ -297,10 +290,6 @@ err: | |||
297 | return ret; | 290 | return ret; |
298 | } | 291 | } |
299 | 292 | ||
300 | static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = { | ||
301 | .irq_base = MXC_IPU_IRQ_START, | ||
302 | }; | ||
303 | |||
304 | static struct i2c_board_info mx35_3ds_i2c_camera = { | 293 | static struct i2c_board_info mx35_3ds_i2c_camera = { |
305 | I2C_BOARD_INFO("ov2640", 0x30), | 294 | I2C_BOARD_INFO("ov2640", 0x30), |
306 | }; | 295 | }; |
@@ -492,7 +481,7 @@ static struct i2c_board_info mx35_3ds_i2c_mc13892 = { | |||
492 | 481 | ||
493 | I2C_BOARD_INFO("mc13892", 0x08), | 482 | I2C_BOARD_INFO("mc13892", 0x08), |
494 | .platform_data = &mx35_3ds_mc13892_data, | 483 | .platform_data = &mx35_3ds_mc13892_data, |
495 | .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT), | 484 | /* irq number is run-time assigned */ |
496 | }; | 485 | }; |
497 | 486 | ||
498 | static void __init imx35_3ds_init_mc13892(void) | 487 | static void __init imx35_3ds_init_mc13892(void) |
@@ -504,6 +493,7 @@ static void __init imx35_3ds_init_mc13892(void) | |||
504 | return; | 493 | return; |
505 | } | 494 | } |
506 | 495 | ||
496 | mx35_3ds_i2c_mc13892.irq = gpio_to_irq(GPIO_PMIC_INT); | ||
507 | i2c_register_board_info(0, &mx35_3ds_i2c_mc13892, 1); | 497 | i2c_register_board_info(0, &mx35_3ds_i2c_mc13892, 1); |
508 | } | 498 | } |
509 | 499 | ||
@@ -588,7 +578,7 @@ static void __init mx35_3ds_init(void) | |||
588 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); | 578 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); |
589 | imx35_add_sdhci_esdhc_imx(0, NULL); | 579 | imx35_add_sdhci_esdhc_imx(0, NULL); |
590 | 580 | ||
591 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 581 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, IMX_GPIO_NR(1, 1))) |
592 | pr_warn("Init of the debugboard failed, all " | 582 | pr_warn("Init of the debugboard failed, all " |
593 | "devices on the debugboard are unusable.\n"); | 583 | "devices on the debugboard are unusable.\n"); |
594 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); | 584 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); |
@@ -596,7 +586,7 @@ static void __init mx35_3ds_init(void) | |||
596 | i2c_register_board_info( | 586 | i2c_register_board_info( |
597 | 0, i2c_devices_3ds, ARRAY_SIZE(i2c_devices_3ds)); | 587 | 0, i2c_devices_3ds, ARRAY_SIZE(i2c_devices_3ds)); |
598 | 588 | ||
599 | imx35_add_ipu_core(&mx35_3ds_ipu_data); | 589 | imx35_add_ipu_core(); |
600 | platform_device_register(&mx35_3ds_ov2640); | 590 | platform_device_register(&mx35_3ds_ov2640); |
601 | imx35_3ds_init_camera(); | 591 | imx35_3ds_init_camera(); |
602 | 592 | ||
diff --git a/arch/arm/mach-imx/mach-mx51_3ds.c b/arch/arm/mach-imx/mach-mx51_3ds.c index 2edb563b968d..9ee84a4af639 100644 --- a/arch/arm/mach-imx/mach-mx51_3ds.c +++ b/arch/arm/mach-imx/mach-mx51_3ds.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include "devices-imx51.h" | 27 | #include "devices-imx51.h" |
28 | 28 | ||
29 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6)) | ||
30 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) | 29 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) |
31 | 30 | ||
32 | static iomux_v3_cfg_t mx51_3ds_pads[] = { | 31 | static iomux_v3_cfg_t mx51_3ds_pads[] = { |
@@ -148,7 +147,7 @@ static void __init mx51_3ds_init(void) | |||
148 | spi_register_board_info(mx51_3ds_spi_nor_device, | 147 | spi_register_board_info(mx51_3ds_spi_nor_device, |
149 | ARRAY_SIZE(mx51_3ds_spi_nor_device)); | 148 | ARRAY_SIZE(mx51_3ds_spi_nor_device)); |
150 | 149 | ||
151 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 150 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, IMX_GPIO_NR(1, 6))) |
152 | printk(KERN_WARNING "Init of the debugboard failed, all " | 151 | printk(KERN_WARNING "Init of the debugboard failed, all " |
153 | "devices on the board are unusable.\n"); | 152 | "devices on the board are unusable.\n"); |
154 | 153 | ||
diff --git a/arch/arm/mach-imx/mach-mx53_ard.c b/arch/arm/mach-imx/mach-mx53_ard.c index 4a7593a953e2..f641a1758691 100644 --- a/arch/arm/mach-imx/mach-mx53_ard.c +++ b/arch/arm/mach-imx/mach-mx53_ard.c | |||
@@ -135,8 +135,7 @@ static struct resource ard_smsc911x_resources[] = { | |||
135 | .flags = IORESOURCE_MEM, | 135 | .flags = IORESOURCE_MEM, |
136 | }, | 136 | }, |
137 | { | 137 | { |
138 | .start = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B), | 138 | /* irq number is run-time assigned */ |
139 | .end = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B), | ||
140 | .flags = IORESOURCE_IRQ, | 139 | .flags = IORESOURCE_IRQ, |
141 | }, | 140 | }, |
142 | }; | 141 | }; |
@@ -240,6 +239,8 @@ static void __init mx53_ard_board_init(void) | |||
240 | imx53_ard_common_init(); | 239 | imx53_ard_common_init(); |
241 | mx53_ard_io_init(); | 240 | mx53_ard_io_init(); |
242 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 241 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
242 | ard_smsc911x_resources[1].start = gpio_to_irq(ARD_ETHERNET_INT_B); | ||
243 | ard_smsc911x_resources[1].end = gpio_to_irq(ARD_ETHERNET_INT_B); | ||
243 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 244 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
244 | 245 | ||
245 | imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); | 246 | imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index 8b3d3f07d894..0bf6d30aa32d 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -213,13 +213,13 @@ static const struct imx_fb_platform_data mxt_td60_fb_data __initconst = { | |||
213 | static int mxt_td60_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 213 | static int mxt_td60_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
214 | void *data) | 214 | void *data) |
215 | { | 215 | { |
216 | return request_irq(IRQ_GPIOF(8), detect_irq, IRQF_TRIGGER_FALLING, | 216 | return request_irq(gpio_to_irq(IMX_GPIO_NR(6, 8)), detect_irq, |
217 | "sdhc1-card-detect", data); | 217 | IRQF_TRIGGER_FALLING, "sdhc1-card-detect", data); |
218 | } | 218 | } |
219 | 219 | ||
220 | static void mxt_td60_sdhc1_exit(struct device *dev, void *data) | 220 | static void mxt_td60_sdhc1_exit(struct device *dev, void *data) |
221 | { | 221 | { |
222 | free_irq(IRQ_GPIOF(8), data); | 222 | free_irq(gpio_to_irq(IMX_GPIO_NR(6, 8)), data); |
223 | } | 223 | } |
224 | 224 | ||
225 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 225 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index d37ed25003b2..de8516b7d69f 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <mach/iomux-mx27.h> | 37 | #include <mach/iomux-mx27.h> |
38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
39 | #include <mach/irqs.h> | ||
40 | #include <mach/ulpi.h> | 39 | #include <mach/ulpi.h> |
41 | 40 | ||
42 | #include "devices-imx27.h" | 41 | #include "devices-imx27.h" |
@@ -245,7 +244,7 @@ static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | |||
245 | { | 244 | { |
246 | int ret; | 245 | int ret; |
247 | 246 | ||
248 | ret = request_irq(IRQ_GPIOC(29), detect_irq, | 247 | ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq, |
249 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 248 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
250 | "imx-mmc-detect", data); | 249 | "imx-mmc-detect", data); |
251 | if (ret) | 250 | if (ret) |
@@ -257,7 +256,7 @@ static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | |||
257 | 256 | ||
258 | static void pca100_sdhc2_exit(struct device *dev, void *data) | 257 | static void pca100_sdhc2_exit(struct device *dev, void *data) |
259 | { | 258 | { |
260 | free_irq(IRQ_GPIOC(29), data); | 259 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); |
261 | } | 260 | } |
262 | 261 | ||
263 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { | 262 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index cd48712a6f50..e3c45130fb3c 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -225,8 +225,7 @@ static struct resource smsc911x_resources[] = { | |||
225 | .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | 225 | .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1, |
226 | .flags = IORESOURCE_MEM, | 226 | .flags = IORESOURCE_MEM, |
227 | }, { | 227 | }, { |
228 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 228 | /* irq number is run-time assigned */ |
229 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | ||
230 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 229 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
231 | }, | 230 | }, |
232 | }; | 231 | }; |
@@ -371,7 +370,7 @@ static int pcm970_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | |||
371 | gpio_direction_input(SDHC1_GPIO_WP); | 370 | gpio_direction_input(SDHC1_GPIO_WP); |
372 | #endif | 371 | #endif |
373 | 372 | ||
374 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), detect_irq, | 373 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SCK6)), detect_irq, |
375 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 374 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
376 | "sdhc-detect", data); | 375 | "sdhc-detect", data); |
377 | if (ret) | 376 | if (ret) |
@@ -391,7 +390,7 @@ err_gpio_free: | |||
391 | 390 | ||
392 | static void pcm970_sdhc1_exit(struct device *dev, void *data) | 391 | static void pcm970_sdhc1_exit(struct device *dev, void *data) |
393 | { | 392 | { |
394 | free_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), data); | 393 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SCK6)), data); |
395 | gpio_free(SDHC1_GPIO_DET); | 394 | gpio_free(SDHC1_GPIO_DET); |
396 | gpio_free(SDHC1_GPIO_WP); | 395 | gpio_free(SDHC1_GPIO_WP); |
397 | } | 396 | } |
@@ -442,10 +441,6 @@ static struct platform_device *devices[] __initdata = { | |||
442 | &pcm037_mt9v022, | 441 | &pcm037_mt9v022, |
443 | }; | 442 | }; |
444 | 443 | ||
445 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
446 | .irq_base = MXC_IPU_IRQ_START, | ||
447 | }; | ||
448 | |||
449 | static const struct fb_videomode fb_modedb[] = { | 444 | static const struct fb_videomode fb_modedb[] = { |
450 | { | 445 | { |
451 | /* 240x320 @ 60 Hz Sharp */ | 446 | /* 240x320 @ 60 Hz Sharp */ |
@@ -511,8 +506,7 @@ static struct resource pcm970_sja1000_resources[] = { | |||
511 | .end = MX31_CS5_BASE_ADDR + 0x100 - 1, | 506 | .end = MX31_CS5_BASE_ADDR + 0x100 - 1, |
512 | .flags = IORESOURCE_MEM, | 507 | .flags = IORESOURCE_MEM, |
513 | }, { | 508 | }, { |
514 | .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | 509 | /* irq number is run-time assigned */ |
515 | .end = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | ||
516 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 510 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
517 | }, | 511 | }, |
518 | }; | 512 | }; |
@@ -633,6 +627,10 @@ static void __init pcm037_init(void) | |||
633 | pr_warning("could not get LAN irq gpio\n"); | 627 | pr_warning("could not get LAN irq gpio\n"); |
634 | else { | 628 | else { |
635 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | 629 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); |
630 | smsc911x_resources[1].start = | ||
631 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
632 | smsc911x_resources[1].end = | ||
633 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
636 | platform_device_register(&pcm037_eth); | 634 | platform_device_register(&pcm037_eth); |
637 | } | 635 | } |
638 | 636 | ||
@@ -646,7 +644,7 @@ static void __init pcm037_init(void) | |||
646 | 644 | ||
647 | imx31_add_mxc_nand(&pcm037_nand_board_info); | 645 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
648 | imx31_add_mxc_mmc(0, &sdhc_pdata); | 646 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
649 | imx31_add_ipu_core(&mx3_ipu_data); | 647 | imx31_add_ipu_core(); |
650 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 648 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
651 | 649 | ||
652 | /* CSI */ | 650 | /* CSI */ |
@@ -659,6 +657,10 @@ static void __init pcm037_init(void) | |||
659 | 657 | ||
660 | pcm037_init_camera(); | 658 | pcm037_init_camera(); |
661 | 659 | ||
660 | pcm970_sja1000_resources[1].start = | ||
661 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
662 | pcm970_sja1000_resources[1].end = | ||
663 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
662 | platform_device_register(&pcm970_sja1000); | 664 | platform_device_register(&pcm970_sja1000); |
663 | 665 | ||
664 | if (otg_mode_host) { | 666 | if (otg_mode_host) { |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 3fbb89d74fcc..95f49d936fd3 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mfd/mc13783.h> | 27 | #include <linux/mfd/mc13783.h> |
28 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <linux/gpio.h> | ||
30 | 31 | ||
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -274,7 +275,7 @@ static struct mc13xxx_platform_data pcm038_pmic = { | |||
274 | static struct spi_board_info pcm038_spi_board_info[] __initdata = { | 275 | static struct spi_board_info pcm038_spi_board_info[] __initdata = { |
275 | { | 276 | { |
276 | .modalias = "mc13783", | 277 | .modalias = "mc13783", |
277 | .irq = IRQ_GPIOB(23), | 278 | /* irq number is run-time assigned */ |
278 | .max_speed_hz = 300000, | 279 | .max_speed_hz = 300000, |
279 | .bus_num = 0, | 280 | .bus_num = 0, |
280 | .chip_select = 0, | 281 | .chip_select = 0, |
@@ -325,6 +326,7 @@ static void __init pcm038_init(void) | |||
325 | mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); | 326 | mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); |
326 | 327 | ||
327 | imx27_add_spi_imx0(&pcm038_spi0_data); | 328 | imx27_add_spi_imx0(&pcm038_spi0_data); |
329 | pcm038_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(2, 23)); | ||
328 | spi_register_board_info(pcm038_spi_board_info, | 330 | spi_register_board_info(pcm038_spi_board_info, |
329 | ARRAY_SIZE(pcm038_spi_board_info)); | 331 | ARRAY_SIZE(pcm038_spi_board_info)); |
330 | 332 | ||
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 1f20f222375e..e4bd4387e344 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -76,10 +76,6 @@ static const struct fb_videomode fb_modedb[] = { | |||
76 | }, | 76 | }, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
80 | .irq_base = MXC_IPU_IRQ_START, | ||
81 | }; | ||
82 | |||
83 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 79 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
84 | .name = "Sharp-LQ035Q7", | 80 | .name = "Sharp-LQ035Q7", |
85 | .mode = fb_modedb, | 81 | .mode = fb_modedb, |
@@ -376,7 +372,7 @@ static void __init pcm043_init(void) | |||
376 | 372 | ||
377 | imx35_add_imx_i2c0(&pcm043_i2c0_data); | 373 | imx35_add_imx_i2c0(&pcm043_i2c0_data); |
378 | 374 | ||
379 | imx35_add_ipu_core(&mx3_ipu_data); | 375 | imx35_add_ipu_core(); |
380 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 376 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
381 | 377 | ||
382 | if (otg_mode_host) { | 378 | if (otg_mode_host) { |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index a13087b11a6e..fb25fbd31226 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | 23 | ||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/irqs.h> | ||
26 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/time.h> | 27 | #include <asm/mach/time.h> |
@@ -51,8 +50,6 @@ | |||
51 | (QONG_FPGA_BASEADDR + QONG_DNET_ID * QONG_FPGA_PERIPH_SIZE) | 50 | (QONG_FPGA_BASEADDR + QONG_DNET_ID * QONG_FPGA_PERIPH_SIZE) |
52 | #define QONG_DNET_SIZE 0x00001000 | 51 | #define QONG_DNET_SIZE 0x00001000 |
53 | 52 | ||
54 | #define QONG_FPGA_IRQ IOMUX_TO_IRQ(MX31_PIN_DTR_DCE1) | ||
55 | |||
56 | static const struct imxuart_platform_data uart_pdata __initconst = { | 53 | static const struct imxuart_platform_data uart_pdata __initconst = { |
57 | .flags = IMXUART_HAVE_RTSCTS, | 54 | .flags = IMXUART_HAVE_RTSCTS, |
58 | }; | 55 | }; |
@@ -78,8 +75,7 @@ static struct resource dnet_resources[] = { | |||
78 | .end = QONG_DNET_BASEADDR + QONG_DNET_SIZE - 1, | 75 | .end = QONG_DNET_BASEADDR + QONG_DNET_SIZE - 1, |
79 | .flags = IORESOURCE_MEM, | 76 | .flags = IORESOURCE_MEM, |
80 | }, { | 77 | }, { |
81 | .start = QONG_FPGA_IRQ, | 78 | /* irq number is run-time assigned */ |
82 | .end = QONG_FPGA_IRQ, | ||
83 | .flags = IORESOURCE_IRQ, | 79 | .flags = IORESOURCE_IRQ, |
84 | }, | 80 | }, |
85 | }; | 81 | }; |
@@ -95,6 +91,10 @@ static int __init qong_init_dnet(void) | |||
95 | { | 91 | { |
96 | int ret; | 92 | int ret; |
97 | 93 | ||
94 | dnet_resources[1].start = | ||
95 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)); | ||
96 | dnet_resources[1].end = | ||
97 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)); | ||
98 | ret = platform_device_register(&dnet_device); | 98 | ret = platform_device_register(&dnet_device); |
99 | return ret; | 99 | return ret; |
100 | } | 100 | } |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index cb9ceae2f648..67ff38e9a3ca 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/mtd/physmap.h> | 14 | #include <linux/mtd/physmap.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/dm9000.h> | 16 | #include <linux/dm9000.h> |
17 | #include <linux/gpio.h> | ||
17 | 18 | ||
18 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
@@ -21,7 +22,6 @@ | |||
21 | 22 | ||
22 | #include <mach/common.h> | 23 | #include <mach/common.h> |
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <mach/irqs.h> | ||
25 | #include <mach/iomux-mx1.h> | 25 | #include <mach/iomux-mx1.h> |
26 | 26 | ||
27 | #include "devices-imx1.h" | 27 | #include "devices-imx1.h" |
@@ -78,8 +78,7 @@ static struct resource dm9000x_resources[] = { | |||
78 | .end = MX1_CS5_PHYS + 5, | 78 | .end = MX1_CS5_PHYS + 5, |
79 | .flags = IORESOURCE_MEM, /* data access */ | 79 | .flags = IORESOURCE_MEM, /* data access */ |
80 | }, { | 80 | }, { |
81 | .start = IRQ_GPIOC(3), | 81 | /* irq number is run-time assigned */ |
82 | .end = IRQ_GPIOC(3), | ||
83 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 82 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
84 | }, | 83 | }, |
85 | }; | 84 | }; |
@@ -123,6 +122,8 @@ static void __init scb9328_init(void) | |||
123 | imx1_add_imx_uart0(&uart_pdata); | 122 | imx1_add_imx_uart0(&uart_pdata); |
124 | 123 | ||
125 | printk(KERN_INFO"Scb9328: Adding devices\n"); | 124 | printk(KERN_INFO"Scb9328: Adding devices\n"); |
125 | dm9000x_resources[2].start = gpio_to_irq(IMX_GPIO_NR(3, 3)); | ||
126 | dm9000x_resources[2].end = gpio_to_irq(IMX_GPIO_NR(3, 3)); | ||
126 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 127 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
127 | } | 128 | } |
128 | 129 | ||
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index b26209d4bcef..39eb7960e2a4 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <mach/common.h> | 32 | #include <mach/common.h> |
33 | #include <mach/iomux-mx35.h> | 33 | #include <mach/iomux-mx35.h> |
34 | #include <mach/irqs.h> | ||
35 | 34 | ||
36 | #include <linux/i2c.h> | 35 | #include <linux/i2c.h> |
37 | #include <linux/i2c/at24.h> | 36 | #include <linux/i2c/at24.h> |
@@ -87,10 +86,6 @@ static const struct fb_videomode fb_modedb[] = { | |||
87 | } | 86 | } |
88 | }; | 87 | }; |
89 | 88 | ||
90 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
91 | .irq_base = MXC_IPU_IRQ_START, | ||
92 | }; | ||
93 | |||
94 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 89 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
95 | .name = "PT0708048", | 90 | .name = "PT0708048", |
96 | .mode = fb_modedb, | 91 | .mode = fb_modedb, |
@@ -162,7 +157,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = { | |||
162 | }, { | 157 | }, { |
163 | I2C_BOARD_INFO("mc13892", 0x08), | 158 | I2C_BOARD_INFO("mc13892", 0x08), |
164 | .platform_data = &vpr200_pmic, | 159 | .platform_data = &vpr200_pmic, |
165 | .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT), | 160 | /* irq number is run-time assigned */ |
166 | } | 161 | } |
167 | }; | 162 | }; |
168 | 163 | ||
@@ -290,7 +285,7 @@ static void __init vpr200_board_init(void) | |||
290 | imx35_add_imx_uart0(NULL); | 285 | imx35_add_imx_uart0(NULL); |
291 | imx35_add_imx_uart2(NULL); | 286 | imx35_add_imx_uart2(NULL); |
292 | 287 | ||
293 | imx35_add_ipu_core(&mx3_ipu_data); | 288 | imx35_add_ipu_core(); |
294 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 289 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
295 | 290 | ||
296 | imx35_add_fsl_usb2_udc(&otg_device_pdata); | 291 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
@@ -299,6 +294,7 @@ static void __init vpr200_board_init(void) | |||
299 | imx35_add_mxc_nand(&vpr200_nand_board_info); | 294 | imx35_add_mxc_nand(&vpr200_nand_board_info); |
300 | imx35_add_sdhci_esdhc_imx(0, NULL); | 295 | imx35_add_sdhci_esdhc_imx(0, NULL); |
301 | 296 | ||
297 | vpr200_i2c_devices[1].irq = gpio_to_irq(GPIO_PMIC_INT); | ||
302 | i2c_register_board_info(0, vpr200_i2c_devices, | 298 | i2c_register_board_info(0, vpr200_i2c_devices, |
303 | ARRAY_SIZE(vpr200_i2c_devices)); | 299 | ARRAY_SIZE(vpr200_i2c_devices)); |
304 | 300 | ||
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c index fcafd3dafb8c..6d60d51868bc 100644 --- a/arch/arm/mach-imx/mm-imx1.c +++ b/arch/arm/mach-imx/mm-imx1.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <mach/common.h> | 25 | #include <mach/common.h> |
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/irqs.h> | ||
28 | #include <mach/iomux-v1.h> | 27 | #include <mach/iomux-v1.h> |
29 | 28 | ||
30 | static struct map_desc imx_io_desc[] __initdata = { | 29 | static struct map_desc imx_io_desc[] __initdata = { |
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c index 5f43905e5290..d056dad0940d 100644 --- a/arch/arm/mach-imx/mm-imx21.c +++ b/arch/arm/mach-imx/mm-imx21.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <mach/devices-common.h> | 26 | #include <mach/devices-common.h> |
27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <mach/irqs.h> | ||
30 | #include <mach/iomux-v1.h> | 29 | #include <mach/iomux-v1.h> |
31 | 30 | ||
32 | /* MX21 memory map definition */ | 31 | /* MX21 memory map definition */ |
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c index 6ff37140a4f8..388928fdb11a 100644 --- a/arch/arm/mach-imx/mm-imx25.c +++ b/arch/arm/mach-imx/mm-imx25.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/mx25.h> | 30 | #include <mach/mx25.h> |
31 | #include <mach/iomux-v3.h> | 31 | #include <mach/iomux-v3.h> |
32 | #include <mach/irqs.h> | ||
33 | 32 | ||
34 | /* | 33 | /* |
35 | * This table defines static virtual address mappings for I/O regions. | 34 | * This table defines static virtual address mappings for I/O regions. |
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index 25662558e018..e7e24afc45ed 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <mach/devices-common.h> | 26 | #include <mach/devices-common.h> |
27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <mach/irqs.h> | ||
30 | #include <mach/iomux-v1.h> | 29 | #include <mach/iomux-v1.h> |
31 | 30 | ||
32 | /* MX27 memory map definition */ | 31 | /* MX27 memory map definition */ |
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index a8983b9778d1..fe96105109b3 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <mach/devices-common.h> | 30 | #include <mach/devices-common.h> |
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <mach/iomux-v3.h> | 32 | #include <mach/iomux-v3.h> |
33 | #include <mach/irqs.h> | ||
34 | 33 | ||
35 | #include "crmregs-imx3.h" | 34 | #include "crmregs-imx3.h" |
36 | 35 | ||
diff --git a/arch/arm/mach-imx/mx31lilly-db.c b/arch/arm/mach-imx/mx31lilly-db.c index 7d26f766a4ee..29e890f92055 100644 --- a/arch/arm/mach-imx/mx31lilly-db.c +++ b/arch/arm/mach-imx/mx31lilly-db.c | |||
@@ -130,7 +130,8 @@ static int mxc_mmc1_init(struct device *dev, | |||
130 | gpio_direction_input(gpio_det); | 130 | gpio_direction_input(gpio_det); |
131 | gpio_direction_input(gpio_wp); | 131 | gpio_direction_input(gpio_wp); |
132 | 132 | ||
133 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), detect_irq, | 133 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)), |
134 | detect_irq, | ||
134 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 135 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
135 | "MMC detect", data); | 136 | "MMC detect", data); |
136 | if (ret) | 137 | if (ret) |
@@ -151,7 +152,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data) | |||
151 | { | 152 | { |
152 | gpio_free(gpio_det); | 153 | gpio_free(gpio_det); |
153 | gpio_free(gpio_wp); | 154 | gpio_free(gpio_wp); |
154 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); | 155 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)), data); |
155 | } | 156 | } |
156 | 157 | ||
157 | static const struct imxmmc_platform_data mmc_pdata __initconst = { | 158 | static const struct imxmmc_platform_data mmc_pdata __initconst = { |
@@ -161,10 +162,6 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = { | |||
161 | }; | 162 | }; |
162 | 163 | ||
163 | /* Framebuffer support */ | 164 | /* Framebuffer support */ |
164 | static const struct ipu_platform_data ipu_data __initconst = { | ||
165 | .irq_base = MXC_IPU_IRQ_START, | ||
166 | }; | ||
167 | |||
168 | static const struct fb_videomode fb_modedb = { | 165 | static const struct fb_videomode fb_modedb = { |
169 | /* 640x480 TFT panel (IPS-056T) */ | 166 | /* 640x480 TFT panel (IPS-056T) */ |
170 | .name = "CRT-VGA", | 167 | .name = "CRT-VGA", |
@@ -198,7 +195,7 @@ static void __init mx31lilly_init_fb(void) | |||
198 | return; | 195 | return; |
199 | } | 196 | } |
200 | 197 | ||
201 | imx31_add_ipu_core(&ipu_data); | 198 | imx31_add_ipu_core(); |
202 | imx31_add_mx3_sdc_fb(&fb_pdata); | 199 | imx31_add_mx3_sdc_fb(&fb_pdata); |
203 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); | 200 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); |
204 | } | 201 | } |
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index fa60ef6ac7ff..83d17d9e0bc8 100644 --- a/arch/arm/mach-imx/mx31lite-db.c +++ b/arch/arm/mach-imx/mx31lite-db.c | |||
@@ -116,7 +116,8 @@ static int mxc_mmc1_init(struct device *dev, | |||
116 | gpio_direction_input(gpio_det); | 116 | gpio_direction_input(gpio_det); |
117 | gpio_direction_input(gpio_wp); | 117 | gpio_direction_input(gpio_wp); |
118 | 118 | ||
119 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), detect_irq, | 119 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1)), |
120 | detect_irq, | ||
120 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | 121 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
121 | "MMC detect", data); | 122 | "MMC detect", data); |
122 | if (ret) | 123 | if (ret) |
@@ -137,7 +138,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data) | |||
137 | { | 138 | { |
138 | gpio_free(gpio_det); | 139 | gpio_free(gpio_det); |
139 | gpio_free(gpio_wp); | 140 | gpio_free(gpio_wp); |
140 | free_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), data); | 141 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1)), data); |
141 | } | 142 | } |
142 | 143 | ||
143 | static const struct imxmmc_platform_data mmc_pdata __initconst = { | 144 | static const struct imxmmc_platform_data mmc_pdata __initconst = { |
diff --git a/arch/arm/mach-imx/mx51_efika.c b/arch/arm/mach-imx/mx51_efika.c index ec6ca91b299b..ee870c49bc63 100644 --- a/arch/arm/mach-imx/mx51_efika.c +++ b/arch/arm/mach-imx/mx51_efika.c | |||
@@ -587,7 +587,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = { | |||
587 | .bus_num = 0, | 587 | .bus_num = 0, |
588 | .chip_select = 0, | 588 | .chip_select = 0, |
589 | .platform_data = &mx51_efika_mc13892_data, | 589 | .platform_data = &mx51_efika_mc13892_data, |
590 | .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC), | 590 | /* irq number is run-time assigned */ |
591 | }, | 591 | }, |
592 | }; | 592 | }; |
593 | 593 | ||
@@ -620,6 +620,7 @@ void __init efika_board_common_init(void) | |||
620 | 620 | ||
621 | gpio_request(EFIKAMX_PMIC, "pmic irq"); | 621 | gpio_request(EFIKAMX_PMIC, "pmic irq"); |
622 | gpio_direction_input(EFIKAMX_PMIC); | 622 | gpio_direction_input(EFIKAMX_PMIC); |
623 | mx51_efika_spi_board_info[1].irq = gpio_to_irq(EFIKAMX_PMIC); | ||
623 | spi_register_board_info(mx51_efika_spi_board_info, | 624 | spi_register_board_info(mx51_efika_spi_board_info, |
624 | ARRAY_SIZE(mx51_efika_spi_board_info)); | 625 | ARRAY_SIZE(mx51_efika_spi_board_info)); |
625 | imx51_add_ecspi(0, &mx51_efika_spi_pdata); | 626 | imx51_add_ecspi(0, &mx51_efika_spi_pdata); |
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c index 99afbc3f43a3..9917e2ff51da 100644 --- a/arch/arm/mach-imx/pcm970-baseboard.c +++ b/arch/arm/mach-imx/pcm970-baseboard.c | |||
@@ -95,14 +95,14 @@ static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void | |||
95 | { | 95 | { |
96 | int ret; | 96 | int ret; |
97 | 97 | ||
98 | ret = request_irq(IRQ_GPIOC(29), detect_irq, IRQF_TRIGGER_FALLING, | 98 | ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq, |
99 | "imx-mmc-detect", data); | 99 | IRQF_TRIGGER_FALLING, "imx-mmc-detect", data); |
100 | if (ret) | 100 | if (ret) |
101 | return ret; | 101 | return ret; |
102 | 102 | ||
103 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); | 103 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); |
104 | if (ret) { | 104 | if (ret) { |
105 | free_irq(IRQ_GPIOC(29), data); | 105 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); |
106 | return ret; | 106 | return ret; |
107 | } | 107 | } |
108 | 108 | ||
@@ -113,7 +113,7 @@ static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void | |||
113 | 113 | ||
114 | static void pcm970_sdhc2_exit(struct device *dev, void *data) | 114 | static void pcm970_sdhc2_exit(struct device *dev, void *data) |
115 | { | 115 | { |
116 | free_irq(IRQ_GPIOC(29), data); | 116 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); |
117 | gpio_free(GPIO_PORTC + 28); | 117 | gpio_free(GPIO_PORTC + 28); |
118 | } | 118 | } |
119 | 119 | ||
@@ -192,8 +192,7 @@ static struct resource pcm970_sja1000_resources[] = { | |||
192 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, | 192 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, |
193 | .flags = IORESOURCE_MEM, | 193 | .flags = IORESOURCE_MEM, |
194 | }, { | 194 | }, { |
195 | .start = IRQ_GPIOE(19), | 195 | /* irq number is run-time assigned */ |
196 | .end = IRQ_GPIOE(19), | ||
197 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 196 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
198 | }, | 197 | }, |
199 | }; | 198 | }; |
@@ -227,5 +226,7 @@ void __init pcm970_baseboard_init(void) | |||
227 | imx27_add_imx_fb(&pcm038_fb_data); | 226 | imx27_add_imx_fb(&pcm038_fb_data); |
228 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); | 227 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); |
229 | imx27_add_mxc_mmc(1, &sdhc_pdata); | 228 | imx27_add_mxc_mmc(1, &sdhc_pdata); |
229 | pcm970_sja1000_resources[1].start = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
230 | pcm970_sja1000_resources[1].end = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
230 | platform_device_register(&pcm970_sja1000); | 231 | platform_device_register(&pcm970_sja1000); |
231 | } | 232 | } |