ARM: tegra: disable LP2 cpuidle state if PCIe is enabled
authorStephen Warren <swarren@nvidia.com>
Mon, 6 May 2013 20:19:19 +0000 (14:19 -0600)
committerStephen Warren <swarren@nvidia.com>
Tue, 13 Aug 2013 18:07:56 +0000 (12:07 -0600)
commitb4f173752a56187bd55752b0474429202f2ab1d3
tree64b5936abc2c238f5114b42915ba3958c32890af
parent0447cfd75a6bad561ebf2b393dcb2263c261b6c5
ARM: tegra: disable LP2 cpuidle state if PCIe is enabled

Tegra20 HW appears to have a bug such that PCIe device interrupts,
whether they are legacy IRQs or MSI, are lost when LP2 is enabled. To
work around this, simply disable LP2 if any PCIe devices with interrupts
are present. Detect this via the IRQ domain map operation. This is
slightly over-conservative; if a device with an interrupt is present but
the driver does not actually use them, LP2 will still be disabled.
However, this is a reasonable trade-off which enables a simpler
workaround.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
arch/arm/mach-tegra/cpuidle-tegra20.c
arch/arm/mach-tegra/cpuidle.c
arch/arm/mach-tegra/cpuidle.h
drivers/pci/host/pci-tegra.c
include/linux/tegra-cpuidle.h [new file with mode: 0644]