[PATCH 10/19] ARM: Layerscape: add layerscape_uart_putc()

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

 



Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 include/mach/layerscape/debug_ll.h | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/include/mach/layerscape/debug_ll.h b/include/mach/layerscape/debug_ll.h
index 23af0118cc..bdb54ca4b9 100644
--- a/include/mach/layerscape/debug_ll.h
+++ b/include/mach/layerscape/debug_ll.h
@@ -21,24 +21,36 @@ static inline void debug_ll_write_reg(void __iomem *base, int reg, uint8_t val)
 
 #include <debug_ll/ns16550.h>
 
-static inline void ls1046a_debug_ll_init(void)
+static inline void ls1046a_uart_setup(void *base)
 {
-	void __iomem *base = IOMEM(LS_UART_BASE(CONFIG_DEBUG_LAYERSCAPE_UART_PORT));
 	uint16_t divisor;
 
 	divisor = debug_ll_ns16550_calc_divisor(300000000);
 	debug_ll_ns16550_init(base, divisor);
 }
 
-static inline void ls102xa_debug_ll_init(void)
+static inline void ls1046a_debug_ll_init(void)
 {
 	void __iomem *base = IOMEM(LS_UART_BASE(CONFIG_DEBUG_LAYERSCAPE_UART_PORT));
+
+	ls1046a_uart_setup(base);
+}
+
+static inline void ls102xa_uart_setup(void *base)
+{
 	uint16_t divisor;
 
 	divisor = debug_ll_ns16550_calc_divisor(150000000);
 	debug_ll_ns16550_init(base, divisor);
 }
 
+static inline void ls102xa_debug_ll_init(void)
+{
+	void __iomem *base = IOMEM(LS_UART_BASE(CONFIG_DEBUG_LAYERSCAPE_UART_PORT));
+
+	ls102xa_uart_setup(base);
+}
+
 static inline void PUTC_LL(int c)
 {
 	void __iomem *base = IOMEM(LS_UART_BASE(CONFIG_DEBUG_LAYERSCAPE_UART_PORT));
@@ -46,4 +58,9 @@ static inline void PUTC_LL(int c)
 	debug_ll_ns16550_putc(base, c);
 }
 
+static inline void layerscape_uart_putc(void *base, int c)
+{
+	debug_ll_ns16550_putc(base, c);
+}
+
 #endif /* __MACH_LAYERSCAPE_DEBUG_LL_H__ */
-- 
2.39.2





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

  Powered by Linux