diff options
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index bc36edff2058..179c1f065e60 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/console.h> | 32 | #include <linux/console.h> |
33 | #include <linux/sysrq.h> | 33 | #include <linux/sysrq.h> |
34 | #include <linux/mca.h> | ||
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
37 | #include <linux/tty.h> | 36 | #include <linux/tty.h> |
@@ -2027,12 +2026,6 @@ static void serial8250_config_port(struct uart_port *port, int flags) | |||
2027 | int ret; | 2026 | int ret; |
2028 | 2027 | ||
2029 | /* | 2028 | /* |
2030 | * Don't probe for MCA ports on non-MCA machines. | ||
2031 | */ | ||
2032 | if (up->port.flags & UPF_BOOT_ONLYMCA && !MCA_bus) | ||
2033 | return; | ||
2034 | |||
2035 | /* | ||
2036 | * Find the region that we can probe for. This in turn | 2029 | * Find the region that we can probe for. This in turn |
2037 | * tells us whether we can probe for the type of port. | 2030 | * tells us whether we can probe for the type of port. |
2038 | */ | 2031 | */ |
@@ -2164,7 +2157,7 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev) | |||
2164 | /* | 2157 | /* |
2165 | * Wait for transmitter & holding register to empty | 2158 | * Wait for transmitter & holding register to empty |
2166 | */ | 2159 | */ |
2167 | static inline void wait_for_xmitr(struct uart_8250_port *up) | 2160 | static inline void wait_for_xmitr(struct uart_8250_port *up, int bits) |
2168 | { | 2161 | { |
2169 | unsigned int status, tmout = 10000; | 2162 | unsigned int status, tmout = 10000; |
2170 | 2163 | ||
@@ -2178,7 +2171,7 @@ static inline void wait_for_xmitr(struct uart_8250_port *up) | |||
2178 | if (--tmout == 0) | 2171 | if (--tmout == 0) |
2179 | break; | 2172 | break; |
2180 | udelay(1); | 2173 | udelay(1); |
2181 | } while ((status & BOTH_EMPTY) != BOTH_EMPTY); | 2174 | } while ((status & bits) != bits); |
2182 | 2175 | ||
2183 | /* Wait up to 1s for flow control if necessary */ | 2176 | /* Wait up to 1s for flow control if necessary */ |
2184 | if (up->port.flags & UPF_CONS_FLOW) { | 2177 | if (up->port.flags & UPF_CONS_FLOW) { |
@@ -2218,7 +2211,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2218 | * Now, do each character | 2211 | * Now, do each character |
2219 | */ | 2212 | */ |
2220 | for (i = 0; i < count; i++, s++) { | 2213 | for (i = 0; i < count; i++, s++) { |
2221 | wait_for_xmitr(up); | 2214 | wait_for_xmitr(up, UART_LSR_THRE); |
2222 | 2215 | ||
2223 | /* | 2216 | /* |
2224 | * Send the character out. | 2217 | * Send the character out. |
@@ -2226,7 +2219,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2226 | */ | 2219 | */ |
2227 | serial_out(up, UART_TX, *s); | 2220 | serial_out(up, UART_TX, *s); |
2228 | if (*s == 10) { | 2221 | if (*s == 10) { |
2229 | wait_for_xmitr(up); | 2222 | wait_for_xmitr(up, UART_LSR_THRE); |
2230 | serial_out(up, UART_TX, 13); | 2223 | serial_out(up, UART_TX, 13); |
2231 | } | 2224 | } |
2232 | } | 2225 | } |
@@ -2235,8 +2228,8 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2235 | * Finally, wait for transmitter to become empty | 2228 | * Finally, wait for transmitter to become empty |
2236 | * and restore the IER | 2229 | * and restore the IER |
2237 | */ | 2230 | */ |
2238 | wait_for_xmitr(up); | 2231 | wait_for_xmitr(up, BOTH_EMPTY); |
2239 | serial_out(up, UART_IER, ier); | 2232 | serial_out(up, UART_IER, ier | UART_IER_THRI); |
2240 | } | 2233 | } |
2241 | 2234 | ||
2242 | static int serial8250_console_setup(struct console *co, char *options) | 2235 | static int serial8250_console_setup(struct console *co, char *options) |