[U-Boot] [PATCH] ARM: tegra: fix clock_get_periph_rate() for UART clocks

Simon Glass sjg at chromium.org
Tue Sep 27 02:33:59 CEST 2016


On 23 September 2016 at 16:44, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> Make clock_get_periph_rate() return the correct value for UART clocks.
>
> This change needs to be applied before the patches that enable CONFIG_CLK
> for Tegra SoCs before Tegra186, since enabling that option causes
> ns16550_serial_ofdata_to_platdata() to rely on clk_get_rate() for UART
> clocks, and clk_get_rate() eventually calls clock_get_periph_rate().
>
> This change is a rather horrible hack, as explained in the comment added
> to the clock driver. I've tried fixing this correctly for all clocks as
> described in that comment, but there's too much fallout elsewhere. I
> believe the clock driver has a number of bugs which all cancel each-other
> out, and unravelling that chain is too complex at present. This change is
> the smallest change that fixes clock_get_periph_rate() for UART clocks
> while guaranteeing no change in behaviour for any other clock, which
> avoids other regressions.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
>  arch/arm/mach-tegra/clock.c | 38 ++++++++++++++++++++++++++++++++++++--
>  1 file changed, 36 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list