From 31383993decd60a7cc783f402ad83ee8580008d3 Mon Sep 17 00:00:00 2001 From: merge Date: Mon, 8 Dec 2008 16:57:14 +0000 Subject: MERGE-via-pending-tracking-hist-s3c24xx-needs-gpio_track pending-tracking-hist top was s3c24xx-needs-gpio_track / da546f30820208681442d98d29aadd2e6a909a09 ... parent commitmessage: From: Werner Almesberger S3C24xx needs GPIO_TRACK s3c_gpiolib_getchip for 24xx assumes that, as far as addressing is concerned, all ports have 32 pins. However, there are two flaws in this logic: 1) gpiolib only assigns pin number for real pins (with the exception of gaps added with CONFIG_S3C_GPIO_SPACE), and 2) not all ports have the same number of pins. This patch makes 24xx use the more generic platform s3c_gpiolib_getchip, like we do on 6410. Signed-off-by: Werner Almesberger --- arch/arm/mach-s3c2410/include/mach/gpio-core.h | 15 +-------------- arch/arm/plat-s3c24xx/Kconfig | 1 + 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h index 51bc7d1fb5a..b37af8c3fb8 100644 --- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h +++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h @@ -15,20 +15,7 @@ #ifndef __ASM_ARCH_GPIO_CORE_H #define __ASM_ARCH_GPIO_CORE_H __FILE__ +/* currently we just include the platform support */ #include -#include - -extern struct s3c_gpio_chip s3c24xx_gpios[]; - -static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin) -{ - struct s3c_gpio_chip *chip; - - if (pin > S3C2410_GPH10) - return NULL; - - chip = &s3c24xx_gpios[pin/32]; - return (S3C2410_GPIO_OFFSET(pin) > chip->chip.ngpio) ? chip : NULL; -} #endif /* __ASM_ARCH_GPIO_CORE_H */ diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig index 1bd3141a1d8..2fe3dca6573 100644 --- a/arch/arm/plat-s3c24xx/Kconfig +++ b/arch/arm/plat-s3c24xx/Kconfig @@ -10,6 +10,7 @@ config PLAT_S3C24XX default y select NO_IOPORT select ARCH_REQUIRE_GPIOLIB + select S3C_GPIO_TRACK help Base platform code for any Samsung S3C24XX device -- cgit v1.2.3