[PATCH 3/3] S3C24xx needs GPIO_TRACK

Balaji Rao balaji at raobalaji.com
Mon Dec 8 18:01:48 CET 2008


On Mon, Dec 08, 2008 at 02:40:27PM -0200, Werner Almesberger wrote:
> Balaji Rao wrote:
> > But plat-s3c24xx/gpiolib.c does not use  any of the mechanisms like
> > s3c_gpiolib_add
> 
> Hmm, I see a call to s3c_gpiolib_add in s3c24xx_gpiolib_init of
> my copy of arch/arm/plat-s3c24xx/gpiolib.c: (as of commit
> 9402b27b2a497f8eeb72f6fe1045f2c5be800fe2)
> 
> > So, this using track needs a lot of work, if possible
> > at all. Right ?
> 
> Let's hope not :-) A kernel with the patches I posted boots, has a
> serial console, LCM text console, USB, WLAN, can talk to the PMU,
> and survives suspend/resume. So it seems to be reasonably healthy.
> 

Cool!

MMC was also broken due to bad state save of GPG and I was trying to fix
it and found this silly bug! The code is now gone anyway!

diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
index 6c9fbb9..df539d9 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
@@ -28,7 +28,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
 		return NULL;
 
 	chip = &s3c24xx_gpios[pin/32];
-	return (S3C2410_GPIO_OFFSET(pin) > chip->chip.ngpio) ? chip : NULL;
+	return (S3C2410_GPIO_OFFSET(pin) < chip->chip.ngpio) ? chip : NULL;
 }
 
 #endif /* __ASM_ARCH_GPIO_CORE_H */


Tested your patch and it even fixes the MMC issue. But the pmu failing
to wake us up when power is pressed during suspend still remains :(

	- Balaji




More information about the openmoko-kernel mailing list