1. 24 9月, 2016 1 次提交
  2. 27 8月, 2016 1 次提交
  3. 13 8月, 2016 1 次提交
  4. 02 7月, 2016 1 次提交
    • D
      clk: core: support clocks which requires parents enable (part 1) · a4b3518d
      Dong Aisheng 提交于
      On Freescale i.MX7D platform, all clocks operations, including
      enable/disable, rate change and re-parent, requires its parent
      clock enable. Current clock core can not support it well.
      This patch introduce a new flag CLK_OPS_PARENT_ENABLE to handle this
      special case in clock core that enable its parent clock firstly for
      each operation and disable it later after operation complete.
      
      The patch part 1 fixes the possible disabling clocks while its parent
      is off during kernel booting phase in clk_disable_unused_subtree().
      
      Before the completion of kernel booting, clock tree is still not built
      completely, there may be a case that the child clock is on but its
      parent is off which could be caused by either HW initial reset state
      or bootloader initialization.
      
      Taking bootloader as an example, we may enable all clocks in HW by default.
      And during kernel booting time, the parent clock could be disabled in its
      driver probe due to calling clk_prepare_enable and clk_disable_unprepare.
      Because it's child clock is only enabled in HW while its SW usecount
      in clock tree is still 0, so clk_disable of parent clock will gate
      the parent clock in both HW and SW usecount ultimately. Then there will
      be a child clock is still on in HW but its parent is already off.
      
      Later in clk_disable_unused(), this clock disable accessing while its
      parent off will cause system hang due to the limitation of HW which
      must require its parent on.
      
      This patch simply enables the parent clock first before disabling
      if flag CLK_OPS_PARENT_ENABLE is set in clk_disable_unused_subtree().
      This is a simple solution and only affects booting time.
      
      After kernel booting up the clock tree is already created, there will
      be no case that child is off but its parent is off.
      So no need do this checking for normal clk_disable() later.
      
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      a4b3518d
  5. 01 7月, 2016 1 次提交
  6. 02 6月, 2016 1 次提交
  7. 22 4月, 2016 1 次提交
  8. 20 4月, 2016 10 次提交
    • S
      clk: fixed-rate: Add hw based registration APIs · 26ef56be
      Stephen Boyd 提交于
      Add registration APIs in the clk fixed-rate code to return struct
      clk_hw pointers instead of struct clk pointers. This way we hide
      the struct clk pointer from providers unless they need to use
      consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      26ef56be
    • S
      clk: gpio: Add hw based registration APIs · b120743a
      Stephen Boyd 提交于
      Add registration APIs in the clk gpio code to return struct
      clk_hw pointers instead of struct clk pointers. This way we hide
      the struct clk pointer from providers unless they need to use
      consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      b120743a
    • S
      clk: composite: Add hw based registration APIs · 49cb392d
      Stephen Boyd 提交于
      Add registration APIs in the clk composite code to return struct
      clk_hw pointers instead of struct clk pointers. This way we hide
      the struct clk pointer from providers unless they need to use
      consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      49cb392d
    • S
      clk: fractional-divider: Add hw based registration APIs · 39b44cff
      Stephen Boyd 提交于
      Add registration APIs in the clk fractional divider code to
      return struct clk_hw pointers instead of struct clk pointers.
      This way we hide the struct clk pointer from providers unless
      they need to use consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      39b44cff
    • S
      clk: fixed-factor: Add hw based registration APIs · 0759ac8a
      Stephen Boyd 提交于
      Add registration APIs in the clk fixed-factor code to return
      struct clk_hw pointers instead of struct clk pointers. This way
      we hide the struct clk pointer from providers unless they need to
      use consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      0759ac8a
    • S
      clk: mux: Add hw based registration APIs · 264b3171
      Stephen Boyd 提交于
      Add registration APIs in the clk mux code to return struct clk_hw
      pointers instead of struct clk pointers. This way we hide the
      struct clk pointer from providers unless they need to use
      consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      264b3171
    • S
      clk: gate: Add hw based registration APIs · e270d8cb
      Stephen Boyd 提交于
      Add registration APIs in the clk gate code to return struct
      clk_hw pointers instead of struct clk pointers. This way we hide
      the struct clk pointer from providers unless they need to use
      consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      e270d8cb
    • S
      clk: divider: Add hw based registration APIs · eb7d264f
      Stephen Boyd 提交于
      Add registration APIs in the clk divider code to return struct
      clk_hw pointers instead of struct clk pointers. This way we hide
      the struct clk pointer from providers unless they need to use
      consumer facing APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      eb7d264f
    • S
      clk: Add clk_hw OF clk providers · 0861e5b8
      Stephen Boyd 提交于
      Now that we have a clk registration API that doesn't return
      struct clks, we need to have some way to hand out struct clks via
      the clk_get() APIs that doesn't involve associating struct clk
      pointers with an OF node. Currently we ask the OF provider to
      give us a struct clk pointer for some clkspec, turn that struct
      clk into a struct clk_hw and then allocate a new struct clk to
      return to the caller.
      
      Let's add a clk_hw based OF provider hook that returns a struct
      clk_hw directly, so that we skip the intermediate step of
      converting from struct clk to struct clk_hw. Eventually when
      we've converted all OF clk providers to struct clk_hw based APIs
      we can remove the struct clk based ones.
      
      It should also be noted that we change the onecell provider to
      have a flex array instead of a pointer for the array of clk_hw
      pointers. This allows providers to allocate one structure of the
      correct length in one step instead of two.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      0861e5b8
    • S
      clk: Add {devm_}clk_hw_{register,unregister}() APIs · 4143804c
      Stephen Boyd 提交于
      We've largely split the clk consumer and provider APIs along
      struct clk and struct clk_hw, but clk_register() still returns a
      struct clk pointer for each struct clk_hw that's registered.
      Eventually we'd like to only allocate struct clks when there's a
      user, because struct clk is per-user now, so clk_register() needs
      to change.
      
      Let's add new APIs to register struct clk_hws, but this time
      we'll hide the struct clk from the caller by returning an int
      error code. Also add an unregistration API that takes the clk_hw
      structure that was passed to the registration API. This way
      provider drivers never have to deal with a struct clk pointer
      unless they're using the clk consumer APIs.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      4143804c
  9. 10 4月, 2016 2 次提交
  10. 27 2月, 2016 1 次提交
    • S
      clk: Make of_clk_get_parent_count() return unsigned ints · 929e7f3b
      Stephen Boyd 提交于
      Russell King recently pointed out a bug in the clk-gpio code
      where it fails to register the clk if of_clk_get_parent_count()
      returns an error because the "clocks" property isn't present in
      the DT node. If we're trying to count parents from DT we'd like
      to know the count, not if there is a "clocks" property or not.
      Furthermore, some drivers are assigning the return value to their
      clk_init_data::num_parents member which is unsigned, leading to
      potentially large numbers of parents when the property isn't
      present.
      
      Let's change the API to return an unsigned int instead of an int.
      All the callers just want to know the count anyway, and this
      avoids the bug that was in the clk-gpio driver.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      929e7f3b
  11. 07 2月, 2016 2 次提交
  12. 30 1月, 2016 4 次提交
  13. 24 12月, 2015 1 次提交
  14. 21 11月, 2015 2 次提交
  15. 27 10月, 2015 2 次提交
  16. 24 10月, 2015 1 次提交
  17. 22 10月, 2015 1 次提交
    • M
      clk: Add a basic multiplier clock · f2e0a532
      Maxime Ripard 提交于
      Some clocks are using a multiplier component, however, unlike their mux,
      gate or divider counterpart, these factors don't have a basic clock
      implementation.
      
      This leads to code duplication across platforms that want to use that kind
      of clocks, and the impossibility to use the composite clocks with such a
      clock without defining your own rate operations.
      
      Create such a driver in order to remove these issues, and hopefully factor
      the implementations, reducing code size across platforms and consolidating
      the various implementations.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: NChen-Yu Tsai <wens@csie.org>
      f2e0a532
  18. 17 10月, 2015 1 次提交
  19. 03 10月, 2015 1 次提交
  20. 25 8月, 2015 3 次提交
  21. 29 7月, 2015 2 次提交