]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: imx: temporarily revert GPIO cleanup
authorArnd Bergmann <arnd@arndb.de>
Fri, 26 Aug 2011 17:19:10 +0000 (17:19 +0000)
committerArnd Bergmann <arnd@arndb.de>
Fri, 26 Aug 2011 17:19:10 +0000 (17:19 +0000)
This conflicts with a series of gpio cleanups that is already
in rmk's tree. I'll revert this one for now and let Shawn
figure it out.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
14 files changed:
arch/arm/mach-imx/mach-cpuimx35.c
arch/arm/mach-imx/mach-mx27_3ds.c
arch/arm/mach-imx/mach-vpr200.c
arch/arm/mach-mx5/board-cpuimx51.c
arch/arm/mach-mx5/board-cpuimx51sd.c
arch/arm/mach-mx5/board-mx53_ard.c
arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
arch/arm/mach-mx5/mx51_efika.c
arch/arm/mach-mxs/include/mach/gpio.h
arch/arm/mach-mxs/include/mach/mxs.h
arch/arm/plat-mxc/include/mach/gpio.h
arch/arm/plat-mxc/include/mach/hardware.h
drivers/gpio/gpio-mxc.c
drivers/gpio/gpio-mxs.c

index e2a7a3785d6f405697eb6842f44ef2c85347e116..10b89139da4853961a745ede3f0f48f47d5ea034 100644 (file)
@@ -66,7 +66,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            = gpio_to_irq(TSC2007_IRQGPIO),
        },
 };
 
index bcf480b8a9f884a70ff33eeaf16d97a893d2709a..2eafbac2c76356dad02db7bb13a08ec64f1b5726 100644 (file)
@@ -359,7 +359,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 = gpio_to_irq(PMIC_INT),
                .mode = SPI_CS_HIGH,
        }, {
                .modalias       = "l4f00242t03",
index 5250283479e71479d2cd6139223b3552a085a181..7d8e012a6335957ae91485230d96d7eb45adf020 100644 (file)
@@ -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 = gpio_to_irq(GPIO_PMIC_INT),
        }
 };
 
index 190a6e73ec7b1edfbcf0b0d57fab13b081dae0de..cb08e00122fa9b068161c68c379244728b70d1b9 100644 (file)
@@ -54,7 +54,7 @@
 static struct plat_serial8250_port serial_platform_data[] = {
        {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
-               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTA_GPIO),
+               .irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@ -62,7 +62,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000),
-               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTB_GPIO),
+               .irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@ -70,7 +70,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000),
-               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTC_GPIO),
+               .irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@ -78,7 +78,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000),
-               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTD_GPIO),
+               .irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
index 72410d201f88989f300347c2ebcd61c4410e24d4..034f8a89c05b42085f9ee97b9d2b66a4fcffc152 100644 (file)
@@ -126,7 +126,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
                I2C_BOARD_INFO("tsc2007", 0x49),
                .type           = "tsc2007",
                .platform_data  = &tsc2007_info,
-               .irq            = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
+               .irq            = gpio_to_irq(TSC2007_IRQGPIO),
        },
 };
 
@@ -242,7 +242,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             = gpio_to_irq(CAN_IRQGPIO)
        },
 };
 
index ddc3015102d503ad17affc1939d8ebcd27024463..76a67c4a2a0b9f80a013f821240bfebff8dc3edc 100644 (file)
@@ -134,8 +134,8 @@ 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),
+               .start =  gpio_to_irq(ARD_ETHERNET_INT_B),
+               .end =  gpio_to_irq(ARD_ETHERNET_INT_B),
                .flags = IORESOURCE_IRQ,
        },
 };
index a6a3ab8f1b1c3526fc52eeaec20e037cd61fbd97..72ce75505b1eb9dfc64e4a63f6d3d70ae67b843e 100644 (file)
@@ -159,7 +159,7 @@ struct tsc2007_platform_data tsc2007_data = {
 static struct i2c_board_info mbimx51_i2c_devices[] = {
        {
                I2C_BOARD_INFO("tsc2007", 0x49),
-               .irq  = IMX_GPIO_TO_IRQ(MBIMX51_TSC2007_GPIO),
+               .irq  = gpio_to_irq(MBIMX51_TSC2007_GPIO),
                .platform_data = &tsc2007_data,
        }, {
                I2C_BOARD_INFO("tlv320aic23", 0x1a),
index 83c57027de7565fe308a882d61f8e3385a89d627..02c6327319d7f209060c83e45bed9085b5eeaa8f 100644 (file)
@@ -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 = gpio_to_irq(EFIKAMX_PMIC),
        },
 };
 
index 56025aa0a639ea68d7b523c147004215dc0010cf..828ccccb6aad68dcb7b0e407f898b6d8147b2f98 100644 (file)
 
 #include <asm-generic/gpio.h>
 
+#define MXS_GPIO_NR(bank, nr)  ((bank) * 32 + (nr))
+
 /* use gpiolib dispatchers */
 #define gpio_get_value         __gpio_get_value
 #define gpio_set_value         __gpio_set_value
 #define gpio_cansleep          __gpio_cansleep
 #define gpio_to_irq            __gpio_to_irq
 
+#define irq_to_gpio(irq)       ((irq) - MXS_GPIO_IRQ_START)
+
 #endif /* __MACH_MXS_GPIO_H__ */
index 5aa5f754c846483b84db54ca1b67af03bded2d40..35a89dd27242d762d57e3f56b4bce85022fedb53 100644 (file)
@@ -86,8 +86,6 @@
        .type = _type,                                                  \
 }
 
-#define MXS_GPIO_NR(bank, nr)  ((bank) * 32 + (nr))
-
 #define MXS_SET_ADDR           0x4
 #define MXS_CLR_ADDR           0x8
 #define MXS_TOG_ADDR           0xc
index 44af0064ba1a96485d30bece8ee4d3a3183e0369..31c820c1b7960eb3e0d64aa9dfc782f9c7e4ff00 100644 (file)
 #include <mach/hardware.h>
 #include <asm-generic/gpio.h>
 
+
+/* There's a off-by-one betweem the gpio bank number and the gpiochip */
+/* range e.g. GPIO_1_5 is gpio 5 under linux */
+#define IMX_GPIO_NR(bank, nr)          (((bank) - 1) * 32 + (nr))
+
 /* use gpiolib dispatchers */
 #define gpio_get_value         __gpio_get_value
 #define gpio_set_value         __gpio_set_value
 #define gpio_cansleep          __gpio_cansleep
-#define gpio_to_irq            __gpio_to_irq
+
+#define gpio_to_irq(gpio)      (MXC_GPIO_IRQ_START + (gpio))
+#define irq_to_gpio(irq)       ((irq) - MXC_GPIO_IRQ_START)
 
 #endif
index f57ec47d6fd56c786fc993e8529c39f677395abe..a8bfd565dcad2ba73f60695ac01bf97c9e90ba81 100644 (file)
        .type = _type,                                                  \
 }
 
-/* There's a off-by-one betweem the gpio bank number and the gpiochip */
-/* 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__ */
index b588f8a41e601dfae772ee53570eec068bf5e78c..4340acae3bd3791d713b61022c13d8ed13ed4718 100644 (file)
@@ -31,8 +31,6 @@
 #include <linux/of_device.h>
 #include <asm-generic/bug.h>
 
-#define irq_to_gpio(irq)       ((irq) - MXC_GPIO_IRQ_START)
-
 enum mxc_gpio_hwtype {
        IMX1_GPIO,      /* runs on i.mx1 */
        IMX21_GPIO,     /* runs on i.mx21 and i.mx27 */
@@ -339,15 +337,6 @@ static void __devinit mxc_gpio_get_hw(struct platform_device *pdev)
        mxc_gpio_hwtype = hwtype;
 }
 
-static int mxc_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
-{
-       struct bgpio_chip *bgc = to_bgpio_chip(gc);
-       struct mxc_gpio_port *port =
-               container_of(bgc, struct mxc_gpio_port, bgc);
-
-       return port->virtual_irq_start + offset;
-}
-
 static int __devinit mxc_gpio_probe(struct platform_device *pdev)
 {
        struct device_node *np = pdev->dev.of_node;
@@ -414,7 +403,6 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev)
        if (err)
                goto out_iounmap;
 
-       port->bgc.gc.to_irq = mxc_gpio_to_irq;
        port->bgc.gc.base = pdev->id * 32;
        port->bgc.dir = port->bgc.read_reg(port->bgc.reg_dir);
        port->bgc.data = port->bgc.read_reg(port->bgc.reg_set);
index 292b50481db921d8160f0b97111f51735d7e04b3..af55a8577c2e110ff08ca872613c8910fc6b636b 100644 (file)
@@ -49,8 +49,6 @@
 #define GPIO_INT_LEV_MASK      (1 << 0)
 #define GPIO_INT_POL_MASK      (1 << 1)
 
-#define irq_to_gpio(irq)       ((irq) - MXS_GPIO_IRQ_START)
-
 struct mxs_gpio_port {
        void __iomem *base;
        int id;