]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
ARM: tegra: fix clock_get_periph_rate() for UART clocks
authorStephen Warren <swarren@nvidia.com>
Fri, 23 Sep 2016 22:44:51 +0000 (16:44 -0600)
committerTom Warren <twarren@nvidia.com>
Tue, 27 Sep 2016 16:11:02 +0000 (09:11 -0700)
commit74686766847146e4408486c5e3ca8a1681b145c0
treef3ea903ef107802cff616f5479b3c822863c7ec0
parent4a332d3ee770bd6b633fd3abba741451b17156bc
ARM: tegra: fix clock_get_periph_rate() for UART clocks

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@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/mach-tegra/clock.c