1. 20 3月, 2017 5 次提交
  2. 04 2月, 2017 1 次提交
  3. 30 1月, 2017 1 次提交
    • V
      PM / OPP: Update OPP users to put reference · 8a31d9d9
      Viresh Kumar 提交于
      This patch updates dev_pm_opp_find_freq_*() routines to get a reference
      to the OPPs returned by them.
      
      Also updates the users of dev_pm_opp_find_freq_*() routines to call
      dev_pm_opp_put() after they are done using the OPPs.
      
      As it is guaranteed the that OPPs wouldn't get freed while being used,
      the RCU read side locking present with the users isn't required anymore.
      Drop it as well.
      
      This patch also updates all users of devfreq_recommended_opp() which was
      returning an OPP received from the OPP core.
      
      Note that some of the OPP core routines have gained
      rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
      within them.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [Devfreq]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8a31d9d9
  4. 11 11月, 2016 1 次提交
  5. 05 11月, 2016 1 次提交
    • P
      clk: tegra: make clk-tegra124-dfll-fcpu explicitly non-modular · 33996b02
      Paul Gortmaker 提交于
      The Kconfig currently controlling compilation of this code is:
      
      arch/arm/mach-tegra/Kconfig:config ARCH_TEGRA_124_SOC
      arch/arm/mach-tegra/Kconfig:    bool "Enable support for Tegra124 family"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init translates to device_initcall in the non-modular
      case, the init ordering remains unchanged with this commit.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      We also delete the MODULE_LICENSE tags etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
      Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Aleksandr Frid <afrid@nvidia.com>
      Cc: Paul Walmsley <pwalmsley@nvidia.com>
      Cc: linux-clk@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      33996b02
  6. 02 11月, 2016 1 次提交
  7. 25 8月, 2016 1 次提交
  8. 30 6月, 2016 1 次提交
    • A
      clk: tegra: Initialize UTMI PLL when enabling PLLU · 15d68e8c
      Andrew Bresticker 提交于
      Move the UTMI PLL initialization code form clk-tegra<chip>.c files into
      clk-pll.c. UTMI PLL was being configured and set in HW control right
      after registration. However, when the clock init_table is processed and
      child clks of PLLU are enabled, it will call in and enable PLLU as
      well, and initiate SW enabling sequence even though PLLU is already in
      HW control. This leads to getting UTMIPLL stuck with a SEQ_BUSY status.
      
      Doing the initialization once during pllu_enable means we configure it
      properly into HW control.
      
      A side effect of the commonization/localization of the UTMI PLL init
      code, is that it corrects some errors that were present for earlier
      generations. For instance, in clk-tegra124.c, it used to have:
      
          #define UTMIP_PLL_CFG1_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 6)
      
      when the correct shift to use is present in the new version:
      
          #define UTMIP_PLL_CFG1_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 27)
      
      which matches the Tegra124 TRM register definition.
      Signed-off-by: NAndrew Bresticker <abrestic@chromium.org>
      [rklein: Merged in some later fixes for potential deadlocks]
      Signed-off-by: NRhyland Klein <rklein@nvidia.com>
      [treding: coding style bike-shedding, remove unused variable]
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      15d68e8c
  9. 23 6月, 2016 2 次提交
  10. 22 6月, 2016 1 次提交
  11. 17 6月, 2016 3 次提交
    • T
      clk: tegra: Enable sor1 and sor1_src on Tegra210 · e452b818
      Thierry Reding 提交于
      Make the sor1 and sor1_src clocks available on Tegra210. They will be
      used by the display driver to support HDMI and DP.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      e452b818
    • T
      clk: tegra: Squash sor1 safe/brick/src into a single mux · c1273af4
      Thierry Reding 提交于
      The sor1 clock on Tegra210 is structured in the following way:
      
          +-------+
          | pllp  |---+
          +-------+   |    +--------------+       +-----------+
                      +----|              |       | sor_safe  |
          +-------+        |              |       +-----------+
          | plld  |--------|              |             |
          +-------+        |              |       +-----------+
                           |   sor1_src   |-------|           |
          +-------+        |              |       +-----------+
          | plld2 |--------|              |             |
          +-------+        |              |             |
                      +----|              |             |
          +-------+   |    +--------------+             |
          | clkm  |---+                           +-----------+
          +-------+        +--------------+       |           |
                           |  sor1_brick  |-------|   sor1    |
                           +--------------+       |           |
                                                  +-----------+
      
      This is impractical to represent in a clock tree, though, because there
      is no name for the mux that has sor_safe and sor1_src as parents. It is
      also much more cumbersome to deal with the additional mux because users
      of these clocks (the display driver) would have to juggle with an extra
      mux for no real reason.
      
      To simply things, the above is squashed into two muxes instead, so that
      it looks like this:
      
          +-------+
          | pllp  |---+
          +-------+   |    +--------------+       +-----------+
                      +----|              |       | sor_safe  |
          +-------+        |              |       +-----------+
          | plld  |--------|              |             |
          +-------+        |              |       +-----------+
                           |   sor1_src   |-------|   sor1    |
          +-------+        |              |       +-----------+
          | plld2 |--------|              |           |   |
          +-------+        |              |           |   |
                      +----|              |           |   |
          +-------+   |    +--------------+           |   |
          | clkm  |---+                               |   |
          +-------+        +--------------+           |   |
                           |  sor1_brick  |-----------+---+
                           +--------------+
      
      This still very accurately represents the hardware. Note that sor1 has
      sor1_brick as input twice, that's because bit 1 in the mux selects the
      sor1_brick irrespective of bit 0.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      c1273af4
    • T
      clk: tegra: Disable spread spectrum on pll_d2 · e2f71656
      Thierry Reding 提交于
      Enabling spread spectrum on pll_d2 can lead to issues with display
      modes. HDMI monitors, for example, would report "Signal Error" and
      some modes driven over DisplayPort would generate fuzzy horizontal
      bands.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      e2f71656
  12. 10 6月, 2016 1 次提交
    • T
      clk: tegra: Fixup post dividers on Tegra210 · eddb65e7
      Thierry Reding 提交于
      Commit 86c679a5 ("clk: tegra: pll: Fix _pll_ramp_calc_pll logic and
      _calc_dynamic_ramp_rate") changed the PLL divider computation logic to
      consistently use P-divider values from tables as real dividers rather
      than the hardware values. Unfortunately for some reason many of the
      Tegra210 clocks didn't have their tables updated (most likely an over-
      sight by me when applying the patches). This commit fixes them all up.
      
      Cc: Jon Hunter <jonathanh@nvidia.com>
      Cc: Rhyland Klein <rklein@nvidia.com>
      Acked-by: NRhyland Klein <rklein@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      eddb65e7
  13. 28 5月, 2016 1 次提交
    • A
      remove lots of IS_ERR_VALUE abuses · 287980e4
      Arnd Bergmann 提交于
      Most users of IS_ERR_VALUE() in the kernel are wrong, as they
      pass an 'int' into a function that takes an 'unsigned long'
      argument. This happens to work because the type is sign-extended
      on 64-bit architectures before it gets converted into an
      unsigned type.
      
      However, anything that passes an 'unsigned short' or 'unsigned int'
      argument into IS_ERR_VALUE() is guaranteed to be broken, as are
      8-bit integers and types that are wider than 'unsigned long'.
      
      Andrzej Hajda has already fixed a lot of the worst abusers that
      were causing actual bugs, but it would be nice to prevent any
      users that are not passing 'unsigned long' arguments.
      
      This patch changes all users of IS_ERR_VALUE() that I could find
      on 32-bit ARM randconfig builds and x86 allmodconfig. For the
      moment, this doesn't change the definition of IS_ERR_VALUE()
      because there are probably still architecture specific users
      elsewhere.
      
      Almost all the warnings I got are for files that are better off
      using 'if (err)' or 'if (err < 0)'.
      The only legitimate user I could find that we get a warning for
      is the (32-bit only) freescale fman driver, so I did not remove
      the IS_ERR_VALUE() there but changed the type to 'unsigned long'.
      For 9pfs, I just worked around one user whose calling conventions
      are so obscure that I did not dare change the behavior.
      
      I was using this definition for testing:
      
       #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \
             unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO))
      
      which ends up making all 16-bit or wider types work correctly with
      the most plausible interpretation of what IS_ERR_VALUE() was supposed
      to return according to its users, but also causes a compile-time
      warning for any users that do not pass an 'unsigned long' argument.
      
      I suggested this approach earlier this year, but back then we ended
      up deciding to just fix the users that are obviously broken. After
      the initial warning that caused me to get involved in the discussion
      (fs/gfs2/dir.c) showed up again in the mainline kernel, Linus
      asked me to send the whole thing again.
      
      [ Updated the 9p parts as per Al Viro  - Linus ]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: https://lkml.org/lkml/2016/1/7/363
      Link: https://lkml.org/lkml/2016/5/27/486
      Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> # For nvmem part
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      287980e4
  14. 28 4月, 2016 18 次提交
  15. 30 3月, 2016 1 次提交
  16. 03 3月, 2016 1 次提交