diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2012-10-09 00:20:29 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-11-14 20:59:37 -0500 |
commit | eb1c2abb611b51a935cdb36bbc0e364958ccb83c (patch) | |
tree | 91e00bce431972be7fcf08e1715ef6d893c7866c /arch/powerpc/xmon | |
parent | 6432200aa8de3242d64c02e0bf29305147df0171 (diff) |
powerpc/xmon: Remove unused xmon_expect() & xmon_read_poll()
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>
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r-- | arch/powerpc/xmon/nonstdio.c | 27 | ||||
-rw-r--r-- | arch/powerpc/xmon/nonstdio.h | 2 | ||||
-rw-r--r-- | arch/powerpc/xmon/start.c | 7 |
3 files changed, 0 insertions, 36 deletions
diff --git a/arch/powerpc/xmon/nonstdio.c b/arch/powerpc/xmon/nonstdio.c index bfac84fbe780..a225d8046652 100644 --- a/arch/powerpc/xmon/nonstdio.c +++ b/arch/powerpc/xmon/nonstdio.c | |||
@@ -23,33 +23,6 @@ static char line[256]; | |||
23 | static char *lineptr; | 23 | static char *lineptr; |
24 | static int lineleft; | 24 | static int lineleft; |
25 | 25 | ||
26 | int 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 | |||
53 | int xmon_getchar(void) | 26 | int xmon_getchar(void) |
54 | { | 27 | { |
55 | int c; | 28 | int c; |
diff --git a/arch/powerpc/xmon/nonstdio.h b/arch/powerpc/xmon/nonstdio.h index 23dd95f4599c..d8cec38ec528 100644 --- a/arch/powerpc/xmon/nonstdio.h +++ b/arch/powerpc/xmon/nonstdio.h | |||
@@ -9,7 +9,5 @@ extern void xmon_puts(const char *); | |||
9 | extern char *xmon_gets(char *, int); | 9 | extern char *xmon_gets(char *, int); |
10 | extern void xmon_printf(const char *, ...); | 10 | extern void xmon_printf(const char *, ...); |
11 | extern void xmon_map_scc(void); | 11 | extern void xmon_map_scc(void); |
12 | extern int xmon_expect(const char *str, unsigned long timeout); | ||
13 | extern int xmon_write(const void *ptr, int nb); | 12 | extern int xmon_write(const void *ptr, int nb); |
14 | extern int xmon_readchar(void); | 13 | extern int xmon_readchar(void); |
15 | extern int xmon_read_poll(void); | ||
diff --git a/arch/powerpc/xmon/start.c b/arch/powerpc/xmon/start.c index 8864de2af382..84f3a155eb48 100644 --- a/arch/powerpc/xmon/start.c +++ b/arch/powerpc/xmon/start.c | |||
@@ -25,10 +25,3 @@ int xmon_readchar(void) | |||
25 | return udbg_getc(); | 25 | return udbg_getc(); |
26 | return -1; | 26 | return -1; |
27 | } | 27 | } |
28 | |||
29 | int xmon_read_poll(void) | ||
30 | { | ||
31 | if (udbg_getc_poll) | ||
32 | return udbg_getc_poll(); | ||
33 | return -1; | ||
34 | } | ||