• M
    clk: clock multiplexers may register out of order · 1f61e5f1
    Martin Fuzzey 提交于
    When a clock, C is initialised any orphan clocks listing C as
    a possible parent are reparented to it regardless of the
    parent requested by the orphan's get_parent() operation.
    
    This means that multiplexers registered before their parents
    are reparented to the first parent subsequently declared,
    regardless of the selection made by the hardware registers.
    
    For example:
    	static const char *sel[] = { "srcA", "srcB", "dummy", "srcC" };
    
    	child = clk_register_mux(NULL, "child",  sel, ARRAY_SIZE(sel), ...);
    	clk_register_fixed(NULL, "dummy", ...);
    	clk_register_fixed(NULL, "srcA", ...);
    	clk_register_fixed(NULL, "srcB", ...);
    	clk_register_fixed(NULL, "srcC", ...);
    
    Causes child's parent to always be "dummy".
    
    To fix this, when an orphanned clock has a get_parent() operation,
    only reparent to the clock indicated by get_parent().
    Signed-off-by: NMartin Fuzzey <mfuzzey@parkeon.com>
    Signed-off-by: NMike Turquette <mturquette@linaro.org>
    [mturquette@linaro.org: improve $SUBJECT]
    1f61e5f1
clk.c 43.4 KB