summaryrefslogtreecommitdiff
path: root/src/drivers/uart/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/uart/util.c')
-rw-r--r--src/drivers/uart/util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/drivers/uart/util.c b/src/drivers/uart/util.c
index 5e8d223252..86da8dc746 100644
--- a/src/drivers/uart/util.c
+++ b/src/drivers/uart/util.c
@@ -59,3 +59,19 @@ unsigned int uart_input_clock_divider(void)
return 16;
}
#endif
+
+#if !IS_ENABLED(CONFIG_UART_OVERRIDE_REFCLK)
+unsigned int uart_platform_refclk(void)
+{
+ /* Specify the default input clock frequency for the UART.
+ *
+ * The older UART's used an input clock frequency of 1.8432 MHz which
+ * with the 16x oversampling provided the maximum baud-rate of 115200.
+ * Specify this as maximum baud-rate multiplied by oversample so that
+ * it is obvious that the maximum baud rate is 115200 when divided by
+ * oversample clock. Also note that crystal on the board does not
+ * change when software selects another input clock divider.
+ */
+ return 115200 * 16;
+}
+#endif