[PATCH] serial: i.MX uart: Allow DTE mode in lowlevel code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some consoles must be configured for DTE mode. Allow to set this
in lowlevel code.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux