Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226061
b: refs/heads/master
c: e9f0baf
h: refs/heads/master
i:
  226059: fb8c4f0
v: v3
  • Loading branch information
Uwe Kleine-König committed Nov 17, 2010
1 parent 89e7aa2 commit 76ab4ab
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 127 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: 3a6f52a79fc0ce1c8b950c628bcf101f8652e957
refs/heads/master: e9f0bafb4f3d32d0bc0ea7e946d667a68bae59ce
2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-imx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

# Object file lists.

obj-y := devices.o

obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o

obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o
Expand Down
124 changes: 0 additions & 124 deletions trunk/arch/arm/mach-imx/devices.c

This file was deleted.

59 changes: 59 additions & 0 deletions trunk/arch/arm/plat-mxc/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,62 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)

return 0;
}

#define DEFINE_IMX_GPIO_PORT_IRQ(soc, n, _irq) \
{ \
.chip.label = "gpio-" #n, \
.irq = _irq, \
.base = soc ## _IO_ADDRESS(soc ## _GPIO_BASE_ADDR + \
(n) * SZ_256), \
.virtual_irq_start = MXC_GPIO_IRQ_START + (n) * 32, \
}

#define DEFINE_IMX_GPIO_PORT(soc, n) \
DEFINE_IMX_GPIO_PORT_IRQ(soc, n, 0)

#define DEFINE_REGISTER_FUNCTION(prefix) \
int __init prefix ## _register_gpios(void) \
{ \
return mxc_gpio_init(prefix ## _gpio_ports, \
ARRAY_SIZE(prefix ## _gpio_ports)); \
}

#if defined(CONFIG_SOC_IMX1)
static struct mxc_gpio_port imx1_gpio_ports[] = {
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 0, MX1_GPIO_INT_PORTA),
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 1, MX1_GPIO_INT_PORTB),
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 2, MX1_GPIO_INT_PORTC),
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 3, MX1_GPIO_INT_PORTD),
};

DEFINE_REGISTER_FUNCTION(imx1)

#endif /* if defined(CONFIG_SOC_IMX1) */

#if defined(CONFIG_SOC_IMX21)
static struct mxc_gpio_port imx21_gpio_ports[] = {
DEFINE_IMX_GPIO_PORT_IRQ(MX21, 0, MX21_INT_GPIO),
DEFINE_IMX_GPIO_PORT(MX21, 1),
DEFINE_IMX_GPIO_PORT(MX21, 2),
DEFINE_IMX_GPIO_PORT(MX21, 3),
DEFINE_IMX_GPIO_PORT(MX21, 4),
DEFINE_IMX_GPIO_PORT(MX21, 5),
};

DEFINE_REGISTER_FUNCTION(imx21)

#endif /* if defined(CONFIG_SOC_IMX21) */

#if defined(CONFIG_SOC_IMX27)
static struct mxc_gpio_port imx27_gpio_ports[] = {
DEFINE_IMX_GPIO_PORT_IRQ(MX27, 0, MX27_INT_GPIO),
DEFINE_IMX_GPIO_PORT(MX27, 1),
DEFINE_IMX_GPIO_PORT(MX27, 2),
DEFINE_IMX_GPIO_PORT(MX27, 3),
DEFINE_IMX_GPIO_PORT(MX27, 4),
DEFINE_IMX_GPIO_PORT(MX27, 5),
};

DEFINE_REGISTER_FUNCTION(imx27)

#endif /* if defined(CONFIG_SOC_IMX27) */

0 comments on commit 76ab4ab

Please sign in to comment.