* [PATCH] serial: i.MX uart: Allow DTE mode in lowlevel code
@ 2016-11-08 13:42 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2016-11-08 13:42 UTC (permalink / raw)
To: Barebox List
Some consoles must be configured for DTE mode. Allow to set this
in lowlevel code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/serial/imx-uart.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/serial/imx-uart.h b/include/serial/imx-uart.h
index 901b26a..b40044e 100644
--- a/include/serial/imx-uart.h
+++ b/include/serial/imx-uart.h
@@ -146,6 +146,15 @@ static inline void imx_uart_setup(void __iomem *uartbase,
writel(UCR1_UARTEN, uartbase + UCR1);
}
+static inline void imx_uart_set_dte(void __iomem *uartbase)
+{
+ u32 ufcr;
+
+ ufcr = readl(uartbase + UFCR);
+ ufcr |= UFCR_DCEDTE;
+ writel(ufcr, uartbase + UFCR);
+}
+
static inline void imx50_uart_setup(void __iomem *uartbase)
{
imx_uart_setup(uartbase, 66666666);
--
2.10.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-08 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 13:42 [PATCH] serial: i.MX uart: Allow DTE mode in lowlevel code Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox