aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-11-30 17:53:05 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-30 17:53:05 -0500
commit12c7a35ee6a1c605e740733f2cbd5b5079f09f0f (patch)
treeac455e10582f9818159ba574bc4bd9dddad947e5 /arch/sparc/prom
parente62cac1fd035b4cde707285008499dbe71955a86 (diff)
sparc: Delete prom_*getchar().
Completely unused. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/prom')
-rw-r--r--arch/sparc/prom/console_32.c41
-rw-r--r--arch/sparc/prom/console_64.c32
2 files changed, 0 insertions, 73 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
17extern void restore_current(void); 17extern 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 */
22static 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. */
78void 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. */
88void prom_putchar(const char *buf) 47void 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
16extern int prom_stdin, prom_stdout; 16extern 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 */
21static 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. */
64void 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. */
74void prom_putchar(const char *buf) 42void prom_putchar(const char *buf)
75{ 43{