• Chen-Yu Tsai's avatar
    clk: sunxi: Make divs clocks specify which output is the base factor clock · 934fe5f4
    Chen-Yu Tsai authored
    The current sunxi clock driver has the base factor clock of divs clocks
    as the last clock output of the clock node. This makes it rather difficult
    to add new outputs, such as fixed dividers, which were previously unknown.
    
    This patch makes the divs clocks data structure specify which output is
    the factor clock, and updates all current divs clocks accordingly.
    
    We can then add new outputs after the factor clocks, at least not breaking
    backward compatibility with regards to the devicetree bindings.
    
    Also replace kzalloc with kcalloc in sunxi_divs_clk_setup().
    Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
    Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
    934fe5f4
clk-sunxi.c 35.2 KB