aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/tegra
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2014-12-09 17:36:50 -0500
committerThierry Reding <treding@nvidia.com>2015-01-09 07:41:19 -0500
commit2b20b6164ec737bec67641564e477aa6e008748b (patch)
tree71c282f954dd3fe063e4fd9c6c1677d26bcf065f /drivers/soc/tegra
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
soc/tegra: pmc: restrict compilation of suspend-related support to ARM
Tegra SoCs with 64-bit ARM support don't currently support deep CPU low-power states in mainline Linux. When this support is added in the future, it will probably look rather different from the existing 32-bit ARM support, since the ARM64 maintainers' strong preference is to use PSCI to implement it. So, for the time being, prevent the CPU suspend-related code and data in the Tegra PMC driver from compiling on ARM64. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> Cc: Thierry Reding <treding@nvidia.com> Cc: Allen Martin <amartin@nvidia.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc/tegra')
-rw-r--r--drivers/soc/tegra/pmc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index a2c0ceb95f8f..4bdc654bd747 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -739,7 +739,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)
739 return 0; 739 return 0;
740} 740}
741 741
742#ifdef CONFIG_PM_SLEEP 742#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM)
743static int tegra_pmc_suspend(struct device *dev) 743static int tegra_pmc_suspend(struct device *dev)
744{ 744{
745 tegra_pmc_writel(virt_to_phys(tegra_resume), PMC_SCRATCH41); 745 tegra_pmc_writel(virt_to_phys(tegra_resume), PMC_SCRATCH41);
@@ -753,10 +753,11 @@ static int tegra_pmc_resume(struct device *dev)
753 753
754 return 0; 754 return 0;
755} 755}
756#endif
757 756
758static SIMPLE_DEV_PM_OPS(tegra_pmc_pm_ops, tegra_pmc_suspend, tegra_pmc_resume); 757static SIMPLE_DEV_PM_OPS(tegra_pmc_pm_ops, tegra_pmc_suspend, tegra_pmc_resume);
759 758
759#endif
760
760static const char * const tegra20_powergates[] = { 761static const char * const tegra20_powergates[] = {
761 [TEGRA_POWERGATE_CPU] = "cpu", 762 [TEGRA_POWERGATE_CPU] = "cpu",
762 [TEGRA_POWERGATE_3D] = "3d", 763 [TEGRA_POWERGATE_3D] = "3d",
@@ -894,7 +895,9 @@ static struct platform_driver tegra_pmc_driver = {
894 .name = "tegra-pmc", 895 .name = "tegra-pmc",
895 .suppress_bind_attrs = true, 896 .suppress_bind_attrs = true,
896 .of_match_table = tegra_pmc_match, 897 .of_match_table = tegra_pmc_match,
898#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM)
897 .pm = &tegra_pmc_pm_ops, 899 .pm = &tegra_pmc_pm_ops,
900#endif
898 }, 901 },
899 .probe = tegra_pmc_probe, 902 .probe = tegra_pmc_probe,
900}; 903};