1. 10 2月, 2016 1 次提交
  2. 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
  3. 03 2月, 2016 8 次提交
  4. 02 2月, 2016 9 次提交
  5. 24 12月, 2015 1 次提交
  6. 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
  7. 01 12月, 2015 1 次提交
  8. 21 11月, 2015 3 次提交
  9. 27 10月, 2015 1 次提交
  10. 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
  11. 17 10月, 2015 2 次提交
  12. 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
  13. 18 9月, 2015 1 次提交
  14. 17 9月, 2015 1 次提交
  15. 25 8月, 2015 4 次提交
  16. 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
  17. 29 7月, 2015 2 次提交
    • S
      clk: Silence warnings about lock imbalances · a57aa185
      Stephen Boyd 提交于
      The recursive spinlock implementation trips up sparse and it
      complains that these functions have lock imbalances. That isn't
      really true though, so add some __acquires() and __releases()
      information so that sparse is quiet.
      
      drivers/clk/clk.c:116:22: warning: context imbalance in 'clk_enable_lock' - wrong count at exit
      drivers/clk/clk.c:141:9: warning: context imbalance in 'clk_enable_unlock' - unexpected unlock
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      a57aa185
    • S
      clk: Allow providers to configure min/max rates · 9783c0d9
      Stephen Boyd 提交于
      clk providers are using the consumer APIs to set min/max rates on
      the clock they're providing. To encourage clk providers to move
      away from the consumer APIs, add a provider API to set the
      min/max rate of a clock. The assumption is that this is done
      before the clock can be requested via clk_get() and that the
      clock rate is already within the boundaries of the min/max that's
      configured.
      Tested-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      9783c0d9
  18. 28 7月, 2015 1 次提交
    • B
      clk: fix some determine_rate implementations · 57d866e6
      Boris Brezillon 提交于
      Some determine_rate implementations are not returning an error
      when they failed to adapt the rate according to the rate request.
      Fix them so that they return an error instead of silently
      returning 0.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      CC: Jonathan Corbet <corbet@lwn.net>
      CC: Tony Lindgren <tony@atomide.com>
      CC: Ralf Baechle <ralf@linux-mips.org>
      CC: "Emilio López" <emilio@elopez.com.ar>
      CC: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      CC: Peter De Schrijver <pdeschrijver@nvidia.com>
      CC: Prashant Gaikwad <pgaikwad@nvidia.com>
      CC: Stephen Warren <swarren@wwwdotorg.org>
      CC: Thierry Reding <thierry.reding@gmail.com>
      CC: Alexandre Courbot <gnurou@gmail.com>
      CC: linux-doc@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      CC: linux-arm-kernel@lists.infradead.org
      CC: linux-omap@vger.kernel.org
      CC: linux-mips@linux-mips.org
      CC: linux-tegra@vger.kernel.org
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      57d866e6