From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/16] ARM: imx: eliminate macro IMX_GPIO_TO_IRQ()
Date: Thu, 14 Jun 2012 13:59:32 +0800 [thread overview]
Message-ID: <1339653587-4832-2-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1339653587-4832-1-git-send-email-shawn.guo@linaro.org>
This patch changes all the static gpio irq number assigning with
IMX_GPIO_TO_IRQ() to run-time assigning with gpio_to_irq call, and
in turn eliminates the macro IMX_GPIO_TO_IRQ().
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-imx/mach-cpuimx35.c | 3 ++-
arch/arm/mach-imx/mach-cpuimx51sd.c | 3 ++-
arch/arm/mach-imx/mach-mx27_3ds.c | 3 ++-
arch/arm/mach-imx/mach-mx35_3ds.c | 3 ++-
arch/arm/mach-imx/mach-mx53_ard.c | 5 +++--
arch/arm/mach-imx/mach-vpr200.c | 3 ++-
arch/arm/mach-imx/mx51_efika.c | 3 ++-
arch/arm/plat-mxc/include/mach/hardware.h | 2 --
8 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index c515f8e..73c4b65 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -72,7 +72,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
I2C_BOARD_INFO("tsc2007", 0x48),
.type = "tsc2007",
.platform_data = &tsc2007_info,
- .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
+ /* irq number is run-time assigned */
},
};
@@ -173,6 +173,7 @@ static void __init eukrea_cpuimx35_init(void)
imx35_add_imx_uart0(&uart_pdata);
imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info);
+ eukrea_cpuimx35_i2c_devices[1].irq = gpio_to_irq(TSC2007_IRQGPIO);
i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices,
ARRAY_SIZE(eukrea_cpuimx35_i2c_devices));
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 ac50f16..e42c6f8 100644
--- a/arch/arm/mach-imx/mach-cpuimx51sd.c
+++ b/arch/arm/mach-imx/mach-cpuimx51sd.c
@@ -259,7 +259,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = {
.mode = SPI_MODE_0,
.chip_select = 0,
.platform_data = &mcp251x_info,
- .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO)
+ /* irq number is run-time assigned */
},
};
@@ -310,6 +310,7 @@ static void __init eukrea_cpuimx51sd_init(void)
msleep(20);
gpio_set_value(CAN_RST, 1);
imx51_add_ecspi(0, &cpuimx51sd_ecspi1_pdata);
+ cpuimx51sd_spi_device[0].irq = gpio_to_irq(CAN_IRQGPIO);
spi_register_board_info(cpuimx51sd_spi_device,
ARRAY_SIZE(cpuimx51sd_spi_device));
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index c6d385c..18b9bca 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -445,7 +445,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
.bus_num = 1,
.chip_select = 0, /* SS0 */
.platform_data = &mc13783_pdata,
- .irq = IMX_GPIO_TO_IRQ(PMIC_INT),
+ /* irq number is run-time assigned */
.mode = SPI_CS_HIGH,
}, {
.modalias = "l4f00242t03",
@@ -496,6 +496,7 @@ static void __init mx27pdk_init(void)
imx27_add_spi_imx1(&spi2_pdata);
imx27_add_spi_imx0(&spi1_pdata);
+ mx27_3ds_spi_devs[0].irq = gpio_to_irq(PMIC_INT);
spi_register_board_info(mx27_3ds_spi_devs,
ARRAY_SIZE(mx27_3ds_spi_devs));
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 28aa194..fa1ea74 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -492,7 +492,7 @@ static struct i2c_board_info mx35_3ds_i2c_mc13892 = {
I2C_BOARD_INFO("mc13892", 0x08),
.platform_data = &mx35_3ds_mc13892_data,
- .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT),
+ /* irq number is run-time assigned */
};
static void __init imx35_3ds_init_mc13892(void)
@@ -504,6 +504,7 @@ static void __init imx35_3ds_init_mc13892(void)
return;
}
+ mx35_3ds_i2c_mc13892.irq = gpio_to_irq(GPIO_PMIC_INT);
i2c_register_board_info(0, &mx35_3ds_i2c_mc13892, 1);
}
diff --git a/arch/arm/mach-imx/mach-mx53_ard.c b/arch/arm/mach-imx/mach-mx53_ard.c
index 0564198..fe3f396 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[] = {
.flags = IORESOURCE_MEM,
},
{
- .start = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
- .end = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
+ /* irq number is run-time assigned */
.flags = IORESOURCE_IRQ,
},
};
@@ -240,6 +239,8 @@ static void __init mx53_ard_board_init(void)
imx53_ard_common_init();
mx53_ard_io_init();
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
+ ard_smsc911x_resources[1].start = gpio_to_irq(ARD_ETHERNET_INT_B);
+ ard_smsc911x_resources[1].end = gpio_to_irq(ARD_ETHERNET_INT_B);
platform_add_devices(devices, ARRAY_SIZE(devices));
imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index add8c69..e36eb2c 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[] = {
}, {
I2C_BOARD_INFO("mc13892", 0x08),
.platform_data = &vpr200_pmic,
- .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT),
+ /* irq number is run-time assigned */
}
};
@@ -299,6 +299,7 @@ static void __init vpr200_board_init(void)
imx35_add_mxc_nand(&vpr200_nand_board_info);
imx35_add_sdhci_esdhc_imx(0, NULL);
+ vpr200_i2c_devices[1].irq = gpio_to_irq(GPIO_PMIC_INT);
i2c_register_board_info(0, vpr200_i2c_devices,
ARRAY_SIZE(vpr200_i2c_devices));
diff --git a/arch/arm/mach-imx/mx51_efika.c b/arch/arm/mach-imx/mx51_efika.c
index ec6ca91..ee870c4 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 = {
.bus_num = 0,
.chip_select = 0,
.platform_data = &mx51_efika_mc13892_data,
- .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC),
+ /* irq number is run-time assigned */
},
};
@@ -620,6 +620,7 @@ void __init efika_board_common_init(void)
gpio_request(EFIKAMX_PMIC, "pmic irq");
gpio_direction_input(EFIKAMX_PMIC);
+ mx51_efika_spi_board_info[1].irq = gpio_to_irq(EFIKAMX_PMIC);
spi_register_board_info(mx51_efika_spi_board_info,
ARRAY_SIZE(mx51_efika_spi_board_info));
imx51_add_ecspi(0, &mx51_efika_spi_pdata);
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index 0630513..1d432a7 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -128,6 +128,4 @@
/* range e.g. GPIO_1_5 is gpio 5 under linux */
#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))
-#define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio))
-
#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
--
1.7.5.4
next prev parent reply other threads:[~2012-06-14 5:59 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 5:59 [PATCH 00/16] Enable SPARSE_IRQ support for imx Shawn Guo
2012-06-14 5:59 ` Shawn Guo [this message]
2012-06-14 7:31 ` [PATCH 01/16] ARM: imx: eliminate macro IMX_GPIO_TO_IRQ() Dong Aisheng
2012-06-14 7:39 ` Shawn Guo
2012-06-14 8:04 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 02/16] ARM: imx: eliminate macro IOMUX_TO_IRQ() Shawn Guo
2012-06-14 7:59 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 03/16] ARM: imx: eliminate macro IRQ_GPIOx() Shawn Guo
2012-06-15 9:23 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 04/16] gpio/mxc: move irq_domain_add_legacy call into gpio driver Shawn Guo
2012-06-15 9:26 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 05/16] ARM: imx: move irq_domain_add_legacy call into tzic driver Shawn Guo
2012-06-15 9:29 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 06/16] ARM: imx: move irq_domain_add_legacy call into avic driver Shawn Guo
2012-06-14 7:13 ` Shawn Guo
2012-06-15 9:30 ` Dong Aisheng
2012-07-06 6:26 ` [PATCH] ARM: imx: select IRQ_DOMAIN Uwe Kleine-König
2012-07-06 7:05 ` Shawn Guo
2012-07-06 7:07 ` Uwe Kleine-König
2012-07-06 7:12 ` Sascha Hauer
2012-07-06 7:18 ` [PATCH] ARM: imx: select USE_OF Uwe Kleine-König
2012-07-06 7:31 ` Shawn Guo
2012-07-06 7:47 ` [PATCH v2] " Uwe Kleine-König
2012-07-06 8:04 ` Shawn Guo
2012-07-06 19:15 ` Arnd Bergmann
2012-06-14 5:59 ` [PATCH 07/16] dma: ipu: remove the use of ipu_platform_data Shawn Guo
2012-06-14 10:26 ` Vinod Koul
2012-06-15 9:37 ` Dong Aisheng
2012-06-16 3:01 ` Shawn Guo
2012-06-18 8:19 ` Dong Aisheng
2012-06-18 14:02 ` Shawn Guo
2012-06-19 5:51 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 08/16] ARM: imx: leave irq_base of wm8350_platform_data uninitialized Shawn Guo
2012-06-15 12:20 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 09/16] ARM: imx: pass gpio than irq number into mxc_expio_init Shawn Guo
2012-06-15 12:21 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 10/16] ARM: imx: add a legacy irqdomain for 3ds_debugboard Shawn Guo
2012-06-15 12:22 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 11/16] ARM: imx: add a legacy irqdomain for mx31ads Shawn Guo
2012-06-18 8:20 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 12/16] i2c: imx: remove unneeded mach/irqs.h inclusion Shawn Guo
2012-06-14 7:30 ` Wolfram Sang
2012-06-18 8:20 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 13/16] ARM: imx: remove unneeded mach/irq.h inclusion Shawn Guo
2012-06-18 8:21 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 14/16] tty: serial: imx: remove the use of MXC_INTERNAL_IRQS Shawn Guo
2012-06-14 15:37 ` Greg Kroah-Hartman
2012-06-18 8:22 ` Dong Aisheng
2012-06-14 5:59 ` [PATCH 15/16] ARM: fiq: save FIQ_START by passing absolute fiq number Shawn Guo
2012-06-18 8:39 ` Dong Aisheng
2012-06-18 14:31 ` Shawn Guo
2012-06-18 16:44 ` Russell King - ARM Linux
2012-06-19 5:26 ` Shawn Guo
2012-06-20 22:55 ` Russell King - ARM Linux
2012-06-20 23:40 ` Shawn Guo
2012-06-20 23:53 ` Shawn Guo
2012-06-21 7:37 ` Russell King - ARM Linux
2012-06-21 8:50 ` Shawn Guo
2012-06-25 16:10 ` Shawn Guo
2012-06-14 5:59 ` [PATCH 16/16] ARM: imx: enable SPARSE_IRQ for imx platform Shawn Guo
2012-06-14 7:40 ` Haojian Zhuang
2012-06-14 7:55 ` Shawn Guo
2012-06-18 8:48 ` Dong Aisheng
2012-06-18 15:04 ` Shawn Guo
2012-06-19 6:16 ` Dong Aisheng
2012-06-19 6:47 ` Shawn Guo
2012-06-19 7:21 ` Dong Aisheng
2012-06-19 7:43 ` Shawn Guo
2012-06-19 13:01 ` Dong Aisheng
2012-06-19 13:19 ` [RFC PATCH 1/1] ARM: imx: enable SPARSE_IRQ for imx Dong Aisheng
2012-06-19 14:06 ` Shawn Guo
2012-06-20 2:23 ` Dong Aisheng
2012-06-20 5:40 ` Shawn Guo
2012-06-20 6:40 ` Dong Aisheng
2012-06-20 12:57 ` Shawn Guo
2012-06-20 14:45 ` Dong Aisheng
2012-06-14 8:00 ` [PATCH 00/16] Enable SPARSE_IRQ support " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339653587-4832-2-git-send-email-shawn.guo@linaro.org \
--to=shawn.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).