[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VfCHacEUFKd4j_Cz+ZSh-9QxsLPpGCaNmaPZ2tt139+6A@mail.gmail.com>
Date: Wed, 7 Jun 2017 16:47:01 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Russell King - ARM Linux <linux@...linux.org.uk>
Subject: Re: [PATCH] Fix serial console on SNI RM400 machines
On Wed, May 31, 2017 at 11:21 PM, Thomas Bogendoerfer
<tsbogend@...ha.franken.de> 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
Powered by blists - more mailing lists