MXSCM-240-3 arm: imx: set CLK_GET_RATE_NOCACHE flag for clock dividers
authorJuan Gutierrez <juan.gutierrez@nxp.com>
Thu, 26 Jan 2017 20:44:12 +0000 (14:44 -0600)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:58:24 +0000 (14:58 -0500)
Using the CLK_GET_RATE_NOCACHE flag on the clock dividers will allow
the recalculation of the rate instead of just caching its value.

For instance, this allows the mmdc clock to be properly updated,
after being modified by the busfreq driver, within an iram routine
by calling the clk_get_rate api. Using this flag allows to call only
to the .recalc_rate functions instead of additionally call the
.set_rate ones.

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
drivers/clk/imx/clk-busy.c

index 5cc9959..59a133d 100644 (file)
@@ -101,7 +101,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name,
 
        init.name = name;
        init.ops = &clk_busy_divider_ops;
-       init.flags = CLK_SET_RATE_PARENT;
+       init.flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE;
        init.parent_names = &parent_name;
        init.num_parents = 1;