aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon/nonstdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/xmon/nonstdio.c')
-rw-r--r--arch/powerpc/xmon/nonstdio.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/powerpc/xmon/nonstdio.c b/arch/powerpc/xmon/nonstdio.c
index bfac84fbe78..a225d804665 100644
--- a/arch/powerpc/xmon/nonstdio.c
+++ b/arch/powerpc/xmon/nonstdio.c
@@ -23,33 +23,6 @@ static char line[256];
23static char *lineptr; 23static char *lineptr;
24static int lineleft; 24static int lineleft;
25 25
26int xmon_expect(const char *str, unsigned long timeout)
27{
28 int c;
29 unsigned long t0;
30
31 /* assume 25MHz default timebase if tb_ticks_per_sec not set yet */
32 timeout *= tb_ticks_per_sec? tb_ticks_per_sec: 25000000;
33 t0 = get_tbl();
34 do {
35 lineptr = line;
36 for (;;) {
37 c = xmon_read_poll();
38 if (c == -1) {
39 if (get_tbl() - t0 > timeout)
40 return 0;
41 continue;
42 }
43 if (c == '\n')
44 break;
45 if (c != '\r' && lineptr < &line[sizeof(line) - 1])
46 *lineptr++ = c;
47 }
48 *lineptr = 0;
49 } while (strstr(line, str) == NULL);
50 return 1;
51}
52
53int xmon_getchar(void) 26int xmon_getchar(void)
54{ 27{
55 int c; 28 int c;