An error occurred fetching the project authors.
  1. 20 Nov, 2015 1 commit
  2. 26 Oct, 2015 1 commit
  3. 21 Oct, 2015 1 commit
    • Julia Lawall's avatar
      clk: add missing of_node_put · 6bc9d9d6
      Julia Lawall authored
      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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      6bc9d9d6
  4. 16 Oct, 2015 2 commits
  5. 15 Oct, 2015 1 commit
    • Stephen Boyd's avatar
      clk: Make of_clk_get_parent_name() robust with #clock-cells = 1 · 0a4807c2
      Stephen Boyd authored
      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: default avatarStephen Boyd <sboyd@codeaurora.org>
      0a4807c2
  6. 17 Sep, 2015 1 commit
  7. 16 Sep, 2015 1 commit
  8. 24 Aug, 2015 4 commits
  9. 12 Aug, 2015 1 commit
    • Heiko Stuebner's avatar
      clk: track the orphan status of clocks and their children · e6500344
      Heiko Stuebner authored
      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: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarHeiko 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: default avatarStephen Boyd <sboyd@codeaurora.org>
      e6500344
  10. 28 Jul, 2015 4 commits
    • Stephen Boyd's avatar
      clk: Silence warnings about lock imbalances · a57aa185
      Stephen Boyd authored
      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: default avatarStephen Boyd <sboyd@codeaurora.org>
      a57aa185
    • Stephen Boyd's avatar
      clk: Allow providers to configure min/max rates · 9783c0d9
      Stephen Boyd authored
      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: default avatarSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      9783c0d9
    • Boris Brezillon's avatar
      clk: fix some determine_rate implementations · 57d866e6
      Boris Brezillon authored
      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: default avatarBoris 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: default avatarStephen Boyd <sboyd@codeaurora.org>
      57d866e6
    • Boris Brezillon's avatar
      clk: change clk_ops' ->determine_rate() prototype · 0817b62c
      Boris Brezillon authored
      Clock rates are stored in an unsigned long field, but ->determine_rate()
      (which returns a rounded rate from a requested one) returns a long
      value (errors are reported using negative error codes), which can lead
      to long overflow if the clock rate exceed 2Ghz.
      
      Change ->determine_rate() prototype to return 0 or an error code, and pass
      a pointer to a clk_rate_request structure containing the expected target
      rate and the rate constraints imposed by clk users.
      
      The clk_rate_request structure might be extended in the future to contain
      other kind of constraints like the rounding policy, the maximum clock
      inaccuracy or other things that are not yet supported by the CCF
      (power consumption constraints ?).
      Signed-off-by: default avatarBoris 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>
      Acked-by: default avatarTero 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
      [sboyd@codeaurora.org: Fix parent dereference problem in
      __clk_determine_rate()]
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Tested-by: default avatarRomain Perier <romain.perier@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      [sboyd@codeaurora.org: Folded in fix from Heiko for fixed-rate
      clocks without parents or a rate determining op]
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      0817b62c
  11. 20 Jul, 2015 1 commit
  12. 08 Jul, 2015 2 commits
  13. 20 Jun, 2015 1 commit
    • Bartlomiej Zolnierkiewicz's avatar
      clk: add CLK_RECALC_NEW_RATES clock flag for Exynos cpu clock support · d8d91987
      Bartlomiej Zolnierkiewicz authored
      This flag is needed to fix the issue with wrong dividers being setup
      by Common Clock Framework when using the new Exynos cpu clock support.
      
      The issue happens because clk_core_set_rate_nolock()  calls
      clk_calc_new_rates(clk, rate) before both pre/post clock notifiers have
      a chance to run.  In case of Exynos cpu clock support pre/post clock
      notifiers are registered for mout_apll clock which is a parent of armclk
      cpu clock and dividers are modified in both pre and post clock notifier.
      This results in wrong dividers values being later programmed by
      clk_change_rate(top).  To workaround the problem CLK_RECALC_NEW_RATES
      flag is added and it is set for mout_apll clock later so the correct
      divider values are re-calculated after both pre and post clock notifiers
      had run.
      
      For example when using "performance" governor on Exynos4210 Origen board
      the cpufreq-dt driver requests to change the frequency from 1000MHz to
      1200MHz and after the change state of the relevant clocks is following:
      
      Without use of CLK_GET_RATE_NOCACHE flag:
      
       fout_apll rate: 1200000000
               fout_apll_div_2 rate: 600000000
                       mout_clkout_cpu rate: 600000000
                               div_clkout_cpu rate: 600000000
                                       clkout_cpu rate: 600000000
               mout_apll rate: 1200000000
                       armclk rate: 1200000000
                       mout_hpm rate: 1200000000
                               div_copy rate: 300000000
                                       div_hpm rate: 300000000
                       mout_core rate: 1200000000
                               div_core rate: 1200000000
                                       div_core2 rate: 1200000000
                                               arm_clk_div_2 rate: 600000000
                                               div_corem0 rate: 300000000
                                               div_corem1 rate: 150000000
                                               div_periph rate: 300000000
                               div_atb rate: 300000000
                                       div_pclk_dbg rate: 150000000
                       sclk_apll rate: 1200000000
                               sclk_apll_div_2 rate: 600000000
      
      With use of CLK_GET_RATE_NOCACHE flag:
      
       fout_apll rate: 1200000000
               fout_apll_div_2 rate: 600000000
                       mout_clkout_cpu rate: 600000000
                               div_clkout_cpu rate: 600000000
                                       clkout_cpu rate: 600000000
               mout_apll rate: 1200000000
                       armclk rate: 1200000000
                       mout_hpm rate: 1200000000
                               div_copy rate: 200000000
                                       div_hpm rate: 200000000
                       mout_core rate: 1200000000
                               div_core rate: 1200000000
                                       div_core2 rate: 1200000000
                                               arm_clk_div_2 rate: 600000000
                                               div_corem0 rate: 300000000
                                               div_corem1 rate: 150000000
                                               div_periph rate: 300000000
                               div_atb rate: 240000000
                                       div_pclk_dbg rate: 120000000
                       sclk_apll rate: 150000000
                               sclk_apll_div_2 rate: 75000000
      
      Without this change cpufreq-dt driver showed ~10 mA larger energy
      consumption when compared to cpufreq-exynos one when "performance"
      cpufreq governor was used on Exynos4210 SoC based Origen board.
      
      This issue was probably meant to be workarounded by use of
      CLK_GET_RATE_NOCACHE and CLK_DIVIDER_READ_ONLY clock flags in
      the original Exynos cpu clock patchset (in "[PATCH v12 6/6] clk:
      samsung: remove unused clock aliases and update clock flags" patch)
      but usage of these flags is not sufficient to fix the issue observed.
      
      Cc: Thomas Abraham <thomas.ab@samsung.com>
      Cc: Tomasz Figa <tomasz.figa@gmail.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarMichael Turquette <mturquette@baylibre.com>
      d8d91987
  14. 10 Jun, 2015 1 commit
  15. 06 Jun, 2015 1 commit
  16. 20 May, 2015 1 commit
  17. 15 May, 2015 1 commit
  18. 13 May, 2015 1 commit
  19. 07 May, 2015 2 commits
  20. 06 May, 2015 1 commit
  21. 02 May, 2015 1 commit
  22. 30 Apr, 2015 6 commits
  23. 13 Apr, 2015 1 commit
  24. 12 Mar, 2015 3 commits