[PATCH 12/19] ARM: layerscape: implement ls1028a debug_ll

[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 | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/include/mach/layerscape/debug_ll.h b/include/mach/layerscape/debug_ll.h
index bdb54ca4b9..22c3224340 100644
--- a/include/mach/layerscape/debug_ll.h
+++ b/include/mach/layerscape/debug_ll.h
@@ -5,10 +5,14 @@
 
 #include <io.h>
 #include <soc/fsl/immap_lsch2.h>
+#include <soc/fsl/immap_lsch3.h>
 
 #define __LS_UART_BASE(num)	LSCH2_NS16550_COM##num
 #define LS_UART_BASE(num) __LS_UART_BASE(num)
 
+#define __LSCH3_UART_BASE(num)	LSCH3_NS16550_COM##num
+#define LSCH3_UART_BASE(num) __LSCH3_UART_BASE(num)
+
 static inline uint8_t debug_ll_read_reg(void __iomem *base, int reg)
 {
 	return readb(base + reg);
@@ -31,11 +35,26 @@ static inline void ls1046a_uart_setup(void *base)
 
 static inline void ls1046a_debug_ll_init(void)
 {
-	void __iomem *base = IOMEM(LS_UART_BASE(CONFIG_DEBUG_LAYERSCAPE_UART_PORT));
+	void __iomem *base = IOMEM(LSCH3_UART_BASE(CONFIG_DEBUG_LAYERSCAPE_UART_PORT));
 
 	ls1046a_uart_setup(base);
 }
 
+static inline void ls1028a_uart_setup(void *base)
+{
+	uint16_t divisor;
+
+	divisor = debug_ll_ns16550_calc_divisor(200000000);
+	debug_ll_ns16550_init(base, divisor);
+}
+
+static inline void ls1028a_debug_ll_init(void)
+{
+	void __iomem *base = IOMEM(LS_UART_BASE(CONFIG_DEBUG_LAYERSCAPE_UART_PORT));
+
+	ls1028a_uart_setup(base);
+}
+
 static inline void ls102xa_uart_setup(void *base)
 {
 	uint16_t divisor;
-- 
2.39.2





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

  Powered by Linux