1. 19 Aug, 2013 3 commits
    • James Hogan's avatar
      clk: add support for clock reparent on set_rate · 71472c0c
      James Hogan authored
      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: default avatarJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      71472c0c
    • James Hogan's avatar
      clk: move some parent related functions upwards · 4935b22c
      James Hogan authored
      Move some parent related functions up in clk.c so they can be used by
      the modifications in the following patch which enables clock reparenting
      during set_rate. No other changes are made so this patch makes no
      functional difference in isolation. This is separate from the following
      patch primarily to ease readability of that patch.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      4935b22c
    • James Hogan's avatar
      clk: abstract parent cache · 7ef3dcc8
      James Hogan authored
      Abstract access to the clock parent cache by defining
      clk_get_parent_by_index(clk, index). This allows access to parent
      clocks from clock drivers.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      7ef3dcc8
  2. 16 Aug, 2013 3 commits
  3. 09 Aug, 2013 1 commit
  4. 08 Aug, 2013 15 commits
  5. 05 Aug, 2013 3 commits
  6. 02 Aug, 2013 11 commits
  7. 31 Jul, 2013 2 commits
  8. 30 Jul, 2013 2 commits