1. 22 4月, 2016 1 次提交
  2. 08 4月, 2016 1 次提交
  3. 17 3月, 2016 1 次提交
    • J
      PM / clk: Add support for obtaining clocks from device-tree · 02113ba9
      Jon Hunter 提交于
      The PM clocks framework requires clients to pass either a con-id or a
      valid clk pointer in order to add a clock to a device. Add a new
      function of_pm_clk_add_clks() to allows device clocks to be retrieved
      from device-tree and populated for a given device. Note that it is
      not necessary to make the compilation of this new function dependent
      upon CONFIG_OF because there are stubs functions for the device-tree
      APIs used.
      
      In order to handle errors encountered when adding clocks from
      device-tree, add a function pm_clk_remove_clk() to remove any clocks
      (using a pointer to the clk structure) that have been added
      successfully before the error occurred.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      02113ba9
  4. 09 3月, 2016 5 次提交
  5. 21 2月, 2016 2 次提交
  6. 16 2月, 2016 4 次提交
    • V
      PM / OPP: Initialize regulator pointer to an error value · 0c717d0f
      Viresh Kumar 提交于
      We are currently required to do two checks for regulator pointer:
      IS_ERR() and IS_NULL().
      
      And multiple instances are reported, about both of these not being used
      consistently and so resulting in crashes.
      
      Fix that by initializing regulator pointer with an error value and
      checking it only against an error.
      
      This makes code more consistent and more efficient.
      
      Fixes: 7d34d56e (PM / OPP: Disable OPPs that aren't supported by the regulator)
      Reported-and-tested-by: NJon Hunter <jonathanh@nvidia.com>
      Reported-and-tested-by: NTony Lindgren <tony@atomide.com>
      Reported-and-tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      [ rjw: Initialize to -ENXIO ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0c717d0f
    • A
      PM / Domains: remove old power on/off latencies · 90e63452
      Axel Haslam 提交于
      Now that all known users have been converted to use state latencies,
      we can remove the latency field in the generic_pm_domain structure.
      Signed-off-by: NAxel Haslam <ahaslam+renesas@baylibre.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      90e63452
    • A
      PM / Domains: Support for multiple states · fc5cbf0c
      Axel Haslam 提交于
      Some hardware (eg. OMAP), has the ability to enter different low power
      modes for a given power domain. This allows for more fine grained control
      over the power state of the platform. As a typical example, some registers
      of the hardware may be implemented with retention flip-flops and be able
      to retain their state at lower voltages allowing for faster on/off
      latencies and an increased window of opportunity to enter an intermediate
      low power state other than "off"
      
      When trying to set a power domain to off, the genpd governor will choose
      the deepest state that will respect the qos constraints of all the devices
      and sub-domains on the power domain. The state chosen by the governor is
      saved in the "state_idx" field of the generic_pm_domain structure and
      shall be used by the power_off and power_on callbacks to perform the
      necessary actions to set the power domain into (and out of) the state
      indicated by state_idx.
      
      States must be declared in ascending order from shallowest to deepest,
      deepest meaning the state which takes longer to enter and exit.
      
      For platforms that don't declare any states, a single a single "off"
      state is used. Once all platforms are converted to use the state array,
      the legacy on/off latencies will be removed.
      
      [ Lina: Modified genpd state initialization and remove use of
              save_state_latency_ns in genpd timing data ]
      Suggested-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NLina Iyer <lina.iyer@linaro.org>
      Signed-off-by: NAxel Haslam <ahaslam+renesas@baylibre.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fc5cbf0c
    • V
      PM / OPP: Initialize u_volt_min/max to a valid value · c88c395f
      Viresh Kumar 提交于
      We kept u_volt_min/max initialized to 0, when only the target voltage is
      present in DT, instead of the target/min/max triplet.
      
      This didn't go well with the regulator framework, as on few calls the
      min voltage was set to target and max was set to 0 and so resulted in a
      kernel crash like below:
      
      kernel BUG at ../drivers/regulator/core.c:216!
      
      [<c0684af4>] (regulator_check_voltage) from [<c06857ac>] (regulator_set_voltage_unlocked+0x58/0x230)
      [<c06857ac>] (regulator_set_voltage_unlocked) from [<c06859ac>] (regulator_set_voltage+0x28/0x54)
      [<c06859ac>] (regulator_set_voltage) from [<c0775b28>] (_set_opp_voltage+0x30/0x98)
      [<c0775b28>] (_set_opp_voltage) from [<c0776630>] (dev_pm_opp_set_rate+0xf0/0x28c)
      [<c0776630>] (dev_pm_opp_set_rate) from [<c096f784>] (__cpufreq_driver_target+0x184/0x2b4)
      [<c096f784>] (__cpufreq_driver_target) from [<c0973760>] (dbs_check_cpu+0x1b0/0x1f4)
      [<c0973760>] (dbs_check_cpu) from [<c0973f30>] (cpufreq_governor_dbs+0x324/0x5c4)
      [<c0973f30>] (cpufreq_governor_dbs) from [<c0970958>] (__cpufreq_governor+0xe4/0x1ec)
      [<c0970958>] (__cpufreq_governor) from [<c09711e0>] (cpufreq_init_policy+0x64/0x8c)
      [<c09711e0>] (cpufreq_init_policy) from [<c09718cc>] (cpufreq_online+0x2fc/0x708)
      [<c09718cc>] (cpufreq_online) from [<c0765ff0>] (subsys_interface_register+0x94/0xd8)
      [<c0765ff0>] (subsys_interface_register) from [<c0970530>] (cpufreq_register_driver+0x14c/0x19c)
      [<c0970530>] (cpufreq_register_driver) from [<c09746dc>] (dt_cpufreq_probe+0x70/0xec)
      [<c09746dc>] (dt_cpufreq_probe) from [<c076907c>] (platform_drv_probe+0x4c/0xb0)
      [<c076907c>] (platform_drv_probe) from [<c07678e0>] (driver_probe_device+0x214/0x2c0)
      [<c07678e0>] (driver_probe_device) from [<c0767a18>] (__driver_attach+0x8c/0x90)
      [<c0767a18>] (__driver_attach) from [<c0765c2c>] (bus_for_each_dev+0x68/0x9c)
      [<c0765c2c>] (bus_for_each_dev) from [<c0766d78>] (bus_add_driver+0x1a0/0x218)
      [<c0766d78>] (bus_add_driver) from [<c076810c>] (driver_register+0x78/0xf8)
      [<c076810c>] (driver_register) from [<c0301d74>] (do_one_initcall+0x90/0x1d8)
      [<c0301d74>] (do_one_initcall) from [<c1100e14>] (kernel_init_freeable+0x15c/0x1fc)
      [<c1100e14>] (kernel_init_freeable) from [<c0b27a0c>] (kernel_init+0x8/0xf0)
      [<c0b27a0c>] (kernel_init) from [<c0307d78>] (ret_from_fork+0x14/0x3c)
      Code: e1550004 baffffeb e3a00000 e8bd8070 (e7f001f2)
      
      Fix that by initializing u_volt_min/max to the target voltage in such cases.
      Reported-and-tested-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Fixes: 27465902 (PM / OPP: Add support to parse "operating-points-v2" bindings)
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c88c395f
  7. 12 2月, 2016 1 次提交
  8. 11 2月, 2016 1 次提交
  9. 10 2月, 2016 7 次提交
  10. 04 2月, 2016 1 次提交
  11. 03 2月, 2016 1 次提交
  12. 28 1月, 2016 2 次提交
  13. 22 1月, 2016 1 次提交
    • M
      PM / domains: fix lockdep issue for all subdomains · 0106ef51
      Marek Szyprowski 提交于
      During genpd_poweron, genpd->lock is acquired recursively for each
      parent (master) domain, which are separate objects. This confuses
      lockdep, which considers every operation on genpd->lock as being done on
      the same lock class. This leads to the following false positive warning:
      
      =============================================
      [ INFO: possible recursive locking detected ]
      4.4.0-rc4-xu3s #32 Not tainted
      ---------------------------------------------
      swapper/0/1 is trying to acquire lock:
       (&genpd->lock){+.+...}, at: [<c0361550>] __genpd_poweron+0x64/0x108
      
      but task is already holding lock:
       (&genpd->lock){+.+...}, at: [<c0361af8>] genpd_dev_pm_attach+0x168/0x1b8
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&genpd->lock);
        lock(&genpd->lock);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      3 locks held by swapper/0/1:
       #0:  (&dev->mutex){......}, at: [<c0350910>] __driver_attach+0x48/0x98
       #1:  (&dev->mutex){......}, at: [<c0350920>] __driver_attach+0x58/0x98
       #2:  (&genpd->lock){+.+...}, at: [<c0361af8>] genpd_dev_pm_attach+0x168/0x1b8
      
      stack backtrace:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-xu3s #32
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c0016c98>] (unwind_backtrace) from [<c00139c4>] (show_stack+0x10/0x14)
      [<c00139c4>] (show_stack) from [<c0270df0>] (dump_stack+0x84/0xc4)
      [<c0270df0>] (dump_stack) from [<c00780b8>] (__lock_acquire+0x1f88/0x215c)
      [<c00780b8>] (__lock_acquire) from [<c007886c>] (lock_acquire+0xa4/0xd0)
      [<c007886c>] (lock_acquire) from [<c0641f2c>] (mutex_lock_nested+0x70/0x4d4)
      [<c0641f2c>] (mutex_lock_nested) from [<c0361550>] (__genpd_poweron+0x64/0x108)
      [<c0361550>] (__genpd_poweron) from [<c0361b00>] (genpd_dev_pm_attach+0x170/0x1b8)
      [<c0361b00>] (genpd_dev_pm_attach) from [<c03520a8>] (platform_drv_probe+0x2c/0xac)
      [<c03520a8>] (platform_drv_probe) from [<c03507d4>] (driver_probe_device+0x208/0x2fc)
      [<c03507d4>] (driver_probe_device) from [<c035095c>] (__driver_attach+0x94/0x98)
      [<c035095c>] (__driver_attach) from [<c034ec14>] (bus_for_each_dev+0x68/0x9c)
      [<c034ec14>] (bus_for_each_dev) from [<c034fec8>] (bus_add_driver+0x1a0/0x218)
      [<c034fec8>] (bus_add_driver) from [<c035115c>] (driver_register+0x78/0xf8)
      [<c035115c>] (driver_register) from [<c0338488>] (exynos_drm_register_drivers+0x28/0x74)
      [<c0338488>] (exynos_drm_register_drivers) from [<c0338594>] (exynos_drm_init+0x6c/0xc4)
      [<c0338594>] (exynos_drm_init) from [<c00097f4>] (do_one_initcall+0x90/0x1dc)
      [<c00097f4>] (do_one_initcall) from [<c0895e08>] (kernel_init_freeable+0x158/0x1f8)
      [<c0895e08>] (kernel_init_freeable) from [<c063ecac>] (kernel_init+0x8/0xe8)
      [<c063ecac>] (kernel_init) from [<c000f7d0>] (ret_from_fork+0x14/0x24)
      
      This patch replaces mutex_lock with mutex_lock_nested() and uses
      recursion depth to annotate each genpd->lock operation with separate
      lockdep subclass.
      Reported-by: NAnand Moon <linux.amoon@gmail.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Tested-by: NAnand Moon <linux.amoon@gmail.com>
      Tested-by: NTobias Jakobi <tjakobi@math.uni-bielefeld.de>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0106ef51
  14. 08 1月, 2016 3 次提交
  15. 06 1月, 2016 1 次提交
  16. 02 1月, 2016 2 次提交
  17. 28 12月, 2015 1 次提交
  18. 21 12月, 2015 1 次提交
  19. 11 12月, 2015 2 次提交
  20. 10 12月, 2015 2 次提交