1. 07 7月, 2016 1 次提交
    • P
      clk: sunxi: make clk-* explicitly non-modular · 439a36d7
      Paul Gortmaker 提交于
      We have the following file --> Kconfig mapping:
      
      sunxi/clk-factors.c              obj-y
      sunxi/clk-sun6i-apb0-gates.c     CONFIG_MFD_SUN6I_PRCM (bool)
      sunxi/clk-sun6i-apb0.c           CONFIG_MFD_SUN6I_PRCM
      sunxi/clk-sun6i-ar100.c          CONFIG_MFD_SUN6I_PRCM
      sunxi/clk-sun8i-apb0.c           CONFIG_MFD_SUN6I_PRCM
      sunxi/clk-sun9i-mmc.c            obj-y
      
      Hence none of these are being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the drivers there is no doubt they are builtin-only.  All
      drivers get mostly the same changes, so they are handled in batch.
      
      Changes are (1) convert to builtin_platform_register, (2) use the
      init.h header, (3) delete the MODULE_LICENCE/MODULE_AUTHOR and
      associated tags, and (4) delete any ".remove" functions.
      
      There was a stray module.h in a file not using any init.h or
      module.h stuff, so we simply removed that one.
      
      In two cases, we explicitly disallow a driver unbind, since that
      doesn't have a sensible use case anyway, and it allows us to drop
      the ".remove" code for non-modular drivers.
      
      Since module_platform_driver() uses the same init level priority as
      builtin_platform_driver() the init ordering remains unchanged with
      this commit.
      
      We delete the MODULE_LICENSE etc. tags since all that information
      is already contained at the top of each file in the comments.
      Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Cc: "Emilio López" <emilio@elopez.com.ar>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Cc: linux-clk@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NMichael Turquette <mturquette@baylibre.com>
      Link: lkml.kernel.org/r/20160704211220.5685-9-paul.gortmaker@windriver.com
      439a36d7
  2. 12 2月, 2016 1 次提交
  3. 29 1月, 2016 2 次提交
  4. 28 1月, 2016 3 次提交
  5. 27 1月, 2016 1 次提交
  6. 25 8月, 2015 3 次提交
  7. 29 7月, 2015 1 次提交
  8. 28 7月, 2015 2 次提交
    • 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
    • B
      clk: change clk_ops' ->determine_rate() prototype · 0817b62c
      Boris Brezillon 提交于
      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: 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>
      Acked-by: NTero 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: NStephen Boyd <sboyd@codeaurora.org>
      Tested-by: NRomain Perier <romain.perier@gmail.com>
      Signed-off-by: NHeiko 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: NStephen Boyd <sboyd@codeaurora.org>
      0817b62c
  9. 03 2月, 2015 1 次提交
  10. 22 12月, 2014 1 次提交
    • H
      clk: sunxi: Give sunxi_factors_register a registers parameter · 7c74c220
      Hans de Goede 提交于
      Before this commit sunxi_factors_register uses of_iomap(node, 0) to get
      the clk registers. The sun6i prcm has factor clocks, for which we want to
      use sunxi_factors_register, but of_iomap(node, 0) does not work for the prcm
      factor clocks, because the prcm uses the mfd framework, so the registers
      are not part of the dt-node, instead they are added to the platform_device,
      as platform_device resources.
      
      This commit makes getting the registers the callers duty, so that
      sunxi_factors_register can be used with mfd instantiated platform device too.
      
      While at it also add error checking to the of_iomap calls.
      
      This commit also drops the __init function from sunxi_factors_register since
      platform driver probe functions are not __init.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      7c74c220
  11. 04 12月, 2014 1 次提交
  12. 22 10月, 2014 1 次提交
  13. 27 9月, 2014 1 次提交
    • M
      clk: sunxi: factors: Invert the probing logic · 601da9d0
      Maxime Ripard 提交于
      Until now, the factors clock probing was done directly by sunxi_init_clocks,
      with the factors registration being called directly with the clocks data passed
      as an argument.
      
      This approch has shown its limits when we added more clocks, since we couldn't
      really split code with such a logic in smaller files, and led to a huge file
      having all the clocks.
      
      Introduce an intermediate probing function, so that factor clocks will be able
      to directly be called by CLK_OF_DECLARE, which will in turn ease the split into
      several files.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      601da9d0
  14. 04 7月, 2014 1 次提交
  15. 06 5月, 2014 1 次提交
  16. 29 12月, 2013 1 次提交
  17. 10 11月, 2013 2 次提交
  18. 27 3月, 2013 1 次提交
    • E
      clk: arm: sunxi: Add a new clock driver for sunxi SOCs · e874a669
      Emilio López 提交于
      This commit implements the base CPU clocks for sunxi devices. It has
      been tested using a slightly modified cpufreq driver from the
      linux-sunxi 3.0 tree.
      
      Additionally, document the new bindings introduced by this patch.
      
      Idling:
          / # cat /sys/kernel/debug/clk/clk_summary
             clock                        enable_cnt  prepare_cnt  rate
          ---------------------------------------------------------------------
           osc32k                         0           0            32768
           osc24M_fixed                   0           0            24000000
              osc24M                      0           0            24000000
                 apb1_mux                 0           0            24000000
                    apb1                  0           0            24000000
                 pll1                     0           0            60000000
                    cpu                   0           0            60000000
                       axi                0           0            60000000
                          ahb             0           0            60000000
                             apb0         0           0            30000000
           dummy                          0           0            0
      
      After "yes >/dev/null &":
          / # cat /sys/kernel/debug/clk/clk_summary
             clock                        enable_cnt  prepare_cnt  rate
          ---------------------------------------------------------------------
           osc32k                         0           0            32768
           osc24M_fixed                   0           0            24000000
              osc24M                      0           0            24000000
                 apb1_mux                 0           0            24000000
                    apb1                  0           0            24000000
                 pll1                     0           0            1008000000
                    cpu                   0           0            1008000000
                       axi                0           0            336000000
                          ahb             0           0            168000000
                             apb0         0           0            84000000
           dummy                          0           0            0
      Signed-off-by: NEmilio López <emilio@elopez.com.ar>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      e874a669