1. 29 10月, 2019 1 次提交
  2. 01 10月, 2019 1 次提交
    • T
      soc/tegra: pmc: Fix crashes for hierarchical interrupts · c9e75376
      Thierry Reding 提交于
      Interrupts that don't have an associated wake event or GPIO wake events
      end up with an associate IRQ chip that is NULL and which causes IRQ code
      to crash. This is because we don't implicitly set the parent IRQ chip by
      allocating the interrupt at the parent. However, there really isn't a
      corresponding interrupt at the parent, so we need to work around this by
      setting the special no_irq_chip as the IRQ chip for these interrupts.
      
      Fixes: 19906e6b ("soc/tegra: pmc: Add wake event support")
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      c9e75376
  3. 21 6月, 2019 1 次提交
  4. 05 6月, 2019 4 次提交
  5. 17 4月, 2019 3 次提交
    • J
      soc/tegra: pmc: Move powergate initialisation to probe · 6ac2a01d
      Jon Hunter 提交于
      Commit 8df12745 ("soc/tegra: pmc: Enable XUSB partitions on boot")
      was added as a workaround to ensure that the XUSB powergates or domains
      were turned on early during boot because as this time the Tegra XHCI
      driver did not handle the power domains at all. Now that the Tegra XHCI
      driver has been updated to properly managed the power domains, the
      workaround to enable the XUSB power domain early has been removed. This
      also means that we can now move the initialisation of the powergates
      into the PMC driver probe. Therefore, move the powergate initialisation
      into the PMC driver probe and return any errors detected. To handle any
      errors, functions to cleanup and remove any power-domains registered
      with the generic power-domain framework have been added.
      
      Finally the initialisation of the 'powergates_available' bitmask is kept
      in the PMC early init function to allow the legacy PMC powergate APIs to
      be called during early boot for enabling secondary CPUs on 32-bit Tegra
      devices.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      6ac2a01d
    • J
      soc/tegra: pmc: Remove reset sysfs entries on error · a46b51cd
      Jon Hunter 提交于
      Commit 5f84bb1a ("soc/tegra: pmc: Add sysfs entries for reset info")
      added sysfs entries for Tegra reset source and level. However, these
      sysfs are not removed on error and so if the registering of PMC device
      is probe deferred, then the next time we attempt to probe the PMC device
      warnings such as the following will be displayed on boot ...
      
        sysfs: cannot create duplicate filename '/devices/platform/7000e400.pmc/reset_reason'
      
      Fix this by calling device_remove_file() for each sysfs entry added on
      failure. Note that we call device_remove_file() unconditionally without
      checking if the sysfs entry was created in the first place, but this
      should be OK because kernfs_remove_by_name_ns() will fail silently.
      
      Fixes: 5f84bb1a ("soc/tegra: pmc: Add sysfs entries for reset info")
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      a46b51cd
    • J
      soc/tegra: pmc: Fix reset sources and levels · 00cdaa1b
      Jon Hunter 提交于
      Commit 5f84bb1a ("soc/tegra: pmc: Add sysfs entries for reset info")
      added support for reading the Tegra reset source and level from sysfs.
      However, there are a few issues with this commit which are ...
      1. The number of reset sources for Tegra210 is defined as 5 but it
         should be 6.
      2. The number of reset sources for Tegra186 is defined as 13 but it
         should be 15.
      3. The SoC data variables num_reset_sources and num_reset_levels are
         defined but never used.
      
      Fix the above by ...
      
      1. Removing the reset source 'AOTAG' from the tegra30_reset_sources
         because this is only applicable for Tegra210.
      2. Adding a new tegra210_reset_sources structure for Tegra210 reset
         sources.
      3. Correct the number of reset sources for Tegra210 and Tegra186 by
         using the ARRAY_SIZE macro.
      4. Updating the functions reset_reason_show() and reset_level_show()
         to check whether the value read is valid. While we are at it
         clean-up these functions to remove an unnecessary u32 variable.
      
      Fixes: 5f84bb1a ("soc/tegra: pmc: Add sysfs entries for reset info")
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      00cdaa1b
  6. 22 3月, 2019 1 次提交
  7. 25 1月, 2019 8 次提交
  8. 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
  9. 29 11月, 2018 3 次提交
  10. 28 11月, 2018 1 次提交
  11. 22 11月, 2018 1 次提交
  12. 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
  13. 05 10月, 2018 1 次提交
  14. 27 8月, 2018 7 次提交
  15. 08 5月, 2018 1 次提交
  16. 02 5月, 2018 1 次提交
  17. 19 3月, 2018 1 次提交
  18. 09 3月, 2018 1 次提交