diff options
Diffstat (limited to 'arch/sparc/prom/console_32.c')
-rw-r--r-- | arch/sparc/prom/console_32.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/sparc/prom/console_32.c b/arch/sparc/prom/console_32.c index 69c16bbf1f48..157019e29fd4 100644 --- a/arch/sparc/prom/console_32.c +++ b/arch/sparc/prom/console_32.c | |||
@@ -16,37 +16,6 @@ | |||
16 | 16 | ||
17 | extern void restore_current(void); | 17 | extern void restore_current(void); |
18 | 18 | ||
19 | /* Non blocking get character from console input device, returns -1 | ||
20 | * if no input was taken. This can be used for polling. | ||
21 | */ | ||
22 | static int prom_nbgetchar(char *buf) | ||
23 | { | ||
24 | unsigned long flags; | ||
25 | int i = -1; | ||
26 | |||
27 | spin_lock_irqsave(&prom_lock, flags); | ||
28 | switch(prom_vers) { | ||
29 | case PROM_V0: | ||
30 | i = (*(romvec->pv_nbgetchar))(); | ||
31 | if (i != -1) { | ||
32 | *buf = i; | ||
33 | i = 0; | ||
34 | } | ||
35 | break; | ||
36 | case PROM_V2: | ||
37 | case PROM_V3: | ||
38 | if ((*(romvec->pv_v2devops).v2_dev_read)(*romvec->pv_v2bootargs.fd_stdin, | ||
39 | buf, 0x1) == 1) | ||
40 | i = 0; | ||
41 | break; | ||
42 | default: | ||
43 | break; | ||
44 | }; | ||
45 | restore_current(); | ||
46 | spin_unlock_irqrestore(&prom_lock, flags); | ||
47 | return i; /* Ugh, we could spin forever on unsupported proms ;( */ | ||
48 | } | ||
49 | |||
50 | /* Non blocking put character to console device, returns -1 if | 19 | /* Non blocking put character to console device, returns -1 if |
51 | * unsuccessful. | 20 | * unsuccessful. |
52 | */ | 21 | */ |
@@ -74,16 +43,6 @@ static int prom_nbputchar(const char *buf) | |||
74 | return i; /* Ugh, we could spin forever on unsupported proms ;( */ | 43 | return i; /* Ugh, we could spin forever on unsupported proms ;( */ |
75 | } | 44 | } |
76 | 45 | ||
77 | /* Blocking version of get character routine above. */ | ||
78 | void prom_getchar(char *buf) | ||
79 | { | ||
80 | while (1) { | ||
81 | int err = prom_nbgetchar(buf); | ||
82 | if (!err) | ||
83 | break; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | /* Blocking version of put character routine above. */ | 46 | /* Blocking version of put character routine above. */ |
88 | void prom_putchar(const char *buf) | 47 | void prom_putchar(const char *buf) |
89 | { | 48 | { |