aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/Kconfig2
-rw-r--r--arch/alpha/kernel/srmcons.c18
2 files changed, 11 insertions, 9 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 775361f67bfd..dabc93649495 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -124,6 +124,7 @@ choice
124 124
125config ALPHA_GENERIC 125config ALPHA_GENERIC
126 bool "Generic" 126 bool "Generic"
127 depends on TTY
127 help 128 help
128 A generic kernel will run on all supported Alpha hardware. 129 A generic kernel will run on all supported Alpha hardware.
129 130
@@ -490,6 +491,7 @@ config VGA_HOSE
490 491
491config ALPHA_SRM 492config ALPHA_SRM
492 bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME 493 bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME
494 depends on TTY
493 default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL 495 default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
494 ---help--- 496 ---help---
495 There are two different types of booting firmware on Alphas: SRM, 497 There are two different types of booting firmware on Alphas: SRM,
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 59b7bbad8394..6f01d9ad7b81 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -44,7 +44,7 @@ typedef union _srmcons_result {
44 44
45/* called with callback_lock held */ 45/* called with callback_lock held */
46static int 46static int
47srmcons_do_receive_chars(struct tty_struct *tty) 47srmcons_do_receive_chars(struct tty_port *port)
48{ 48{
49 srmcons_result result; 49 srmcons_result result;
50 int count = 0, loops = 0; 50 int count = 0, loops = 0;
@@ -52,13 +52,13 @@ srmcons_do_receive_chars(struct tty_struct *tty)
52 do { 52 do {
53 result.as_long = callback_getc(0); 53 result.as_long = callback_getc(0);
54 if (result.bits.status < 2) { 54 if (result.bits.status < 2) {
55 tty_insert_flip_char(tty, (char)result.bits.c, 0); 55 tty_insert_flip_char(port, (char)result.bits.c, 0);
56 count++; 56 count++;
57 } 57 }
58 } while((result.bits.status & 1) && (++loops < 10)); 58 } while((result.bits.status & 1) && (++loops < 10));
59 59
60 if (count) 60 if (count)
61 tty_schedule_flip(tty); 61 tty_schedule_flip(port);
62 62
63 return count; 63 return count;
64} 64}
@@ -73,7 +73,7 @@ srmcons_receive_chars(unsigned long data)
73 73
74 local_irq_save(flags); 74 local_irq_save(flags);
75 if (spin_trylock(&srmcons_callback_lock)) { 75 if (spin_trylock(&srmcons_callback_lock)) {
76 if (!srmcons_do_receive_chars(port->tty)) 76 if (!srmcons_do_receive_chars(port))
77 incr = 100; 77 incr = 100;
78 spin_unlock(&srmcons_callback_lock); 78 spin_unlock(&srmcons_callback_lock);
79 } 79 }
@@ -88,7 +88,7 @@ srmcons_receive_chars(unsigned long data)
88 88
89/* called with callback_lock held */ 89/* called with callback_lock held */
90static int 90static int
91srmcons_do_write(struct tty_struct *tty, const char *buf, int count) 91srmcons_do_write(struct tty_port *port, const char *buf, int count)
92{ 92{
93 static char str_cr[1] = "\r"; 93 static char str_cr[1] = "\r";
94 long c, remaining = count; 94 long c, remaining = count;
@@ -113,10 +113,10 @@ srmcons_do_write(struct tty_struct *tty, const char *buf, int count)
113 cur += result.bits.c; 113 cur += result.bits.c;
114 114
115 /* 115 /*
116 * Check for pending input iff a tty was provided 116 * Check for pending input iff a tty port was provided
117 */ 117 */
118 if (tty) 118 if (port)
119 srmcons_do_receive_chars(tty); 119 srmcons_do_receive_chars(port);
120 } 120 }
121 121
122 while (need_cr) { 122 while (need_cr) {
@@ -135,7 +135,7 @@ srmcons_write(struct tty_struct *tty,
135 unsigned long flags; 135 unsigned long flags;
136 136
137 spin_lock_irqsave(&srmcons_callback_lock, flags); 137 spin_lock_irqsave(&srmcons_callback_lock, flags);
138 srmcons_do_write(tty, (const char *) buf, count); 138 srmcons_do_write(tty->port, (const char *) buf, count);
139 spin_unlock_irqrestore(&srmcons_callback_lock, flags); 139 spin_unlock_irqrestore(&srmcons_callback_lock, flags);
140 140
141 return count; 141 return count;