diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/include/asm/oplib_32.h | 5 | ||||
-rw-r--r-- | arch/sparc/include/asm/oplib_64.h | 5 | ||||
-rw-r--r-- | arch/sparc/prom/console_32.c | 41 | ||||
-rw-r--r-- | arch/sparc/prom/console_64.c | 32 |
4 files changed, 0 insertions, 83 deletions
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 4c2539243e46..40bc9efb1ac4 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h | |||
@@ -102,11 +102,6 @@ extern int prom_getrev(void); | |||
102 | /* Get the prom firmware revision. */ | 102 | /* Get the prom firmware revision. */ |
103 | extern int prom_getprev(void); | 103 | extern int prom_getprev(void); |
104 | 104 | ||
105 | /* Character operations to/from the console.... */ | ||
106 | |||
107 | /* Blocking get character from console. */ | ||
108 | extern void prom_getchar(char *buf); | ||
109 | |||
110 | /* Blocking put character to console. */ | 105 | /* Blocking put character to console. */ |
111 | extern void prom_putchar(const char *buf); | 106 | extern void prom_putchar(const char *buf); |
112 | 107 | ||
diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 384e558a6a3c..d4613738c537 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h | |||
@@ -94,11 +94,6 @@ extern void prom_halt_power_off(void) __attribute__ ((noreturn)); | |||
94 | */ | 94 | */ |
95 | extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); | 95 | extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); |
96 | 96 | ||
97 | /* Character operations to/from the console.... */ | ||
98 | |||
99 | /* Blocking get character from console. */ | ||
100 | extern void prom_getchar(char *buf); | ||
101 | |||
102 | /* Blocking put character to console. */ | 97 | /* Blocking put character to console. */ |
103 | extern void prom_putchar(const char *buf); | 98 | extern void prom_putchar(const char *buf); |
104 | 99 | ||
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 | { |
diff --git a/arch/sparc/prom/console_64.c b/arch/sparc/prom/console_64.c index a9a575433ce9..0da88d10beff 100644 --- a/arch/sparc/prom/console_64.c +++ b/arch/sparc/prom/console_64.c | |||
@@ -15,28 +15,6 @@ | |||
15 | 15 | ||
16 | extern int prom_stdin, prom_stdout; | 16 | extern int prom_stdin, prom_stdout; |
17 | 17 | ||
18 | /* Non blocking get character from console input device, returns -1 | ||
19 | * if no input was taken. This can be used for polling. | ||
20 | */ | ||
21 | static int prom_nbgetchar(char *buf) | ||
22 | { | ||
23 | unsigned long args[7]; | ||
24 | |||
25 | args[0] = (unsigned long) "read"; | ||
26 | args[1] = 3; | ||
27 | args[2] = 1; | ||
28 | args[3] = (unsigned int) prom_stdin; | ||
29 | args[4] = (unsigned long) buf; | ||
30 | args[5] = 1; | ||
31 | args[6] = (unsigned long) -1; | ||
32 | |||
33 | p1275_cmd_direct(args); | ||
34 | |||
35 | if (args[6] == 1) | ||
36 | return 0; | ||
37 | return -1; | ||
38 | } | ||
39 | |||
40 | /* Non blocking put character to console device, returns -1 if | 18 | /* Non blocking put character to console device, returns -1 if |
41 | * unsuccessful. | 19 | * unsuccessful. |
42 | */ | 20 | */ |
@@ -60,16 +38,6 @@ static int prom_nbputchar(const char *buf) | |||
60 | return -1; | 38 | return -1; |
61 | } | 39 | } |
62 | 40 | ||
63 | /* Blocking version of get character routine above. */ | ||
64 | void prom_getchar(char *buf) | ||
65 | { | ||
66 | while (1) { | ||
67 | int err = prom_nbgetchar(buf); | ||
68 | if (!err) | ||
69 | break; | ||
70 | } | ||
71 | } | ||
72 | |||
73 | /* Blocking version of put character routine above. */ | 41 | /* Blocking version of put character routine above. */ |
74 | void prom_putchar(const char *buf) | 42 | void prom_putchar(const char *buf) |
75 | { | 43 | { |