aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Miao <eric.miao@linaro.org>2011-04-21 20:54:22 +0800
committerEric Miao <eric.miao@linaro.org>2011-04-21 23:27:36 +0800
commit318a40ec11ded9ec121d63ce4e11e1b58670c6ee (patch)
tree90dad12a5a082bd09f29d796d655fe537a8564fe
parent97c5afa9ef11295c8721e0615aae38429adffea3 (diff)
downloadlinux-linaro-natty-318a40ec11ded9ec121d63ce4e11e1b58670c6ee.tar.gz
SAUCE: MX5: GPIO registers start differently between i.MX51/53
Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r--arch/arm/mach-mx5/devices.c37
1 files changed, 34 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c
index 890d311ad0b4..b28035e7564c 100644
--- a/arch/arm/mach-mx5/devices.c
+++ b/arch/arm/mach-mx5/devices.c
@@ -214,7 +214,7 @@ struct platform_device mxc_usbh2_wakeup_device = {
.resource = usbh2_wakeup_resources,
};
-static struct mxc_gpio_port mxc_gpio_ports[] = {
+static struct mxc_gpio_port imx51_gpio_ports[] = {
{
.chip.label = "gpio-0",
.base = MX51_IO_ADDRESS(MX51_GPIO1_BASE_ADDR),
@@ -243,6 +243,37 @@ static struct mxc_gpio_port mxc_gpio_ports[] = {
.irq_high = MX51_MXC_INT_GPIO4_HIGH,
.virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 3
},
+};
+
+static struct mxc_gpio_port imx53_gpio_ports[] = {
+ {
+ .chip.label = "gpio-0",
+ .base = MX53_IO_ADDRESS(MX53_GPIO1_BASE_ADDR),
+ .irq = MX51_MXC_INT_GPIO1_LOW,
+ .irq_high = MX51_MXC_INT_GPIO1_HIGH,
+ .virtual_irq_start = MXC_GPIO_IRQ_START
+ },
+ {
+ .chip.label = "gpio-1",
+ .base = MX53_IO_ADDRESS(MX53_GPIO2_BASE_ADDR),
+ .irq = MX51_MXC_INT_GPIO2_LOW,
+ .irq_high = MX51_MXC_INT_GPIO2_HIGH,
+ .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 1
+ },
+ {
+ .chip.label = "gpio-2",
+ .base = MX53_IO_ADDRESS(MX53_GPIO3_BASE_ADDR),
+ .irq = MX51_MXC_INT_GPIO3_LOW,
+ .irq_high = MX51_MXC_INT_GPIO3_HIGH,
+ .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 2
+ },
+ {
+ .chip.label = "gpio-3",
+ .base = MX53_IO_ADDRESS(MX53_GPIO4_BASE_ADDR),
+ .irq = MX51_MXC_INT_GPIO4_LOW,
+ .irq_high = MX51_MXC_INT_GPIO4_HIGH,
+ .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 3
+ },
{
.chip.label = "gpio-4",
.base = MX53_IO_ADDRESS(MX53_GPIO5_BASE_ADDR),
@@ -268,11 +299,11 @@ static struct mxc_gpio_port mxc_gpio_ports[] = {
int __init imx51_register_gpios(void)
{
- return mxc_gpio_init(mxc_gpio_ports, 4);
+ return mxc_gpio_init(imx51_gpio_ports, ARRAY_SIZE(imx51_gpio_ports));
}
int __init imx53_register_gpios(void)
{
- return mxc_gpio_init(mxc_gpio_ports, ARRAY_SIZE(mxc_gpio_ports));
+ return mxc_gpio_init(imx53_gpio_ports, ARRAY_SIZE(imx53_gpio_ports));
}