Occasional fail to initiate resume by incoming call, easy workaround proposed

Andy Green andy at openmoko.com
Mon Feb 9 20:39:06 CET 2009

Hash: SHA1

Somebody in the thread at some point said:
| Andy Green <andy at openmoko.com> writes:
|> Somebody in the thread at some point said:
|> | Andy Green wrote:
|> |> along with toggling the flowcontrolled state.
|> |
|> | How about toggling CTS when we set flowcontrolled before suspending ?
|> | That way, we can't race with UART init. Even in the unlikely event
|> | that we suspend before the modem has had time to bring up its UART,
|> | it wouldn't matter because then nobody has set up the modem anyway.
|> I was going to say then we stink up normal UART suspend function which
|> doesn't know about GSM, but actually we can just do it in neo1973-pm-gsm
|> suspend, it's neat and tidy.
| For some reasoning about why user-space needs to apply/release this
| flow-control instead of the kernel please consider looking at a) and
| b) at http://trac.freesmartphone.org/ticket/31#comment:3

I don't think we're talking about setting flowcontrol state in a static
way, just toggling it.  Because a message can come out of the GSM side
at any time, there is no illegal violation of Mike's scheme if we
briefly make sure to toggle CTS before setting it to the requested
static drive source.

echo "Asserting flowcontrol (suspending) the GSM."
echo "1" >/sys/devices/platform/neo1973-pm-gsm.0/flowcontrolled

	} else if (!strcmp(attr->attr.name, "flowcontrolled")) {
		if (on) {
			gta_gsm_interrupts = 0;
			s3c2410_gpio_setpin(S3C2410_GPH1, 1);
			s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_OUTP);
		} else
			s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);

so, when we suspend, after some random short interval we force nRTS0
HIGH, but you told

''Calypso will not generate any interrupt until it sees CTS_MODEM fall
for the first time after powering on. That leads to inability to''

All we need to do is

		if (on) {
			gta_gsm_interrupts = 0;
			s3c2410_gpio_setpin(S3C2410_GPH1, 0);
			s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_OUTP);
			s3c2410_gpio_setpin(S3C2410_GPH1, 1);

do you see a problem for that with regards to Mike's findings you linked to?

- -Andy
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org


More information about the openmoko-kernel mailing list