···3131#include <linux/init.h>3232#include <linux/console.h>3333#include <linux/sysrq.h>3434-#include <linux/mca.h>3534#include <linux/delay.h>3635#include <linux/platform_device.h>3736#include <linux/tty.h>···20262027 int ret;2027202820282029 /*20292029- * Don't probe for MCA ports on non-MCA machines.20302030- */20312031- if (up->port.flags & UPF_BOOT_ONLYMCA && !MCA_bus)20322032- return;20332033-20342034- /*20352030 * Find the region that we can probe for. This in turn20362031 * tells us whether we can probe for the type of port.20372032 */···21572164/*21582165 * Wait for transmitter & holding register to empty21592166 */21602160-static inline void wait_for_xmitr(struct uart_8250_port *up)21672167+static inline void wait_for_xmitr(struct uart_8250_port *up, int bits)21612168{21622169 unsigned int status, tmout = 10000;21632170···21712178 if (--tmout == 0)21722179 break;21732180 udelay(1);21742174- } while ((status & BOTH_EMPTY) != BOTH_EMPTY);21812181+ } while ((status & bits) != bits);2175218221762183 /* Wait up to 1s for flow control if necessary */21772184 if (up->port.flags & UPF_CONS_FLOW) {···22112218 * Now, do each character22122219 */22132220 for (i = 0; i < count; i++, s++) {22142214- wait_for_xmitr(up);22212221+ wait_for_xmitr(up, UART_LSR_THRE);2215222222162223 /*22172224 * Send the character out.···22192226 */22202227 serial_out(up, UART_TX, *s);22212228 if (*s == 10) {22222222- wait_for_xmitr(up);22292229+ wait_for_xmitr(up, UART_LSR_THRE);22232230 serial_out(up, UART_TX, 13);22242231 }22252232 }···22282235 * Finally, wait for transmitter to become empty22292236 * and restore the IER22302237 */22312231- wait_for_xmitr(up);22322232- serial_out(up, UART_IER, ier);22382238+ wait_for_xmitr(up, BOTH_EMPTY);22392239+ serial_out(up, UART_IER, ier | UART_IER_THRI);22332240}2234224122352242static int serial8250_console_setup(struct console *co, char *options)
+1-1
drivers/serial/Kconfig
···2323 work.)24242525 To compile this driver as a module, choose M here: the2626- module will be called serial.2626+ module will be called 8250.2727 [WARNING: Do not compile this driver as a module if you are using2828 non-standard serial ports, since the configuration information will2929 be lost when the driver is unloaded. This limitation may be lifted