From 5de62b86d2f5cf3459cb02ecb7a4530787bbd898 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 7 Dec 2010 16:26:58 -0800 Subject: omap1: Fix gpio mpuio bank to work for multi-omap for 7xx/15xx/16xx We need to divide the 15xx/16xx offset by 2 for 7xx. Use bank->stride for that. This allows us to get rid of the duplicate defines for the MPUIO registers. Note that this will cause omap-keypad.c driver to not work on 7xx. However, the right fix there is to move over to matrix_keypad instead as suggested by Cory Maccarrone and Janusz Krzysztofik . Cc: Cory Maccarrone Acked-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/gpio15xx.c | 1 + arch/arm/mach-omap1/gpio16xx.c | 1 + arch/arm/mach-omap1/gpio7xx.c | 1 + 3 files changed, 3 insertions(+) (limited to 'arch/arm/mach-omap1') diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c index dbd81688eada..04c4b04cf54e 100644 --- a/arch/arm/mach-omap1/gpio15xx.c +++ b/arch/arm/mach-omap1/gpio15xx.c @@ -38,6 +38,7 @@ static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { .virtual_irq_start = IH_MPUIO_BASE, .bank_type = METHOD_MPUIO, .bank_width = 16, + .bank_stride = 1, }; static struct __initdata platform_device omap15xx_mpu_gpio = { diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c index 8d4d0a061b56..5dd0d4c82b24 100644 --- a/arch/arm/mach-omap1/gpio16xx.c +++ b/arch/arm/mach-omap1/gpio16xx.c @@ -41,6 +41,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { .virtual_irq_start = IH_MPUIO_BASE, .bank_type = METHOD_MPUIO, .bank_width = 16, + .bank_stride = 1, }; static struct __initdata platform_device omap16xx_mpu_gpio = { diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c index 94bccd44181d..1204c8b871af 100644 --- a/arch/arm/mach-omap1/gpio7xx.c +++ b/arch/arm/mach-omap1/gpio7xx.c @@ -43,6 +43,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { .virtual_irq_start = IH_MPUIO_BASE, .bank_type = METHOD_MPUIO, .bank_width = 32, + .bank_stride = 2, }; static struct __initdata platform_device omap7xx_mpu_gpio = { -- cgit v1.2.3