}
}
+#ifdef CONFIG_SERIAL_8250_RSA
static int serial8250_request_rsa_resource(struct uart_8250_port *up)
{
unsigned long start = UART_RSA_BASE << up->port.regshift;
break;
}
}
+#endif
static void serial8250_release_port(struct uart_port *port)
{
struct uart_8250_port *up = up_to_u8250p(port);
serial8250_release_std_resource(up);
+#ifdef CONFIG_SERIAL_8250_RSA
if (port->type == PORT_RSA)
serial8250_release_rsa_resource(up);
+#endif
}
static int serial8250_request_port(struct uart_port *port)
return -ENODEV;
ret = serial8250_request_std_resource(up);
+#ifdef CONFIG_SERIAL_8250_RSA
if (ret == 0 && port->type == PORT_RSA) {
ret = serial8250_request_rsa_resource(up);
if (ret < 0)
serial8250_release_std_resource(up);
}
+#endif
return ret;
}
if (ret < 0)
return;
+#ifdef CONFIG_SERIAL_8250_RSA
ret = serial8250_request_rsa_resource(up);
if (ret < 0)
probeflags &= ~PROBE_RSA;
+#endif
if (port->iotype != up->cur_iotype)
set_io_from_upio(port);
if (port->type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ)
autoconfig_irq(up);
+#ifdef CONFIG_SERIAL_8250_RSA
if (port->type != PORT_RSA && probeflags & PROBE_RSA)
serial8250_release_rsa_resource(up);
+#endif
if (port->type == PORT_UNKNOWN)
serial8250_release_std_resource(up);