Using the common Clock code to describe the UART baud rate clock...
makes it easier for the UART driver to be compatible with the
baud rate requirements of the UART IP on different meson chips.
--- a/drivers/tty/serial/meson_uart.c...
+++ b/drivers/tty/serial/meson_uart.c
@@ -629,57 +640,105 @@ static struct uart_driver meson_uart_driver = {
.cons = MESON_SERIAL_CONSOLE,
};
-static inline struct clk *meson_uart_probe_clock(struct device *dev,
- const char *id)
-{
- struct clk *clk = NULL;
- int ret;
-
- clk = devm_clk_get(dev, id);
- if (IS_ERR(clk))
- return clk;
-
- ret = clk_prepare_enable(clk);
- if (ret) {
- dev_err(dev, "couldn't enable clk\n");
- return ERR_PTR(ret);
- }
-
- devm_add_action_or_reset(dev,
- (void(*)(void *))clk_disable_unprepare,
- clk);
-
- return clk;
-}
+static struct clk_div_table xtal_div_table[] = {
+ {0, 3},
+ {1, 1},
+ {2, 2},
+ {3, 2},