public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] ctrl-c detection (on 4xx platforms)
@ 2008-09-11 15:23 Matthias Fuchs
  2008-09-11 20:55 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Fuchs @ 2008-09-11 15:23 UTC (permalink / raw)
  To: u-boot

Hi,

I noticed some strange CTRL-C behavior in a BSP command. 
When I run my bsp command interactively everything is fine.
The command waits for a condition and displays a rotating cursor
(see board/esd/common/cmd_loadpci.c):

...
int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	...
	char str[] = "\\|/-";
	...

	while(1) {
		...
		*ptr = 0xffffffff;
		puts("\nWaiting for action from pci host -");

		/*
		 * Wait for host to write the start address
		 */
		while (*ptr == 0xffffffff) {
			count++;
			if (!(count % 100)) {
				count2++;
				putc(0x08); /* backspace */
				putc(str[count2 % 4]);
			}

			/* Abort if ctrl-c was pressed */
			if (ctrlc()) {
				puts("\nAbort\n");
				return 0;
			}

			udelay(1000);
		}
	}
	...
}

But when I call this bsp command as bootcmd CTRL-C does not stop the while loop. So CTRL-C 
is not detected. Any idea?

Matthias

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-13 16:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11 15:23 [U-Boot] ctrl-c detection (on 4xx platforms) Matthias Fuchs
2008-09-11 20:55 ` Wolfgang Denk
2008-09-12  7:00   ` Matthias Fuchs
2008-09-12  7:55     ` Matthias Fuchs
2008-09-12  9:08       ` Wolfgang Denk
2008-09-13 16:51         ` Matthias Fuchs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox