1. 15 12月, 2018 1 次提交
    • J
      soc/tegra: pmc: Drop SMP dependency from CPU APIs · f9c380ef
      Jon Hunter 提交于
      When CONFIG_SMP is disabled, the tegra clk driver now fails to build:
      
      drivers/clk/tegra/clk-tegra30.c: In function ‘tegra30_cpu_rail_off_ready’:
      drivers/clk/tegra/clk-tegra30.c:1151:2: error: implicit declaration of function ‘tegra_pmc_cpu_is_powered’ [-Werror=implicit-function-declaration]
        cpu_pwr_status = tegra_pmc_cpu_is_powered(1) ||
          ^
      Fix the above error by removing the CONFIG_SMP ifdef around the
      declaration around the PMC CPU APIs because although these are not
      needed for non-SMP configurations, there is no harm in including these
      for non-SMP builds either.
      
      Fixes: 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper function")
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      f9c380ef
  2. 29 11月, 2018 3 次提交
  3. 28 11月, 2018 1 次提交
  4. 22 11月, 2018 1 次提交
  5. 08 11月, 2018 3 次提交
    • D
      soc/tegra: pmc: Drop locking from tegra_powergate_is_powered() · b6e1fd17
      Dmitry Osipenko 提交于
      This fixes splats like the one below if CONFIG_DEBUG_ATOMIC_SLEEP=y
      and machine (Tegra30) booted with SMP=n or all secondary CPU's are put
      offline. Locking isn't needed because it protects atomic operation.
      
      BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
      in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
      CPU: 0 PID: 0 Comm: swapper/0 Tainted: G         C        4.18.0-next-20180821-00180-gc3ebb6544e44-dirty #823
      Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
      [<c01134f4>] (unwind_backtrace) from [<c010db2c>] (show_stack+0x20/0x24)
      [<c010db2c>] (show_stack) from [<c0bd0f3c>] (dump_stack+0x94/0xa8)
      [<c0bd0f3c>] (dump_stack) from [<c0151df8>] (___might_sleep+0x13c/0x174)
      [<c0151df8>] (___might_sleep) from [<c0151ea0>] (__might_sleep+0x70/0xa8)
      [<c0151ea0>] (__might_sleep) from [<c0bec2b8>] (mutex_lock+0x2c/0x70)
      [<c0bec2b8>] (mutex_lock) from [<c0589844>] (tegra_powergate_is_powered+0x44/0xa8)
      [<c0589844>] (tegra_powergate_is_powered) from [<c0581a60>] (tegra30_cpu_rail_off_ready+0x30/0x74)
      [<c0581a60>] (tegra30_cpu_rail_off_ready) from [<c0122244>] (tegra30_idle_lp2+0xa0/0x108)
      [<c0122244>] (tegra30_idle_lp2) from [<c0853438>] (cpuidle_enter_state+0x140/0x540)
      [<c0853438>] (cpuidle_enter_state) from [<c08538a4>] (cpuidle_enter+0x40/0x4c)
      [<c08538a4>] (cpuidle_enter) from [<c01595e0>] (call_cpuidle+0x30/0x48)
      [<c01595e0>] (call_cpuidle) from [<c01599f8>] (do_idle+0x238/0x28c)
      [<c01599f8>] (do_idle) from [<c0159d28>] (cpu_startup_entry+0x28/0x2c)
      [<c0159d28>] (cpu_startup_entry) from [<c0be76c8>] (rest_init+0xd8/0xdc)
      [<c0be76c8>] (rest_init) from [<c1200f50>] (start_kernel+0x41c/0x430)
      Signed-off-by: NDmitry Osipenko <digetx@gmail.com>
      Acked-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      b6e1fd17
    • S
      soc/tegra: pmc: Add sysfs entries for reset info · 5f84bb1a
      Sandipan Patra 提交于
      Implement read-only reset_reason and reset_level sysfs attributes that
      can be used to query the reset reason and level at runtime.
      Signed-off-by: NSandipan Patra <spatra@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      5f84bb1a
    • J
      soc/tegra: pmc: Don't power-up XUSB power-domains · 3bb2f843
      Jon Hunter 提交于
      Now that the Tegra xHCI driver manages the XUSB power-domains itself,
      remove the code to power-up the power-domains used by the xHCI device
      from the PMC driver on boot.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      3bb2f843
  6. 05 10月, 2018 1 次提交
  7. 27 8月, 2018 7 次提交
  8. 08 5月, 2018 1 次提交
  9. 02 5月, 2018 1 次提交
  10. 19 3月, 2018 1 次提交
  11. 09 3月, 2018 2 次提交
  12. 08 3月, 2018 1 次提交
  13. 13 12月, 2017 2 次提交
  14. 31 7月, 2017 1 次提交
    • T
      soc/tegra: Fix bad of_node_put() in powergate init · 0c106e57
      Tuomas Tynkkynen 提交于
      The for_each_child_of_node macro itself maintains the correct reference
      count of the nodes so the explicit of_node_put() call causes a warning:
      
      [    0.098960] OF: ERROR: Bad of_node_put() on /pmc@7000e400/powergates/xusba
      [    0.098981] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.3 #1-NixOS
      [    0.098996] Hardware name: NVIDIA Jetson TX1 Developer Kit (DT)
      [    0.099011] Call trace:
      [    0.099034] [<ffff00000808a048>] dump_backtrace+0x0/0x2a0
      [    0.099051] [<ffff00000808a30c>] show_stack+0x24/0x30
      [    0.099069] [<ffff0000084a6494>] dump_stack+0x9c/0xc0
      [    0.099090] [<ffff000008992214>] of_node_release+0xa4/0xa8
      [    0.099107] [<ffff0000084a9270>] kobject_put+0x90/0x1f8
      [    0.099124] [<ffff0000089914ac>] of_node_put+0x24/0x30
      [    0.099140] [<ffff00000898cec4>] __of_get_next_child+0x4c/0x70
      [    0.099155] [<ffff00000898cf28>] of_get_next_child+0x40/0x68
      [    0.099173] [<ffff0000090a099c>] tegra_pmc_early_init+0x4e8/0x5ac
      [    0.099189] [<ffff00000808399c>] do_one_initcall+0x5c/0x168
      [    0.099206] [<ffff000009050c98>] kernel_init_freeable+0xd4/0x240
      [    0.099224] [<ffff000008b2d658>] kernel_init+0x18/0x108
      [    0.099238] [<ffff0000080836c0>] ret_from_fork+0x10/0x50
      
      (It's not very apparent from the OF documentation that of_node_put() is
      not needed; the macro itself has no docstring and of_get_next_child()
      used in the implementation begins with "Returns a node pointer with
      refcount incremented" but then only at the very end of the docstring
      the crucial part "Decrements the refcount of prev" is mentioned.)
      
      Fixes: a3804512 ("soc/tegra: pmc: Add generic PM domain support")
      Signed-off-by: NTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      0c106e57
  15. 15 11月, 2016 10 次提交
  16. 16 8月, 2016 1 次提交
  17. 30 6月, 2016 3 次提交
    • J
      soc/tegra: pmc: Enable XUSB partitions on boot · 8df12745
      Jon Hunter 提交于
      The Tegra XHCI driver does not currently manage the Tegra XUSB power
      partitions and so it these partitions have not been enabled by the
      bootloader then the system will crash when probing the XHCI device.
      
      While proper support for managing the power partitions is being
      developed to the XHCI driver for Tegra, for now power on all the XUSB
      partitions for USB host and super-speed on boot if the XHCI driver is
      enabled.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      8df12745
    • J
      soc/tegra: pmc: Initialise power partitions early · e2d17960
      Jon Hunter 提交于
      If CONFIG_PM_GENERIC_DOMAINS is not enabled, then power partitions
      associated with a device will not be enabled automatically by the PM
      core when the device is in use. To avoid situations where a device in
      a power partition is to be used but the partition is not enabled,
      initialise the power partitions for Tegra early in the boot process and
      if CONFIG_PM_GENERIC_DOMAINS is not enabled, then power on all
      partitions defined in the device-tree blob.
      
      Note that if CONFIG_PM_GENERIC_DOMAINS is not enabled, after the
      partitions are turned on, the clocks and resets used as part of the
      sequence for turning on the partition are released again as they are no
      longer needed by the PMC driver. Another benefit of this is that this
      avoids any issues of sharing resets between the PMC driver and other
      device drivers that may wish to independently control a particular
      reset.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      e2d17960
    • J
      soc/tegra: pmc: Add specific error messages · c2710ac9
      Jon Hunter 提交于
      When initialising a powergate, only a single error message is shown if
      the initialisation fails. Add more error messages to give specific
      details of what failed if the initialisation failed and remove the
      generic failure message.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      c2710ac9