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>
This commit is contained in:
Shawn Guo 2011-08-14 00:14:01 +08:00 коммит произвёл Sascha Hauer
Родитель 93ee7a9340
Коммит e309fb1864
9 изменённых файлов: 15 добавлений и 13 удалений

Просмотреть файл

@ -66,7 +66,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
I2C_BOARD_INFO("tsc2007", 0x48), I2C_BOARD_INFO("tsc2007", 0x48),
.type = "tsc2007", .type = "tsc2007",
.platform_data = &tsc2007_info, .platform_data = &tsc2007_info,
.irq = gpio_to_irq(TSC2007_IRQGPIO), .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
}, },
}; };

Просмотреть файл

@ -359,7 +359,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
.bus_num = 1, .bus_num = 1,
.chip_select = 0, /* SS0 */ .chip_select = 0, /* SS0 */
.platform_data = &mc13783_pdata, .platform_data = &mc13783_pdata,
.irq = gpio_to_irq(PMIC_INT), .irq = IMX_GPIO_TO_IRQ(PMIC_INT),
.mode = SPI_CS_HIGH, .mode = SPI_CS_HIGH,
}, { }, {
.modalias = "l4f00242t03", .modalias = "l4f00242t03",

Просмотреть файл

@ -162,7 +162,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = {
}, { }, {
I2C_BOARD_INFO("mc13892", 0x08), I2C_BOARD_INFO("mc13892", 0x08),
.platform_data = &vpr200_pmic, .platform_data = &vpr200_pmic,
.irq = gpio_to_irq(GPIO_PMIC_INT), .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT),
} }
}; };

Просмотреть файл

@ -57,7 +57,7 @@
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
.irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTA_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
@ -65,7 +65,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000),
.irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTB_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000),
.irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTC_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
@ -81,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000),
.irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTD_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,

Просмотреть файл

@ -129,7 +129,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
I2C_BOARD_INFO("tsc2007", 0x49), I2C_BOARD_INFO("tsc2007", 0x49),
.type = "tsc2007", .type = "tsc2007",
.platform_data = &tsc2007_info, .platform_data = &tsc2007_info,
.irq = gpio_to_irq(TSC2007_IRQGPIO), .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
}, },
}; };
@ -245,7 +245,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
.chip_select = 0, .chip_select = 0,
.platform_data = &mcp251x_info, .platform_data = &mcp251x_info,
.irq = gpio_to_irq(CAN_IRQGPIO) .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO)
}, },
}; };

Просмотреть файл

@ -134,8 +134,8 @@ static struct resource ard_smsc911x_resources[] = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
{ {
.start = gpio_to_irq(ARD_ETHERNET_INT_B), .start = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
.end = gpio_to_irq(ARD_ETHERNET_INT_B), .end = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };

Просмотреть файл

@ -160,7 +160,7 @@ struct tsc2007_platform_data tsc2007_data = {
static struct i2c_board_info mbimx51_i2c_devices[] = { static struct i2c_board_info mbimx51_i2c_devices[] = {
{ {
I2C_BOARD_INFO("tsc2007", 0x49), I2C_BOARD_INFO("tsc2007", 0x49),
.irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), .irq = IMX_GPIO_TO_IRQ(MBIMX51_TSC2007_GPIO),
.platform_data = &tsc2007_data, .platform_data = &tsc2007_data,
}, { }, {
I2C_BOARD_INFO("tlv320aic23", 0x1a), I2C_BOARD_INFO("tlv320aic23", 0x1a),

Просмотреть файл

@ -589,7 +589,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = {
.bus_num = 0, .bus_num = 0,
.chip_select = 0, .chip_select = 0,
.platform_data = &mx51_efika_mc13892_data, .platform_data = &mx51_efika_mc13892_data,
.irq = gpio_to_irq(EFIKAMX_PMIC), .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC),
}, },
}; };

Просмотреть файл

@ -116,4 +116,6 @@
.type = _type, \ .type = _type, \
} }
#define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio))
#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */