[PATCH] s3c2440-resume.patch

matt_hsu matt_hsu at openmoko.org
Wed May 23 10:42:40 CEST 2007


於 三,2007-05-23 於 10:09 +0200,Harald Welte 提到:
> On Wed, May 23, 2007 at 03:09:57PM +0800, matt_hsu wrote:
> > Hi all,
> > 
> > I thought the simplest correction is to set GPG[15:13] as input during
> > s3c2410_ts suspending. 
> 
> Matt, the following patch won't work:
> 
> > +#if defined(CONFIG_CPU_S3C2440)
> 
> this config means: "If the 2440 was configured as one possible supported
> CPU at compile time".
> 
> You cannot use #ifdef or any other compile-time based solution.  It has
> to be decided on runtime.
> 
> I think the best option would be to unconditionally switch those three
> GPIO's to input on all 2440 based systems.  
> 
> Ben: What are your thoghts on this?
> 
> I propose something like:
> 
> if (we_re_currently_running_on_2440) {
> 	s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPG13_INP);
> 	s3c2410_gpio_cfgpin(S3C2410_GPG14, S3C2410_GPG14_INP);
> 	s3c2410_gpio_cfgpin(S3C2410_GPG15, S3C2410_GPG15_INP);
> }

	Do you mean we should add this in s3c2410_pm_prepare()?
	Like the hxd8-resume.patch I sent before?

> I'd assume that this is always right, since you want to make sure the
> correct boot mode is selected upon resume.  Right?
	yes
> 
> > +#if defined(CONFIG_CPU_S3C2440)
> > +
> > +	s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPG13_nXPON);
> > +	s3c2410_gpio_cfgpin(S3C2410_GPG14, S3C2410_GPG14_YMON);
> > +	s3c2410_gpio_cfgpin(S3C2410_GPG15, S3C2410_GPG15_nYPON);
> > +
> > +#endif
> 
> Matt: this is again broken since you unconditionally switch to that
> function, no matter what the gpio config actually was before suspending.
	I see. I ignore this. sorry:(
> 





More information about the openmoko-kernel mailing list