serial: mtk: initial priv data before using

This patch ensures driver private data being fully initialized in
_debug_uart_init which is not covered by .priv_auto ops.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
Weijie Gao
2023-07-19 17:16:07 +08:00
committed by Tom Rini
parent b43512d046
commit 0fd96bf224

View File

@@ -439,6 +439,7 @@ static inline void _debug_uart_init(void)
{
struct mtk_serial_priv priv;
memset(&priv, 0, sizeof(struct mtk_serial_priv));
priv.regs = (void *) CONFIG_VAL(DEBUG_UART_BASE);
priv.fixed_clk_rate = CONFIG_DEBUG_UART_CLOCK;