summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_lpuart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/serial_lpuart.c')
-rw-r--r--drivers/serial/serial_lpuart.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 042e9a26d1..beb4243124 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -170,9 +170,14 @@ static int lpuart_serial_probe(struct udevice *dev)
}
#else
+u32 __weak get_lpuart_clk(void)
+{
+ return CONFIG_SYS_CLK_FREQ;
+}
+
static void _lpuart32_serial_setbrg(struct lpuart_fsl *base, int baudrate)
{
- u32 clk = CONFIG_SYS_CLK_FREQ;
+ u32 clk = get_lpuart_clk();
u32 sbr;
sbr = (clk / (16 * baudrate));