Thread (2 messages) 2 messages, 2 authors, 2017-06-07

Re: [PATCH] Fix serial console on SNI RM400 machines

From: Andy Shevchenko <hidden>
Date: 2017-06-07 13:47:04
Also in: lkml

On Wed, May 31, 2017 at 11:21 PM, Thomas Bogendoerfer
[off-list ref] wrote:
sccnxp driver doesn't get the correct uart clock rate, if CONFIG_HAVE_CLOCK
is disabled. Correct usage of clk API to make it work with/without it.
uart -> UART
clk -> CLK
        clk = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(clk)) {
-               if (PTR_ERR(clk) == -EPROBE_DEFER) {
-                       ret = -EPROBE_DEFER;
+               ret = PTR_ERR(clk);
+               if (ret == -EPROBE_DEFER)
                        goto err_out;
-               }
+               uartclk = 0;
+       } else {
+               clk_prepare_enable(clk);
This might fail.
+               uartclk = clk_get_rate(clk);
+       }
-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help