]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
powerpc/xmon: Remove unused xmon_expect() & xmon_read_poll()
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 9 Oct 2012 04:20:29 +0000 (04:20 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 15 Nov 2012 01:59:37 +0000 (12:59 +1100)
It looks like xmon_expect() was used for doing xmon over a modem (!?),
that code was dropped in 2005 in commit 51d3082 "Unify udbg (#2)".

Once xmon_expect() is gone xmon_read_poll() is unused, drop it too.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/xmon/nonstdio.c
arch/powerpc/xmon/nonstdio.h
arch/powerpc/xmon/start.c

index bfac84fbe7806693797decdd8db0deaea98bf097..a225d8046652f7513e6d212ddec65c385a24dd41 100644 (file)
@@ -23,33 +23,6 @@ static char line[256];
 static char *lineptr;
 static int lineleft;
 
-int xmon_expect(const char *str, unsigned long timeout)
-{
-       int c;
-       unsigned long t0;
-
-       /* assume 25MHz default timebase if tb_ticks_per_sec not set yet */
-       timeout *= tb_ticks_per_sec? tb_ticks_per_sec: 25000000;
-       t0 = get_tbl();
-       do {
-               lineptr = line;
-               for (;;) {
-                       c = xmon_read_poll();
-                       if (c == -1) {
-                               if (get_tbl() - t0 > timeout)
-                                       return 0;
-                               continue;
-                       }
-                       if (c == '\n')
-                               break;
-                       if (c != '\r' && lineptr < &line[sizeof(line) - 1])
-                               *lineptr++ = c;
-               }
-               *lineptr = 0;
-       } while (strstr(line, str) == NULL);
-       return 1;
-}
-
 int xmon_getchar(void)
 {
        int c;
index 23dd95f4599c3fd049eb17be31990ca6b00d3732..d8cec38ec528ae888369d6adb38aef0e6ba5cf4a 100644 (file)
@@ -9,7 +9,5 @@ extern void xmon_puts(const char *);
 extern char *xmon_gets(char *, int);
 extern void xmon_printf(const char *, ...);
 extern void xmon_map_scc(void);
-extern int xmon_expect(const char *str, unsigned long timeout);
 extern int xmon_write(const void *ptr, int nb);
 extern int xmon_readchar(void);
-extern int xmon_read_poll(void);
index 8864de2af382f767540ad4aeac24a7606750e72e..84f3a155eb4888a770e4e29e46d97668fd83eb38 100644 (file)
@@ -25,10 +25,3 @@ int xmon_readchar(void)
                return udbg_getc();
        return -1;
 }
-
-int xmon_read_poll(void)
-{
-       if (udbg_getc_poll)
-               return udbg_getc_poll();
-       return -1;
-}