1. 02 6月, 2018 2 次提交
  2. 13 3月, 2018 4 次提交
  3. 11 1月, 2018 1 次提交
  4. 29 12月, 2017 1 次提交
  5. 22 12月, 2017 1 次提交
  6. 20 12月, 2017 1 次提交
  7. 02 11月, 2017 2 次提交
    • L
      clk: clk-gpio: Make GPIO clock provider use descriptors only · 908a543a
      Linus Walleij 提交于
      After som grep:ing it turns out nothing in the kernel is really calling
      clk_[hw_]_register_gpio_[gate|mux](). All existing instances are just
      created directly from the device tree probe functions at the bottom of
      the clk-gpio.c clock provider file.
      
      This means we can change the signature of the function without any
      consequences! Everyone should be using GPIO descriptors now, so let's
      just go in and enforce that.
      
      This saves a bit of code since GPIO descriptors know inherently if they
      are active low so no need for the code keeping track of that.
      
      We leave it to the caller to come up with the GPIO descriptor. It is
      nowadays possible to do that even without a corresponding device, so
      no excuse not to pass them around. The one in-kernel user lifecycles
      it using devm_gpiod_get() in gpio_clk_driver_probe().
      
      Cc: Sergej Sawazki <ce3a@gmx.de>
      Cc: Jyri Sarha <jsarha@ti.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      908a543a
    • S
      clk: Add devm_of_clk_add_hw_provider()/del_provider() APIs · aa795c41
      Stephen Boyd 提交于
      Sometimes we only have one of_clk_del_provider() call in driver
      error and remove paths, because we're missing a
      devm_of_clk_add_hw_provider() API. Introduce the API so we can
      convert drivers to use this and potentially reduce the amount of
      code needed to remove providers in drivers.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      aa795c41
  8. 01 9月, 2017 1 次提交
  9. 08 8月, 2017 1 次提交
  10. 07 6月, 2017 1 次提交
  11. 18 10月, 2016 1 次提交
  12. 24 9月, 2016 1 次提交
  13. 27 8月, 2016 1 次提交
  14. 13 8月, 2016 1 次提交
  15. 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
  16. 01 7月, 2016 1 次提交
  17. 02 6月, 2016 1 次提交
  18. 22 4月, 2016 1 次提交
  19. 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
  20. 10 4月, 2016 2 次提交
  21. 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
  22. 07 2月, 2016 2 次提交
  23. 30 1月, 2016 2 次提交