[PATCH 2/3] MIPS: qemu-malta: debug_ll: fix serial port speed

Antony Pavlov antonynpavlov at gmail.com
Thu Feb 12 21:53:13 PST 2015


qemu-malta.dts uses clock-frequency = <1843200>,
but debug_ll.h for Malta uses another value.

This patch fixes this inconsistency.

Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 arch/mips/boards/qemu-malta/include/board/debug_ll.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/boards/qemu-malta/include/board/debug_ll.h b/arch/mips/boards/qemu-malta/include/board/debug_ll.h
index 1e56040..abeee53 100644
--- a/arch/mips/boards/qemu-malta/include/board/debug_ll.h
+++ b/arch/mips/boards/qemu-malta/include/board/debug_ll.h
@@ -22,6 +22,9 @@
 
 #define DEBUG_LL_UART_ADDR	MALTA_PIIX4_UART0
 #define DEBUG_LL_UART_SHIFT	0
-#define DEBUG_LL_UART_DIVISOR 1843200 /* no matter for emulated port */
+
+#define DEBUG_LL_UART_CLK       1843200
+#define DEBUG_LL_UART_BPS       CONFIG_BAUDRATE
+#define DEBUG_LL_UART_DIVISOR   (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)
 
 #endif /* __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ */
-- 
2.1.4




More information about the barebox mailing list