/* IER sleep support. UARTs which have EFRs need the "extended
capability" bit enabled. Note that on XR16C850s, we need to reset LCR to write to IER.  */
static void serial8250_set_sleep(struct uart_8250_port *p, int sleep)
/* IER sleep support. UARTs which have EFRs need the "extended
capability" bit enabled. Note that on XR16C850s, we need to reset LCR to write to IER.  */
static void serial8250_set_sleep(struct uart_8250_port *p, int sleep)
{
	if (p->capabilities & UART_CAP_SLEEP) {
		if (p->capabilities & UART_CAP_EFR) {
			serial_outp(p, UART_LCR, 0xBF);
			serial_outp(p, UART_EFR, UART_EFR_ECB);
			serial_outp(p, UART_LCR, 0);
		}
		serial_outp(p, UART_IER, sleep ? UART_IERX_SLEEP : 0);
		if (p->capabilities & UART_CAP_EFR) {
			serial_outp(p, UART_LCR, 0xBF);
			serial_outp(p, UART_EFR, 0);
			serial_outp(p, UART_LCR, 0);
		}
	}
}