提交 2cc4be28 编写于 作者: P Pali Rohár 提交者: Stefan Roese

serial: a37xx: Do not call get_ref_clk() in _debug_uart_init()

Static inline function _debug_uart_init() should avoid calling external
(non-inline) functions. Therefore do not call get_ref_clk() in
_debug_uart_init() and reimplement its functionality without external
function calls.
Signed-off-by: NPali Rohár <pali@kernel.org>
Reviewed-by: NStefan Roese <sr@denx.de>
上级 5cd424d7
......@@ -305,6 +305,7 @@ U_BOOT_DRIVER(serial_mvebu) = {
#ifdef CONFIG_DEBUG_MVEBU_A3700_UART
#include <debug_uart.h>
#include <mach/soc.h>
static inline void _debug_uart_init(void)
{
......@@ -322,7 +323,8 @@ static inline void _debug_uart_init(void)
* Calculate divider
* baudrate = clock / 16 / divider
*/
parent_rate = get_ref_clk() * 1000000;
parent_rate = (readl(MVEBU_REGISTER(0x13808)) & BIT(9)) ?
40000000 : 25000000;
divider = DIV_ROUND_CLOSEST(parent_rate, CONFIG_BAUDRATE * 16);
writel(divider, base + UART_BAUD_REG);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册