1. 23 2月, 2016 2 次提交
    • S
      clk: Update some outdated comments · 706d5c73
      Stephen Boyd 提交于
      __clk_init() was renamed to __clk_core_init() but these comments
      weren't updated.
      
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      706d5c73
    • S
      Revert "clk: avoid circular clock topology" · fa459711
      Stephen Boyd 提交于
      This reverts commit 858d5881.
      
      Joachim reports that this commit breaks lpc18xx boot. This is
      because the hardware has circular clk topology where PLLs can
      feed into dividers and the same dividers can feed into the PLLs.
      The hardware is designed this way so that you can choose to put
      the divider before the PLL or after the PLL depending on what you
      configure to be the parent of the divider and what you configure
      to be the parent of the PLL.
      
      So let's drop this patch for now because we have hardware that
      actually has loops. A future patch could check for circular
      parents when we change parents and fail the switch, but that's
      probably best left to some debugging Kconfig option so that we
      don't suffer the sanity checking cost all the time.
      Reported-by: NJoachim Eastwood <manabian@gmail.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      fa459711
  2. 18 2月, 2016 1 次提交
  3. 10 2月, 2016 1 次提交
  4. 07 2月, 2016 1 次提交
    • S
      clk: Deprecate CLK_IS_ROOT · 47b0eeb3
      Stephen Boyd 提交于
      We don't use CLK_IS_ROOT but in a few places in the common clk
      framework core. Let's replace those checks with a check for the
      number of parents a clk has instead of the flag, freeing up one
      flag for something else. We don't remove the flag yet so that
      things keep building, but we'll remove it once all drivers have
      removed their flag usage.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      47b0eeb3
  5. 03 2月, 2016 8 次提交
  6. 02 2月, 2016 9 次提交
  7. 24 12月, 2015 1 次提交
  8. 03 12月, 2015 1 次提交
    • M
      clk: let of_clk_get_parent_name() fail for invalid clock-indices · 8da411cc
      Masahiro Yamada 提交于
      Currently, of_clk_get_parent_name() returns a wrong parent clock name
      when "clock-indices" property exists and the target index is not
      found in the property.  In this case, NULL should be returned.
      
      For example,
      
              oscillator {
                      compatible = "myclocktype";
                      #clock-cells = <1>;
                      clock-indices = <1>, <3>;
                      clock-output-names = "clka", "clkb";
              };
      
              consumer {
                      compatible = "myclockconsumer";
                      clocks = <&oscillator 0>, <&oscillator 1>;
              };
      
      Currently, of_clk_get_parent_name(consumer_np, 0) returns "clka"
      (and of_clk_get_parent_name(consumer_np, 1) also returns "clka",
      this is correct).   Because the "clock-indices" in the clock parent
      does not contain <0>, of_clk_get_parent_name(consumer_np, 0) should
      return NULL.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      8da411cc
  9. 01 12月, 2015 1 次提交
  10. 21 11月, 2015 3 次提交
  11. 27 10月, 2015 1 次提交
  12. 22 10月, 2015 1 次提交
    • J
      clk: add missing of_node_put · 6bc9d9d6
      Julia Lawall 提交于
      for_each_matching_node_and_match performs an of_node_get on each iteration,
      so a break out of the loop requires an of_node_put.
      
      A simplified version of the semantic patch that fixes this problem is as
      follows (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      expression e1,e2,e;
      local idexpression np;
      @@
      
       for_each_matching_node_and_match(np, e1, e2) {
         ... when != of_node_put(np)
             when != e = np
      (
         return np;
      |
      +  of_node_put(np);
      ?  return ...;
      )
         ...
       }
      // </smpl>
      
      Besides the problem identified by the semantic patch, this patch adds an
      of_node_get in front of saving np in a field of parent, to account for the
      fact that this value will be put on going on to the next element in the
      iteration, and then adds of_node_puts in the two loops where the parent
      pointer can be freed.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      6bc9d9d6
  13. 17 10月, 2015 2 次提交
  14. 16 10月, 2015 1 次提交
    • S
      clk: Make of_clk_get_parent_name() robust with #clock-cells = 1 · 0a4807c2
      Stephen Boyd 提交于
      If a clock provider has #clock-cells = 1 and we call
      of_clk_get_parent_name() on it we may end up returning the name
      of the provider node if the provider doesn't have a
      clock-output-names property. This doesn't make sense, especially
      when you consider that calling of_clk_get_parent_name() on such a
      node with different indices will return the same name each time.
      
      Let's try getting the clock from the framework via of_clk_get()
      instead, and only fallback to the node name if we have a provider
      with #clock-cells = 0. This way, we can't hand out the same name
      for different clocks when we don't actually know their names.
      
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      0a4807c2
  15. 18 9月, 2015 1 次提交
  16. 17 9月, 2015 1 次提交
  17. 25 8月, 2015 4 次提交
  18. 12 8月, 2015 1 次提交
    • H
      clk: track the orphan status of clocks and their children · e6500344
      Heiko Stuebner 提交于
      While children of orphan clocks are not carried in the orphan-list itself,
      they're nevertheless orphans in their own right as they also don't have an
      input-rate available. To ease tracking if a clock is an orphan or has an
      orphan in its parent path introduce an orphan field into struct clk and
      update it and the fields in child-clocks when a clock gets added or removed
      from the orphan-list.
      Suggested-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Alex Elder <elder@linaro.org>
      Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: kernel@pengutronix.de
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Santosh Shilimkar <ssantosh@kernel.org>
      Cc: Chao Xie <chao.xie@marvell.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Stefan Wahren <stefan.wahren@i2se.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Georgi Djakov <georgi.djakov@linaro.org>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: Barry Song <baohua@kernel.org>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Cc: Gabriel FERNANDEZ <gabriel.fernandez@st.com>
      Cc: emilio@elopez.com.ar
      Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      [sboyd@codeaurora.org: s/clk/core/ in new function]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      e6500344