Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272519
b: refs/heads/master
c: 7242e24
h: refs/heads/master
i:
  272517: 4a5df4d
  272515: b670782
  272511: 329fbac
v: v3
  • Loading branch information
Troy Kisky authored and Sascha Hauer committed Aug 17, 2011
1 parent 0369b6e commit d5f14e4
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a579cebd76d87fc5c81b8752783632e63c002dcc
refs/heads/master: 7242e24a0f85d1f34286f6e153b119d43691d241
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/mach-cpuimx35.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/mach-mx27_3ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/mach-vpr200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
};

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/mach-mx5/board-cpuimx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,31 @@
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,
.iotype = UPIO_MEM,
.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,
.iotype = UPIO_MEM,
.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,
.iotype = UPIO_MEM,
.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,
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-mx5/board-cpuimx51sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {

/* Touchscreen */
/* IRQ */
_MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
};
Expand All @@ -129,7 +129,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),
},
};

Expand Down Expand Up @@ -245,7 +245,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)
},
};

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-mx5/board-mx51_babbage.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = {
static void __init mx51_babbage_init(void)
{
iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);
iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21,
PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);

imx51_soc_init();

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-mx5/board-mx53_ard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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),
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
/* LED */
MX51_PAD_NANDF_D10__GPIO3_30,
/* SWITCH */
_MX51_PAD_NANDF_D9__GPIO3_31 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
NEW_PAD_CTRL(MX51_PAD_NANDF_D9__GPIO3_31, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
/* UART2 */
Expand All @@ -66,7 +66,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
MX51_PAD_SD1_DATA2__SD1_DATA2,
MX51_PAD_SD1_DATA3__SD1_DATA3,
/* SD1 CD */
_MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
NEW_PAD_CTRL(MX51_PAD_GPIO1_0__SD1_CD, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx5/mx51_efika.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,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),
},
};

Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/arm/mach-mxs/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@

#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__ */
2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-mxs/include/mach/mxs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion trunk/arch/arm/plat-mxc/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@
#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
6 changes: 0 additions & 6 deletions trunk/arch/arm/plat-mxc/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,4 @@
.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__ */
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-mxc/include/mach/iomux-v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ typedef u64 iomux_v3_cfg_t;
((iomux_v3_cfg_t)(_sel_input_ofs) << MUX_SEL_INPUT_OFS_SHIFT) | \
((iomux_v3_cfg_t)(_sel_input) << MUX_SEL_INPUT_SHIFT))

#define NEW_PAD_CTRL(cfg, pad) (((cfg) & ~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(pad))
/*
* Use to set PAD control
*/
Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/gpio/gpio-mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/gpio/gpio-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5f14e4

Please sign in to comment.