1. 06 5月, 2015 2 次提交
  2. 12 3月, 2015 1 次提交
    • M
      clk: introduce clk_is_match · 3d3801ef
      Michael Turquette 提交于
      Some drivers compare struct clk pointers as a means of knowing
      if the two pointers reference the same clock hardware. This behavior is
      dubious (drivers must not dereference struct clk), but did not cause any
      regressions until the per-user struct clk patch was merged. Now the test
      for matching clk's will always fail with per-user struct clk's.
      
      clk_is_match is introduced to fix the regression and prevent drivers
      from comparing the pointers manually.
      
      Fixes: 035a61c3 ("clk: Make clk API return per-user struct clk instances")
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Signed-off-by: NMichael Turquette <mturquette@linaro.org>
      [arnd@arndb.de: Fix COMMON_CLK=N && HAS_CLK=Y config]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      [sboyd@codeaurora.org: const arguments to clk_is_match() and
      remove unnecessary ternary operation]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      3d3801ef
  3. 03 2月, 2015 1 次提交
  4. 25 1月, 2015 1 次提交
    • T
      clk: Introduce clk_has_parent() · 4e88f3de
      Thierry Reding 提交于
      This new function is similar to clk_set_parent(), except that it doesn't
      actually change the parent. It merely checks that the given parent clock
      can be a parent for the given clock.
      
      A situation where this is useful is to check that a particular setup is
      valid before switching to it. One specific use-case for this is atomic
      modesetting in the DRM framework where setting a mode is divided into a
      check phase where a given configuration is validated before applying
      changes to the hardware.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NMichael Turquette <mturquette@linaro.org>
      4e88f3de
  5. 27 9月, 2014 1 次提交
  6. 09 9月, 2014 1 次提交
  7. 25 2月, 2014 1 次提交
  8. 23 12月, 2013 1 次提交
    • B
      clk: add clk accuracy retrieval support · 5279fc40
      Boris BREZILLON 提交于
      The clock accuracy is expressed in ppb (parts per billion) and represents
      the possible clock drift.
      Say you have a clock (e.g. an oscillator) which provides a fixed clock of
      20MHz with an accuracy of +- 20Hz. This accuracy expressed in ppb is
      20Hz/20MHz = 1000 ppb (or 1 ppm).
      
      Clock users may need the clock accuracy information in order to choose
      the best clock (the one with the best accuracy) across several available
      clocks.
      
      This patch adds clk accuracy retrieval support for common clk framework by
      means of a new function called clk_get_accuracy.
      This function returns the given clock accuracy expressed in ppb.
      
      In order to get the clock accuracy, this implementation adds one callback
      called recalc_accuracy to the clk_ops structure.
      This callback is given the parent clock accuracy (if the clock is not a
      root clock) and should recalculate the given clock accuracy.
      
      This callback is optional and may be implemented if the clock is not
      a perfect clock (accuracy != 0 ppb).
      Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      5279fc40
  9. 11 4月, 2013 1 次提交
    • S
      clk: Properly handle notifier return values · fb72a059
      Soren Brinkmann 提交于
      Notifiers may return NOTIFY_(OK|DONE|STOP|BAD). The CCF uses an
      inconsistent mix of checking against NOTIFY_STOP or NOTIFY_BAD.
      This inconsistency leaves errors undetected in some cases:
      clk_set_parent() calls __clk_speculate_rates(), which stops when it
      hits a NOTIFIER_BAD (STOP is ignored), and passes this value back to the
      caller.
      clk_set_parent() compares this return value against NOTIFY_STOP only,
      ignoring NOTIFY_BAD returns.
      
      Use NOTIFY_STOP_MASK to detect a negative notifier return value and
      document all four return value options.
      Signed-off-by: NSoren Brinkmann <soren.brinkmann@xilinx.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      fb72a059
  10. 31 7月, 2012 1 次提交
    • V
      clk: add non CONFIG_HAVE_CLK routines · 93abe8e4
      Viresh Kumar 提交于
      Many drivers are shared between architectures that may or may not have
      HAVE_CLK selected for them.  To remove compilation errors for them we
      enclose clk_*() calls in these drivers within #ifdef CONFIG_HAVE_CLK,
      #endif.
      
      This patch removes the need of these CONFIG_HAVE_CLK statements, by
      introducing dummy routines when HAVE_CLK is not selected by platforms.
      So, definition of these routines will always be available.  These calls
      will return error for platforms that don't select HAVE_CLK.
      Signed-off-by: NViresh Kumar <viresh.kumar@st.com>
      Cc: Wolfram Sang <w.sang@pengutronix.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jeff Garzik <jgarzik@redhat.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Bhupesh Sharma <bhupesh.sharma@st.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: viresh kumar <viresh.linux@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      93abe8e4
  11. 24 7月, 2012 1 次提交
  12. 20 7月, 2012 2 次提交
  13. 12 7月, 2012 1 次提交
    • G
      clk: add DT clock binding support · 766e6a4e
      Grant Likely 提交于
      Based on work 1st by Ben Herrenschmidt and Jeremy Kerr, then by Grant
      Likely, this patch adds support to clk_get to allow drivers to retrieve
      clock data from the device tree.
      
      Platforms scan for clocks in DT with of_clk_init and a match table, and
      the register a provider through of_clk_add_provider. The provider's
      clk_src_get function will be called when a device references the
      provider's OF node for a clock reference.
      
      v6 (Rob Herring):
          - Return error values instead of NULL to match clock framework
            expectations
      
      v5 (Rob Herring):
          - Move from drivers/of into common clock subsystem
          - Squashed "dt/clock: add a simple provider get function" and
            "dt/clock: add function to get parent clock name"
          - Rebase to 3.4-rc1
          - Drop CONFIG_OF_CLOCK and just use CONFIG_OF
          - Add missing EXPORT_SYMBOL to various functions
          - s/clock-output-name/clock-output-names/
          - Define that fixed-clock binding is a single output
      
      v4 (Rob Herring):
          - Rework for common clk subsystem
          - Add of_clk_get_parent_name function
      
      v3: - Clarified documentation
      
      v2: - fixed errant ';' causing compile error
          - Editorial fixes from Shawn Guo
          - merged in adding lookup to clkdev
          - changed property names to match established convention. After
            working with the binding a bit it really made more sense to follow the
            lead of 'reg', 'gpios' and 'interrupts' by making the input simply
            'clocks' & 'clock-names' instead of 'clock-input-*', and to only use
            clock-output* for the producer nodes. (Sorry Shawn, this will mean
            you need to change some code, but it should be trivial)
          - Add ability to inherit clocks from parent nodes by using an empty
            'clock-ranges' property.  Useful for busses.  I could use some feedback
            on the new property name, 'clock-ranges' doesn't feel right to me.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Reviewed-by: NShawn Guo <shawn.guo@freescale.com>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      766e6a4e
  14. 25 4月, 2012 2 次提交
  15. 20 4月, 2012 1 次提交
  16. 17 3月, 2012 1 次提交
    • M
      clk: introduce the common clock framework · b2476490
      Mike Turquette 提交于
      The common clock framework defines a common struct clk useful across
      most platforms as well as an implementation of the clk api that drivers
      can use safely for managing clocks.
      
      The net result is consolidation of many different struct clk definitions
      and platform-specific clock framework implementations.
      
      This patch introduces the common struct clk, struct clk_ops and an
      implementation of the well-known clock api in include/clk/clk.h.
      Platforms may define their own hardware-specific clock structure and
      their own clock operation callbacks, so long as it wraps an instance of
      struct clk_hw.
      
      See Documentation/clk.txt for more details.
      
      This patch is based on the work of Jeremy Kerr, which in turn was based
      on the work of Ben Herrenschmidt.
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@ti.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: Rob Herring <rob.herring <at> calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
      Cc: Arnd Bergman <arnd.bergmann@linaro.org>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Shawn Guo <shawn.guo@freescale.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Richard Zhao <richard.zhao@linaro.org>
      Cc: Saravana Kannan <skannan@codeaurora.org>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Linus Walleij <linus.walleij@stericsson.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Amit Kucheria <amit.kucheria@linaro.org>
      Cc: Deepak Saxena <dsaxena@linaro.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      b2476490
  17. 28 12月, 2011 1 次提交
  18. 27 9月, 2011 1 次提交
    • R
      clk: provide prepare/unprepare functions · 40d3e0f4
      Russell King 提交于
      As discussed previously, there's the need on some platforms to run some
      parts of clk_enable() in contexts which can schedule.  The solution
      which was agreed upon was to provide clk_prepare() and clk_unprepare()
      to contain this parts, while clk_enable() and clk_disable() perform
      the atomic part.
      
      This patch provides a common definition for clk_prepare() and
      clk_unprepare() in linux/clk.h, and provides an upgrade path for
      existing implementation and drivers: drivers can start using
      clk_prepare() and clk_unprepare() once this patch is merged without
      having to wait for platform support.  Platforms can then start to
      provide these additional functions.
      
      Eventually, HAVE_CLK_PREPARE will be removed from the kernel, and
      everyone will have to provide these new APIs.
      Acked-by: NSaravana Kannan <skannan@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      40d3e0f4
  19. 05 6月, 2009 1 次提交
  20. 27 3月, 2009 1 次提交
  21. 17 10月, 2008 1 次提交
  22. 26 3月, 2006 1 次提交
  23. 08 1月, 2006 1 次提交
  24. 04 1月, 2006 2 次提交
  25. 28 4月, 2005 1 次提交
  26. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4