diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-08-13 12:14:01 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-16 03:00:36 -0400 |
commit | e309fb1864e2d59ff030d5b95c4fb8188ab0eb4c (patch) | |
tree | 0d15f799f03b14b3dc774fb4d7fa2c1124d99a2c | |
parent | 93ee7a9340d64f20295aacc3fb6a22b759323280 (diff) |
arm/mxc: do not use gpio_to_irq() for static initializers
The patch defines IMX_GPIO_TO_IRQ() in mach/hardware.h and replaces
all the uses of gpio_to_irq() in static initializers with
IMX_GPIO_TO_IRQ().
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx35.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx27_3ds.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-vpr200.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-cpuimx51.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-cpuimx51sd.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx53_ard.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx51_efika.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/hardware.h | 2 |
9 files changed, 15 insertions, 13 deletions
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index f39a478ba1a6..13b704120f07 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -66,7 +66,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | |||
66 | I2C_BOARD_INFO("tsc2007", 0x48), | 66 | I2C_BOARD_INFO("tsc2007", 0x48), |
67 | .type = "tsc2007", | 67 | .type = "tsc2007", |
68 | .platform_data = &tsc2007_info, | 68 | .platform_data = &tsc2007_info, |
69 | .irq = gpio_to_irq(TSC2007_IRQGPIO), | 69 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), |
70 | }, | 70 | }, |
71 | }; | 71 | }; |
72 | 72 | ||
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 6fa6934ab150..097ff42c1fe5 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -359,7 +359,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
359 | .bus_num = 1, | 359 | .bus_num = 1, |
360 | .chip_select = 0, /* SS0 */ | 360 | .chip_select = 0, /* SS0 */ |
361 | .platform_data = &mc13783_pdata, | 361 | .platform_data = &mc13783_pdata, |
362 | .irq = gpio_to_irq(PMIC_INT), | 362 | .irq = IMX_GPIO_TO_IRQ(PMIC_INT), |
363 | .mode = SPI_CS_HIGH, | 363 | .mode = SPI_CS_HIGH, |
364 | }, { | 364 | }, { |
365 | .modalias = "l4f00242t03", | 365 | .modalias = "l4f00242t03", |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 7d8e012a6335..5250283479e7 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -162,7 +162,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = { | |||
162 | }, { | 162 | }, { |
163 | I2C_BOARD_INFO("mc13892", 0x08), | 163 | I2C_BOARD_INFO("mc13892", 0x08), |
164 | .platform_data = &vpr200_pmic, | 164 | .platform_data = &vpr200_pmic, |
165 | .irq = gpio_to_irq(GPIO_PMIC_INT), | 165 | .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT), |
166 | } | 166 | } |
167 | }; | 167 | }; |
168 | 168 | ||
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index 68934ea8725a..49ec98ee5bdd 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -57,7 +57,7 @@ | |||
57 | static struct plat_serial8250_port serial_platform_data[] = { | 57 | static struct plat_serial8250_port serial_platform_data[] = { |
58 | { | 58 | { |
59 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), | 59 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), |
60 | .irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO), | 60 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTA_GPIO), |
61 | .irqflags = IRQF_TRIGGER_HIGH, | 61 | .irqflags = IRQF_TRIGGER_HIGH, |
62 | .uartclk = CPUIMX51_QUART_XTAL, | 62 | .uartclk = CPUIMX51_QUART_XTAL, |
63 | .regshift = CPUIMX51_QUART_REGSHIFT, | 63 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -65,7 +65,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
65 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 65 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
66 | }, { | 66 | }, { |
67 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), | 67 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), |
68 | .irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO), | 68 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTB_GPIO), |
69 | .irqflags = IRQF_TRIGGER_HIGH, | 69 | .irqflags = IRQF_TRIGGER_HIGH, |
70 | .uartclk = CPUIMX51_QUART_XTAL, | 70 | .uartclk = CPUIMX51_QUART_XTAL, |
71 | .regshift = CPUIMX51_QUART_REGSHIFT, | 71 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
73 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 73 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
74 | }, { | 74 | }, { |
75 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), | 75 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), |
76 | .irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO), | 76 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTC_GPIO), |
77 | .irqflags = IRQF_TRIGGER_HIGH, | 77 | .irqflags = IRQF_TRIGGER_HIGH, |
78 | .uartclk = CPUIMX51_QUART_XTAL, | 78 | .uartclk = CPUIMX51_QUART_XTAL, |
79 | .regshift = CPUIMX51_QUART_REGSHIFT, | 79 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -81,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
82 | }, { | 82 | }, { |
83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), | 83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), |
84 | .irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO), | 84 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTD_GPIO), |
85 | .irqflags = IRQF_TRIGGER_HIGH, | 85 | .irqflags = IRQF_TRIGGER_HIGH, |
86 | .uartclk = CPUIMX51_QUART_XTAL, | 86 | .uartclk = CPUIMX51_QUART_XTAL, |
87 | .regshift = CPUIMX51_QUART_REGSHIFT, | 87 | .regshift = CPUIMX51_QUART_REGSHIFT, |
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c index ff096d587299..8badbdbca8b0 100644 --- a/arch/arm/mach-mx5/board-cpuimx51sd.c +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c | |||
@@ -129,7 +129,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { | |||
129 | I2C_BOARD_INFO("tsc2007", 0x49), | 129 | I2C_BOARD_INFO("tsc2007", 0x49), |
130 | .type = "tsc2007", | 130 | .type = "tsc2007", |
131 | .platform_data = &tsc2007_info, | 131 | .platform_data = &tsc2007_info, |
132 | .irq = gpio_to_irq(TSC2007_IRQGPIO), | 132 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), |
133 | }, | 133 | }, |
134 | }; | 134 | }; |
135 | 135 | ||
@@ -245,7 +245,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = { | |||
245 | .mode = SPI_MODE_0, | 245 | .mode = SPI_MODE_0, |
246 | .chip_select = 0, | 246 | .chip_select = 0, |
247 | .platform_data = &mcp251x_info, | 247 | .platform_data = &mcp251x_info, |
248 | .irq = gpio_to_irq(CAN_IRQGPIO) | 248 | .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO) |
249 | }, | 249 | }, |
250 | }; | 250 | }; |
251 | 251 | ||
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index 76a67c4a2a0b..ddc3015102d5 100644 --- a/arch/arm/mach-mx5/board-mx53_ard.c +++ b/arch/arm/mach-mx5/board-mx53_ard.c | |||
@@ -134,8 +134,8 @@ static struct resource ard_smsc911x_resources[] = { | |||
134 | .flags = IORESOURCE_MEM, | 134 | .flags = IORESOURCE_MEM, |
135 | }, | 135 | }, |
136 | { | 136 | { |
137 | .start = gpio_to_irq(ARD_ETHERNET_INT_B), | 137 | .start = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B), |
138 | .end = gpio_to_irq(ARD_ETHERNET_INT_B), | 138 | .end = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B), |
139 | .flags = IORESOURCE_IRQ, | 139 | .flags = IORESOURCE_IRQ, |
140 | }, | 140 | }, |
141 | }; | 141 | }; |
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c index bbf4564bd050..ab0b1b256dbe 100644 --- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -160,7 +160,7 @@ struct tsc2007_platform_data tsc2007_data = { | |||
160 | static struct i2c_board_info mbimx51_i2c_devices[] = { | 160 | static struct i2c_board_info mbimx51_i2c_devices[] = { |
161 | { | 161 | { |
162 | I2C_BOARD_INFO("tsc2007", 0x49), | 162 | I2C_BOARD_INFO("tsc2007", 0x49), |
163 | .irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), | 163 | .irq = IMX_GPIO_TO_IRQ(MBIMX51_TSC2007_GPIO), |
164 | .platform_data = &tsc2007_data, | 164 | .platform_data = &tsc2007_data, |
165 | }, { | 165 | }, { |
166 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | 166 | I2C_BOARD_INFO("tlv320aic23", 0x1a), |
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index c9209454807a..4d79b5e0709d 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
@@ -589,7 +589,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = { | |||
589 | .bus_num = 0, | 589 | .bus_num = 0, |
590 | .chip_select = 0, | 590 | .chip_select = 0, |
591 | .platform_data = &mx51_efika_mc13892_data, | 591 | .platform_data = &mx51_efika_mc13892_data, |
592 | .irq = gpio_to_irq(EFIKAMX_PMIC), | 592 | .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC), |
593 | }, | 593 | }, |
594 | }; | 594 | }; |
595 | 595 | ||
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index a8bfd565dcad..77f6556f59a7 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h | |||
@@ -116,4 +116,6 @@ | |||
116 | .type = _type, \ | 116 | .type = _type, \ |
117 | } | 117 | } |
118 | 118 | ||
119 | #define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio)) | ||
120 | |||
119 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ | 121 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ |