1. 03 2月, 2015 1 次提交
  2. 28 1月, 2015 2 次提交
  3. 18 1月, 2015 1 次提交
  4. 04 12月, 2014 4 次提交
  5. 18 11月, 2014 1 次提交
    • J
      clk-divider: Fix READ_ONLY when divider > 1 · e6d5e7d9
      James Hogan 提交于
      Commit 79c6ab50 (clk: divider: add CLK_DIVIDER_READ_ONLY flag) in
      v3.16 introduced the CLK_DIVIDER_READ_ONLY flag which caused the
      recalc_rate() and round_rate() clock callbacks to be omitted.
      
      However using this flag has the unfortunate side effect of causing the
      clock recalculation code when a clock rate change is attempted to always
      treat it as a pass-through clock, i.e. with a fixed divide of 1, which
      may not be the case. Child clock rates are then recalculated using the
      wrong parent rate.
      
      Therefore instead of dropping the recalc_rate() and round_rate()
      callbacks, alter clk_divider_bestdiv() to always report the current
      divider as the best divider so that it is never altered.
      
      For me the read only clock was the system clock, which divided the PLL
      rate by 2, from which both the UART and the SPI clocks were divided.
      Initial setting of the UART rate set it correctly, but when the SPI
      clock was set, the other child clocks were miscalculated. The UART clock
      was recalculated using the PLL rate as the parent rate, resulting in a
      UART new_rate of double what it should be, and a UART which spewed forth
      garbage when the rate changes were propagated.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Thomas Abraham <thomas.ab@samsung.com>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Max Schwarz <max.schwarz@online.de>
      Cc: <stable@vger.kernel.org> # v3.16+
      Acked-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
      Signed-off-by: NMichael Turquette <mturquette@linaro.org>
      e6d5e7d9
  6. 27 9月, 2014 4 次提交
  7. 03 7月, 2014 1 次提交
    • P
      clk: define and export clk_debugs_add_file · fb2b3c9f
      Peter De Schrijver 提交于
      Define and export a new function clk_debugs_add_file which adds a file
      to a existing clock's debugfs directory. This can be used by clock
      providers to add debugfs entries which are not related to a specific clock
      type. Examples include the ability to measure the rate of a clock. It can
      also be used by modules to create new debugfs entries. This is useful if you
      want to expose features for testing which can potentially cause system
      instability such as allowing to change a clock's rate from userspace.
      Signed-off-by: NPeter De Schrijver <pdeschrijver@nvidia.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      fb2b3c9f
  8. 24 5月, 2014 1 次提交
  9. 21 5月, 2014 1 次提交
  10. 20 5月, 2014 1 次提交
  11. 13 5月, 2014 2 次提交
  12. 01 5月, 2014 1 次提交
  13. 25 3月, 2014 1 次提交
  14. 18 1月, 2014 1 次提交
  15. 17 1月, 2014 1 次提交
  16. 13 1月, 2014 1 次提交
    • G
      clk: mpc512x: introduce COMMON_CLK for MPC512x (disabled) · 6d8cdb68
      Gerhard Sittig 提交于
      this change implements a clock driver for the MPC512x PowerPC platform
      which follows the COMMON_CLK approach and uses common clock drivers
      shared with other platforms
      
      this driver implements the publicly announced set of clocks (those
      listed in the dt-bindings header file), as well as generates additional
      'struct clk' items where the SoC hardware cannot easily get mapped to
      the common primitives (shared code) of the clock API, or requires
      "intermediate clock nodes" to represent clocks that have both gates and
      dividers
      
      the previous PPC_CLOCK implementation is kept in place and remains
      active for the moment, the newly introduced CCF clock driver will
      receive additional support for backwards compatibility in a subsequent
      patch before it gets enabled and will replace the PPC_CLOCK approach
      
      some of the clock items get pre-enabled in the clock driver to not have
      them automatically disabled by the underlying clock subsystem because of
      their being unused -- this approach is desirable because
      - some of the clocks are useful to have for diagnostics and information
        despite their not getting claimed by any drivers (CPU, internal and
        external RAM, internal busses, boot media)
      - some of the clocks aren't claimed by their peripheral drivers yet,
        either because of missing driver support or because device tree specs
        aren't available yet (but the workarounds will get removed as the
        drivers get adjusted and the device tree provides the clock specs)
      
      clkdev registration provides "alias names" for few clock items
      - to not break those peripheral drivers which encode their component
        index into the name that is used for clock lookup (UART, SPI, USB)
      - to not break those drivers which use names for the clock lookup which
        were encoded in the previous PPC_CLOCK implementation (NFC, VIU, CAN)
      this workaround will get removed as these drivers get adjusted after
      device tree based clock lookup has become available
      
      the COMMON_CLK implementation copes with device trees which lack an
      oscillator node (backwards compat), the REF clock is then derived from
      the IPS bus frequency and multiplier values fetched from hardware
      
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      6d8cdb68
  17. 23 12月, 2013 2 次提交
    • B
      clk: add accuracy support for fixed clock · 0903ea60
      Boris BREZILLON 提交于
      This patch adds support for accuracy retrieval on fixed clocks.
      It also adds a new dt property called 'clock-accuracy' to define the clock
      accuracy.
      
      This can be usefull for oscillator (RC, crystal, ...) definitions which are
      always given an accuracy characteristic.
      Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      0903ea60
    • 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
  18. 08 10月, 2013 1 次提交
  19. 28 8月, 2013 1 次提交
  20. 20 8月, 2013 4 次提交
    • J
      clk: clk-mux: implement remuxing on set_rate · e366fdd7
      James Hogan 提交于
      Implement clk-mux remuxing if the CLK_SET_RATE_NO_REPARENT flag isn't
      set. This implements determine_rate for clk-mux to propagate to each
      parent and to choose the best one (like clk-divider this chooses the
      parent which provides the fastest rate <= the requested rate).
      
      The determine_rate op is implemented as a core helper function so that
      it can be easily used by more complex clocks which incorporate muxes.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      e366fdd7
    • J
      clk: add CLK_SET_RATE_NO_REPARENT flag · 819c1de3
      James Hogan 提交于
      Add a CLK_SET_RATE_NO_REPARENT clock flag, which will prevent muxes
      being reparented during clk_set_rate.
      
      To avoid breaking existing platforms, all callers of clk_register_mux()
      are adjusted to pass the new flag. Platform maintainers are encouraged
      to remove the flag if they wish to allow mux reparenting on set_rate.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
      Cc: Chao Xie <xiechao.mail@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "Emilio López" <emilio@elopez.com.ar>
      Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Andrew Chew <achew@nvidia.com>
      Cc: Doug Anderson <dianders@chromium.org>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Paul Walmsley <pwalmsley@nvidia.com>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Cc: Thomas Abraham <thomas.abraham@linaro.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: spear-devel@list.st.com
      Cc: linux-tegra@vger.kernel.org
      Tested-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
      Acked-by: Stephen Warren <swarren@nvidia.com> [tegra]
      Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [sunxi]
      Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> [Zynq]
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      819c1de3
    • J
      clk: add support for clock reparent on set_rate · 71472c0c
      James Hogan 提交于
      Add core support to allow clock implementations to select the best
      parent clock when rounding a rate, e.g. the one which can provide the
      closest clock rate to that requested. This is by way of adding a new
      clock op, determine_rate(), which is like round_rate() but has an extra
      parameter to allow the clock implementation to optionally select a
      different parent clock. The core then takes care of reparenting the
      clock when setting the rate.
      
      The parent change takes place with the help of some new private data
      members. struct clk::new_parent specifies a clock's new parent (NULL
      indicates no change), and struct clk::new_child specifies a clock's new
      child (whose new_parent member points back to it). The purpose of these
      are to allow correct walking of the future tree for notifications prior
      to actually reparenting any clocks, specifically to skip child clocks
      who are being reparented to another clock (they will be notified via the
      new parent), and to include any new child clock. These pointers are set
      by clk_calc_subtree(), and the new_child pointer gets cleared when a
      child is actually reparented to avoid duplicate POST_RATE_CHANGE
      notifications.
      
      Each place where round_rate() is called, determine_rate() is checked
      first and called in preference. This restructures a few of the call
      sites to simplify the logic into if/else blocks.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      71472c0c
    • J
      clk: abstract parent cache · 7ef3dcc8
      James Hogan 提交于
      Abstract access to the clock parent cache by defining
      clk_get_parent_by_index(clk, index). This allows access to parent
      clocks from clock drivers.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      7ef3dcc8
  21. 06 8月, 2013 1 次提交
  22. 16 6月, 2013 3 次提交
  23. 29 5月, 2013 1 次提交
  24. 13 4月, 2013 2 次提交
  25. 04 4月, 2013 1 次提交