clk: core: support clocks which requires parents enable (part 2)
authorDong Aisheng <aisheng.dong@nxp.com>
Thu, 30 Jun 2016 09:31:14 +0000 (17:31 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 2 Jul 2016 00:42:56 +0000 (17:42 -0700)
commitfc8726a2c021b5525151ff6482f8f9a863c56d8d
tree2914b8e4323084d09d30037b71f4c26ba2ee28eb
parenta4b3518d146f150d633f7dc815bb8ee2fbc162e9
clk: core: support clocks which requires parents enable (part 2)

On Freescale i.MX7D platform, all clocks operations, including
enable/disable, rate change and re-parent, requires its parent clock on.
Current clock core can not support it well.
This patch adding flag CLK_OPS_PARENT_ENABLE to handle this special case in
clock core that enable its parent clock firstly for each operation and
disable it later after operation complete.

The patch part 2 fixes set clock rate and set parent while its parent
is off. The most special case is for set_parent() operation which requires
all parents including both old and new one to be enabled at the same time
during the operation.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
[sboyd@codeaurora.org: Move set_rate tracepoint after prepare_enable]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk.c