You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ARM: pxa: rename gpio_to_irq and irq_to_gpio
Avoid to define gpio_to_irq() and irq_to_gpio() for potential name confliction since multiple architecture will be built together. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
This commit is contained in:
@@ -120,8 +120,8 @@ static struct resource smc91x_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gpio_to_irq(27),
|
||||
.end = gpio_to_irq(27),
|
||||
.start = MMP_GPIO_TO_IRQ(27),
|
||||
.end = MMP_GPIO_TO_IRQ(27),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -87,8 +87,8 @@ static struct resource smc91x_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gpio_to_irq(155),
|
||||
.end = gpio_to_irq(155),
|
||||
.start = MMP_GPIO_TO_IRQ(155),
|
||||
.end = MMP_GPIO_TO_IRQ(155),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define __ASM_MACH_GPIO_PXA_H
|
||||
|
||||
#include <mach/addr-map.h>
|
||||
#include <mach/cputype.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000)
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
#define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio))
|
||||
#define irq_to_gpio(irq) ((irq) - IRQ_GPIO_START)
|
||||
|
||||
#define __gpio_is_inverted(gpio) (0)
|
||||
#define __gpio_is_occupied(gpio) (0)
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@
|
||||
#define IRQ_GPIO_START 128
|
||||
#define IRQ_GPIO_NUM 192
|
||||
#define IRQ_GPIO(x) (IRQ_GPIO_START + (x))
|
||||
#define MMP_GPIO_TO_IRQ(gpio) (IRQ_GPIO_START + (gpio))
|
||||
|
||||
#define IRQ_BOARD_START (IRQ_GPIO_START + IRQ_GPIO_NUM)
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ static struct resource smc91x_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gpio_to_irq(80),
|
||||
.end = gpio_to_irq(80),
|
||||
.start = MMP_GPIO_TO_IRQ(80),
|
||||
.end = MMP_GPIO_TO_IRQ(80),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = {
|
||||
static struct i2c_board_info teton_bga_i2c_info[] __initdata = {
|
||||
{
|
||||
I2C_BOARD_INFO("ds1337", 0x68),
|
||||
.irq = gpio_to_irq(RTC_INT_GPIO)
|
||||
.irq = MMP_GPIO_TO_IRQ(RTC_INT_GPIO)
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ static struct resource capc7117_ide_resources[] = {
|
||||
.flags = IORESOURCE_MEM
|
||||
},
|
||||
[2] = {
|
||||
.start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)),
|
||||
.end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)),
|
||||
.start = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO76)),
|
||||
.end = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO76)),
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING
|
||||
}
|
||||
};
|
||||
@@ -80,7 +80,7 @@ static void __init capc7117_ide_init(void)
|
||||
static struct plat_serial8250_port ti16c752_platform_data[] = {
|
||||
[0] = {
|
||||
.mapbase = 0x14000000,
|
||||
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO78)),
|
||||
.irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO78)),
|
||||
.irqflags = IRQF_TRIGGER_RISING,
|
||||
.flags = TI16C752_FLAGS,
|
||||
.iotype = UPIO_MEM,
|
||||
@@ -89,7 +89,7 @@ static struct plat_serial8250_port ti16c752_platform_data[] = {
|
||||
},
|
||||
[1] = {
|
||||
.mapbase = 0x14000040,
|
||||
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO79)),
|
||||
.irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO79)),
|
||||
.irqflags = IRQF_TRIGGER_RISING,
|
||||
.flags = TI16C752_FLAGS,
|
||||
.iotype = UPIO_MEM,
|
||||
@@ -98,7 +98,7 @@ static struct plat_serial8250_port ti16c752_platform_data[] = {
|
||||
},
|
||||
[2] = {
|
||||
.mapbase = 0x14000080,
|
||||
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO80)),
|
||||
.irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO80)),
|
||||
.irqflags = IRQF_TRIGGER_RISING,
|
||||
.flags = TI16C752_FLAGS,
|
||||
.iotype = UPIO_MEM,
|
||||
@@ -107,7 +107,7 @@ static struct plat_serial8250_port ti16c752_platform_data[] = {
|
||||
},
|
||||
[3] = {
|
||||
.mapbase = 0x140000c0,
|
||||
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO81)),
|
||||
.irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO81)),
|
||||
.irqflags = IRQF_TRIGGER_RISING,
|
||||
.flags = TI16C752_FLAGS,
|
||||
.iotype = UPIO_MEM,
|
||||
|
||||
@@ -380,7 +380,7 @@ static struct spi_board_info cm_x270_spi_devices[] __initdata = {
|
||||
.modalias = "libertas_spi",
|
||||
.max_speed_hz = 13000000,
|
||||
.bus_num = 2,
|
||||
.irq = gpio_to_irq(95),
|
||||
.irq = PXA_GPIO_TO_IRQ(95),
|
||||
.chip_select = 0,
|
||||
.controller_data = &cm_x270_libertas_chip,
|
||||
.platform_data = &cm_x270_libertas_pdata,
|
||||
|
||||
@@ -218,8 +218,8 @@ static struct resource colibri_pxa270_dm9000_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = gpio_to_irq(GPIO114_COLIBRI_PXA270_ETH_IRQ),
|
||||
.end = gpio_to_irq(GPIO114_COLIBRI_PXA270_ETH_IRQ),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIO114_COLIBRI_PXA270_ETH_IRQ),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIO114_COLIBRI_PXA270_ETH_IRQ),
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING,
|
||||
},
|
||||
};
|
||||
@@ -249,7 +249,7 @@ static pxa2xx_audio_ops_t colibri_pxa270_ac97_pdata = {
|
||||
};
|
||||
|
||||
static struct ucb1400_pdata colibri_pxa270_ucb1400_pdata = {
|
||||
.irq = gpio_to_irq(GPIO113_COLIBRI_PXA270_TS_IRQ),
|
||||
.irq = PXA_GPIO_TO_IRQ(GPIO113_COLIBRI_PXA270_TS_IRQ),
|
||||
};
|
||||
|
||||
static struct platform_device colibri_pxa270_ucb1400_device = {
|
||||
|
||||
@@ -78,8 +78,8 @@ static struct resource colibri_asix_resource[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
|
||||
.end = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
|
||||
.start = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO),
|
||||
.end = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO),
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -115,8 +115,8 @@ static struct resource colibri_asix_resource[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
|
||||
.end = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
|
||||
.start = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO),
|
||||
.end = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO),
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -531,7 +531,7 @@ static struct spi_board_info corgi_spi_devices[] = {
|
||||
.chip_select = 0,
|
||||
.platform_data = &corgi_ads7846_info,
|
||||
.controller_data= &corgi_ads7846_chip,
|
||||
.irq = gpio_to_irq(CORGI_GPIO_TP_INT),
|
||||
.irq = PXA_GPIO_TO_IRQ(CORGI_GPIO_TP_INT),
|
||||
}, {
|
||||
.modalias = "corgi-lcd",
|
||||
.max_speed_hz = 50000,
|
||||
|
||||
@@ -252,8 +252,8 @@ static struct resource asic3_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gpio_to_irq(GPIO12_HX4700_ASIC3_IRQ),
|
||||
.end = gpio_to_irq(GPIO12_HX4700_ASIC3_IRQ),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
/* SD part */
|
||||
@@ -263,8 +263,8 @@ static struct resource asic3_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[3] = {
|
||||
.start = gpio_to_irq(GPIO66_HX4700_ASIC3_nSDIO_IRQ),
|
||||
.end = gpio_to_irq(GPIO66_HX4700_ASIC3_nSDIO_IRQ),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@@ -587,7 +587,7 @@ static struct spi_board_info tsc2046_board_info[] __initdata = {
|
||||
.modalias = "ads7846",
|
||||
.bus_num = 2,
|
||||
.max_speed_hz = 2600000, /* 100 kHz sample rate */
|
||||
.irq = gpio_to_irq(GPIO58_HX4700_TSC2046_nPENIRQ),
|
||||
.irq = PXA_GPIO_TO_IRQ(GPIO58_HX4700_TSC2046_nPENIRQ),
|
||||
.platform_data = &tsc2046_info,
|
||||
.controller_data = &tsc2046_chip,
|
||||
},
|
||||
@@ -635,15 +635,15 @@ static struct resource power_supply_resources[] = {
|
||||
.name = "ac",
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
|
||||
IORESOURCE_IRQ_LOWEDGE,
|
||||
.start = gpio_to_irq(GPIOD9_nAC_IN),
|
||||
.end = gpio_to_irq(GPIOD9_nAC_IN),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN),
|
||||
},
|
||||
[1] = {
|
||||
.name = "usb",
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
|
||||
IORESOURCE_IRQ_LOWEDGE,
|
||||
.start = gpio_to_irq(GPIOD14_nUSBC_DETECT),
|
||||
.end = gpio_to_irq(GPIOD14_nUSBC_DETECT),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ static struct spi_board_info mcp251x_board_info[] = {
|
||||
.chip_select = 0,
|
||||
.platform_data = &mcp251x_info,
|
||||
.controller_data = &mcp251x_chip_info1,
|
||||
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ1)
|
||||
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ1)
|
||||
},
|
||||
{
|
||||
.modalias = "mcp2515",
|
||||
@@ -95,7 +95,7 @@ static struct spi_board_info mcp251x_board_info[] = {
|
||||
.chip_select = 1,
|
||||
.platform_data = &mcp251x_info,
|
||||
.controller_data = &mcp251x_chip_info2,
|
||||
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ2)
|
||||
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ2)
|
||||
},
|
||||
{
|
||||
.modalias = "mcp2515",
|
||||
@@ -104,7 +104,7 @@ static struct spi_board_info mcp251x_board_info[] = {
|
||||
.chip_select = 0,
|
||||
.platform_data = &mcp251x_info,
|
||||
.controller_data = &mcp251x_chip_info3,
|
||||
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ3)
|
||||
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ3)
|
||||
},
|
||||
{
|
||||
.modalias = "mcp2515",
|
||||
@@ -113,7 +113,7 @@ static struct spi_board_info mcp251x_board_info[] = {
|
||||
.chip_select = 1,
|
||||
.platform_data = &mcp251x_info,
|
||||
.controller_data = &mcp251x_chip_info4,
|
||||
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ4)
|
||||
.irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ4)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#define CSB726_FLASH_SIZE (64 * 1024 * 1024)
|
||||
#define CSB726_FLASH_uMON (8 * 1024 * 1024)
|
||||
|
||||
#define CSB726_IRQ_LAN gpio_to_irq(CSB726_GPIO_IRQ_LAN)
|
||||
#define CSB726_IRQ_SM501 gpio_to_irq(CSB726_GPIO_IRQ_SM501)
|
||||
#define CSB726_IRQ_LAN PXA_GPIO_TO_IRQ(CSB726_GPIO_IRQ_LAN)
|
||||
#define CSB726_IRQ_SM501 PXA_GPIO_TO_IRQ(CSB726_GPIO_IRQ_SM501)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,8 +28,5 @@
|
||||
/* The defines for the driver are needed for the accelerated accessors */
|
||||
#include "gpio-pxa.h"
|
||||
|
||||
#define gpio_to_irq(gpio) PXA_GPIO_TO_IRQ(gpio)
|
||||
#define irq_to_gpio(irq) (irq - PXA_GPIO_TO_IRQ(0))
|
||||
|
||||
#include <plat/gpio.h>
|
||||
#endif
|
||||
|
||||
@@ -395,7 +395,7 @@ static struct i2c_board_info littleton_i2c_info[] = {
|
||||
.type = "da9034",
|
||||
.addr = 0x34,
|
||||
.platform_data = &littleton_da9034_info,
|
||||
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO18)),
|
||||
.irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO18)),
|
||||
},
|
||||
[1] = {
|
||||
.type = "max7320",
|
||||
|
||||
@@ -184,8 +184,8 @@ static struct resource egpio_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gpio_to_irq(GPIO13_MAGICIAN_CPLD_IRQ),
|
||||
.end = gpio_to_irq(GPIO13_MAGICIAN_CPLD_IRQ),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIO13_MAGICIAN_CPLD_IRQ),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIO13_MAGICIAN_CPLD_IRQ),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@@ -468,8 +468,8 @@ static struct resource pasic3_resources[] = {
|
||||
},
|
||||
/* No IRQ handler in the PASIC3, DS1WM needs an external IRQ */
|
||||
[1] = {
|
||||
.start = gpio_to_irq(GPIO107_MAGICIAN_DS1WM_IRQ),
|
||||
.end = gpio_to_irq(GPIO107_MAGICIAN_DS1WM_IRQ),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIO107_MAGICIAN_DS1WM_IRQ),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIO107_MAGICIAN_DS1WM_IRQ),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -541,15 +541,15 @@ static struct pda_power_pdata power_pdata = {
|
||||
static struct resource power_resources[] = {
|
||||
[0] = {
|
||||
.name = "ac",
|
||||
.start = gpio_to_irq(GPIO96_AC_DETECT),
|
||||
.end = gpio_to_irq(GPIO96_AC_DETECT),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIO96_AC_DETECT),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIO96_AC_DETECT),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
|
||||
IORESOURCE_IRQ_LOWEDGE,
|
||||
},
|
||||
[1] = {
|
||||
.name = "usb",
|
||||
.start = gpio_to_irq(GPIO13_nUSB_DETECT),
|
||||
.end = gpio_to_irq(GPIO13_nUSB_DETECT),
|
||||
.start = PXA_GPIO_TO_IRQ(GPIO13_nUSB_DETECT),
|
||||
.end = PXA_GPIO_TO_IRQ(GPIO13_nUSB_DETECT),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
|
||||
IORESOURCE_IRQ_LOWEDGE,
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user