diff options
Diffstat (limited to 'drivers/tty/serial/pmac_zilog.c')
| -rw-r--r-- | drivers/tty/serial/pmac_zilog.c | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index f87f1a0c8c6..f7ad5b90305 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -57,6 +57,8 @@  #include <linux/bitops.h>  #include <linux/sysrq.h>  #include <linux/mutex.h> +#include <linux/of_address.h> +#include <linux/of_irq.h>  #include <asm/sections.h>  #include <asm/io.h>  #include <asm/irq.h> @@ -651,6 +653,8 @@ static void pmz_start_tx(struct uart_port *port)  	} else {  		struct circ_buf *xmit = &port->state->xmit; +		if (uart_circ_empty(xmit)) +			goto out;  		write_zsdata(uap, xmit->buf[xmit->tail]);  		zssync(uap);  		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); @@ -659,6 +663,7 @@ static void pmz_start_tx(struct uart_port *port)  		if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)  			uart_write_wakeup(&uap->port);  	} + out:  	pmz_debug("pmz: start_tx() done.\n");  } @@ -1072,7 +1077,7 @@ static void pmz_convert_to_zs(struct uart_pmac_port *uap, unsigned int cflag,  		uap->curregs[5] |= Tx8;  		uap->parity_mask = 0xff;  		break; -	}; +	}  	uap->curregs[4] &= ~(SB_MASK);  	if (cflag & CSTOPB)  		uap->curregs[4] |= SB2; @@ -1090,7 +1095,7 @@ static void pmz_convert_to_zs(struct uart_pmac_port *uap, unsigned int cflag,  	uap->port.read_status_mask = Rx_OVR;  	if (iflag & INPCK)  		uap->port.read_status_mask |= CRC_ERR | PAR_ERR; -	if (iflag & (BRKINT | PARMRK)) +	if (iflag & (IGNBRK | BRKINT | PARMRK))  		uap->port.read_status_mask |= BRK_ABRT;  	uap->port.ignore_status_mask = 0; @@ -2050,6 +2055,9 @@ static int __init pmz_console_init(void)  	/* Probe ports */  	pmz_probe(); +	if (pmz_ports_count == 0) +		return -ENODEV; +  	/* TODO: Autoprobe console based on OF */  	/* pmz_console.index = i; */  	register_console(&pmz_console);  | 
