aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250_early.c4
-rw-r--r--drivers/serial/8250_pci.c5
-rw-r--r--drivers/serial/uartlite.c10
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c
index 4d4c9f01be8d..1f16de719962 100644
--- a/drivers/serial/8250_early.c
+++ b/drivers/serial/8250_early.c
@@ -76,7 +76,7 @@ static void __init wait_for_xmitr(struct uart_port *port)
76 } 76 }
77} 77}
78 78
79static void __init putc(struct uart_port *port, int c) 79static void __init serial_putc(struct uart_port *port, int c)
80{ 80{
81 wait_for_xmitr(port); 81 wait_for_xmitr(port);
82 serial_out(port, UART_TX, c); 82 serial_out(port, UART_TX, c);
@@ -91,7 +91,7 @@ static void __init early_serial8250_write(struct console *console, const char *s
91 ier = serial_in(port, UART_IER); 91 ier = serial_in(port, UART_IER);
92 serial_out(port, UART_IER, 0); 92 serial_out(port, UART_IER, 0);
93 93
94 uart_console_write(port, s, count, putc); 94 uart_console_write(port, s, count, serial_putc);
95 95
96 /* Wait for transmitter to become empty and restore the IER */ 96 /* Wait for transmitter to become empty and restore the IER */
97 wait_for_xmitr(port); 97 wait_for_xmitr(port);
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 0e357562ce9e..ceb03c9e749f 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -1986,6 +1986,7 @@ static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
1986 1986
1987static int pciserial_resume_one(struct pci_dev *dev) 1987static int pciserial_resume_one(struct pci_dev *dev)
1988{ 1988{
1989 int err;
1989 struct serial_private *priv = pci_get_drvdata(dev); 1990 struct serial_private *priv = pci_get_drvdata(dev);
1990 1991
1991 pci_set_power_state(dev, PCI_D0); 1992 pci_set_power_state(dev, PCI_D0);
@@ -1995,7 +1996,9 @@ static int pciserial_resume_one(struct pci_dev *dev)
1995 /* 1996 /*
1996 * The device may have been disabled. Re-enable it. 1997 * The device may have been disabled. Re-enable it.
1997 */ 1998 */
1998 pci_enable_device(dev); 1999 err = pci_enable_device(dev);
2000 if (err)
2001 return err;
1999 2002
2000 pciserial_resume_ports(priv); 2003 pciserial_resume_ports(priv);
2001 } 2004 }
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index dfef83f14960..a85f2d31a686 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -329,12 +329,14 @@ static struct uart_ops ulite_ops = {
329static void ulite_console_wait_tx(struct uart_port *port) 329static void ulite_console_wait_tx(struct uart_port *port)
330{ 330{
331 int i; 331 int i;
332 u8 val;
332 333
333 /* wait up to 10ms for the character(s) to be sent */ 334 /* Spin waiting for TX fifo to have space available */
334 for (i = 0; i < 10000; i++) { 335 for (i = 0; i < 100000; i++) {
335 if (readb(port->membase + ULITE_STATUS) & ULITE_STATUS_TXEMPTY) 336 val = readb(port->membase + ULITE_STATUS);
337 if ((val & ULITE_STATUS_TXFULL) == 0)
336 break; 338 break;
337 udelay(1); 339 cpu_relax();
338 } 340 }
339} 341}
340 342