/* Override the default 8250 read handler: mem_serial_in() Empty RX fifo read causes an abort on omap3630 and omap4 This function makes sure that an empty rx fifo is not read on these silicons (OMAP are not affected)  */
static unsigned int serial_in_override(struct uart_port *up, int offset)
/* Override the default 8250 read handler: mem_serial_in() Empty RX fifo read causes an abort on omap3630 and omap4 This function makes sure that an empty rx fifo is not read on these silicons (OMAP are not affected)  */
static unsigned int serial_in_override(struct uart_port *up, int offset)
{
	if (UART_RX == offset) {
		unsigned int lsr;
		lsr = __serial_read_reg(up, UART_LSR);
		if (!(lsr & UART_LSR_DR))
			return -EPERM;
	}
	return __serial_read_reg(up, offset);
}