20 Aug, 2013

1 commit

  • Add core support to allow clock implementations to select the best
    parent clock when rounding a rate, e.g. the one which can provide the
    closest clock rate to that requested. This is by way of adding a new
    clock op, determine_rate(), which is like round_rate() but has an extra
    parameter to allow the clock implementation to optionally select a
    different parent clock. The core then takes care of reparenting the
    clock when setting the rate.

    The parent change takes place with the help of some new private data
    members. struct clk::new_parent specifies a clock's new parent (NULL
    indicates no change), and struct clk::new_child specifies a clock's new
    child (whose new_parent member points back to it). The purpose of these
    are to allow correct walking of the future tree for notifications prior
    to actually reparenting any clocks, specifically to skip child clocks
    who are being reparented to another clock (they will be notified via the
    new parent), and to include any new child clock. These pointers are set
    by clk_calc_subtree(), and the new_child pointer gets cleared when a
    child is actually reparented to avoid duplicate POST_RATE_CHANGE
    notifications.

    Each place where round_rate() is called, determine_rate() is checked
    first and called in preference. This restructures a few of the call
    sites to simplify the logic into if/else blocks.

    Signed-off-by: James Hogan
    Reviewed-by: Stephen Boyd
    Cc: Mike Turquette
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Mike Turquette

    James Hogan
     

11 Jun, 2013

1 commit


28 Apr, 2013

1 commit

  • This is primarily useful when there's a driver that doesn't claim clocks
    properly, but the bootloader leaves them on. It's not expected to be used
    in normal cases, but for bringup and debug it's very useful to have the
    option to not gate unclaimed clocks that are still on.

    Signed-off-by: Olof Johansson
    Signed-off-by: Mike Turquette
    [mturquette@linaro.org: fixed up trivial merge issue]

    Olof Johansson
     

22 Mar, 2013

1 commit


17 Mar, 2012

1 commit

  • Provide documentation for the common clk structures and APIs. This code
    can be found in drivers/clk/ and include/linux/clk*.h.

    Signed-off-by: Mike Turquette
    Signed-off-by: Mike Turquette
    Reviewed-by: Andrew Lunn
    Cc: Russell King
    Cc: Jeremy Kerr
    Cc: Thomas Gleixner
    Cc: Arnd Bergman
    Cc: Paul Walmsley
    Cc: Shawn Guo
    Cc: Sascha Hauer
    Cc: Richard Zhao
    Cc: Saravana Kannan
    Cc: Magnus Damm
    Cc: Rob Herring
    Cc: Mark Brown
    Cc: Linus Walleij
    Cc: Stephen Boyd
    Cc: Amit Kucheria
    Cc: Deepak Saxena
    Cc: Grant Likely
    Signed-off-by: Arnd Bergmann

    Mike Turquette