summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/uart/uart_dev_pl011.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c
index e7e0a15..d71ab11 100644
--- a/sys/dev/uart/uart_dev_pl011.c
+++ b/sys/dev/uart/uart_dev_pl011.c
@@ -120,16 +120,12 @@ uart_pl011_probe(struct uart_bas *bas)
}
static void
-uart_pl011_init(struct uart_bas *bas, int baudrate, int databits, int stopbits,
+uart_pl011_param(struct uart_bas *bas, int baudrate, int databits, int stopbits,
int parity)
{
uint32_t ctrl, line;
uint32_t baud;
- /* Mask all interrupts */
- __uart_setreg(bas, UART_IMSC, __uart_getreg(bas, UART_IMSC) &
- ~IMSC_MASK_ALL);
-
/*
* Zero all settings to make sure
* UART is disabled and not configured
@@ -179,6 +175,17 @@ uart_pl011_init(struct uart_bas *bas, int baudrate, int databits, int stopbits,
}
static void
+uart_pl011_init(struct uart_bas *bas, int baudrate, int databits, int stopbits,
+ int parity)
+{
+ /* Mask all interrupts */
+ __uart_setreg(bas, UART_IMSC, __uart_getreg(bas, UART_IMSC) &
+ ~IMSC_MASK_ALL);
+
+ uart_pl011_param(bas, baudrate, databits, stopbits, parity);
+}
+
+static void
uart_pl011_term(struct uart_bas *bas)
{
}
@@ -358,7 +365,7 @@ uart_pl011_bus_param(struct uart_softc *sc, int baudrate, int databits,
{
uart_lock(sc->sc_hwmtx);
- uart_pl011_init(&sc->sc_bas, baudrate, databits, stopbits, parity);
+ uart_pl011_param(&sc->sc_bas, baudrate, databits, stopbits, parity);
uart_unlock(sc->sc_hwmtx);
return (0);
OpenPOWER on IntegriCloud