Harald Welte <[EMAIL PROTECTED]> writes: Hi,
> On Tue, May 22, 2007 at 06:20:49PM +0200, Arnaud Patard wrote: > >> > ?,2007-05-22 13:50 +0200,Harald Welte ?°: >> >> Hi Matt! >> >> >> >> The patch seems fine to me (style-wise), however: >> >> >> >> On Sun, May 20, 2007 at 04:13:20PM +0800, matt_hsu wrote: >> >> > Log: >> >> > HXD8: GPG[15:13] must be selected as input for resuming from >> >> > u-boot. >> >> >> >> the most important bit is missing: WHY? >> >> >> > I checked the source, it's result from s3c2410_ts_connect() in >> > s3c2410_ts.c. Even the GPIO configuration (GPGCON) is correct in uboot. >> > TS module would modify these important bits. >> > >> > But doesn't these bits affect resume logic for GTA01? >> > This caution is not mentioned in S3C2410 datasheet. >> > That is, GPG[13:15] are not functional pins in NAND boot mode in 2410. >> > >> > So I think this patch should be applied on GTA02 if TS module is >> > included. >> >> hmmm... Sorry, but I don't understand. When loaded, the ts driver configures >> the gpio to "ts mode" and doesn't play anymore with them. Nothing to do >> with suspend/resume. > > well, not exactly. Without looking at the documentation again, IIRC the > GPG[13:15] > gpio's are used to determine the bootup memory configuration on the > s3c2440. The resume-from-RAM code in a NAND-only configuration requires 2440 ? uh... I though we were talking about the 2410 :( > that the first 4k of the bootloader are loaded from NAND into internal > SRAM (steppingstone) for the resume logic to work. > > The current s3c2410_ts driver however seems to assume that it is always > only running on s3c2410, not s3c2440. Thus, it reconfigures GPG12..15 > unconditionally. the ts driver is called "s3c2410_ts" for some reason :) For the 2440 but the driver may need some tweaks. I'm not even sure that you need to play with GPG12..15 (I don't have a 2440 datasheet at hand so it's iirc). > > The correct solution to this problem thus is: Put the GPG12..15 > initialization in a s3c2410 specific section (runtime, not compile > time). What about doint like in the udc driver: different platforms driver structure and check against pdev->name ? May be interesting also to look at the other SoC from Samsung if they need similar tweak so that you can design a generic solution not something limited to s3c2410/s3c2440. Arnaud
