From: Michael Turquette Date: Sat, 20 Jun 2015 20:29:48 +0000 (-0700) Subject: Merge tag 'tegra-for-4.2-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2cd7b0432888ef2e1f8b54c1c6f8751e1e0e9b5e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge tag 'tegra-for-4.2-clk' of git://git./linux/kernel/git/tegra/linux into clk-next clk: tegra: Changes for v4.2-rc1 This contains the EMC clock driver that's been exhaustively reviewed and tested. It also includes a change to the clock core that allows a clock provider to perform low-level reparenting of clocks. This is required by the EMC clock driver because the reparenting needs to be done at a very specific point in time during the EMC frequency switch. --- 2cd7b0432888ef2e1f8b54c1c6f8751e1e0e9b5e diff --cc drivers/clk/clk.c index 059e5d25c9ba,5315a273eae9..ddb4b541016f --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@@ -1652,14 -2012,22 +1652,22 @@@ out return ret; } -static void clk_core_reparent(struct clk_core *clk, +static void clk_core_reparent(struct clk_core *core, struct clk_core *new_parent) { - clk_reparent(clk, new_parent); - __clk_recalc_accuracies(clk); - __clk_recalc_rates(clk, POST_RATE_CHANGE); + clk_reparent(core, new_parent); + __clk_recalc_accuracies(core); + __clk_recalc_rates(core, POST_RATE_CHANGE); } + void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent) + { + if (!hw) + return; + + clk_core_reparent(hw->core, !new_parent ? NULL : new_parent->core); + } + /** * clk_has_parent - check if a clock is a possible parent for another * @clk: clock source