Skip to content

Commit

Permalink
soc/tegra: pmc: restrict compilation of suspend-related support to ARM
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paul Walmsley <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Allen Martin <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
Paul Walmsley authored and thierryreding committed Jan 9, 2015
1 parent 97bf6af commit 2b20b61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions drivers/soc/tegra/pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM_SLEEP
#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM)
static int tegra_pmc_suspend(struct device *dev)
{
tegra_pmc_writel(virt_to_phys(tegra_resume), PMC_SCRATCH41);
Expand All @@ -753,10 +753,11 @@ static int tegra_pmc_resume(struct device *dev)

return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(tegra_pmc_pm_ops, tegra_pmc_suspend, tegra_pmc_resume);

#endif

static const char * const tegra20_powergates[] = {
[TEGRA_POWERGATE_CPU] = "cpu",
[TEGRA_POWERGATE_3D] = "3d",
Expand Down Expand Up @@ -894,7 +895,9 @@ static struct platform_driver tegra_pmc_driver = {
.name = "tegra-pmc",
.suppress_bind_attrs = true,
.of_match_table = tegra_pmc_match,
#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM)
.pm = &tegra_pmc_pm_ops,
#endif
},
.probe = tegra_pmc_probe,
};
Expand Down
2 changes: 1 addition & 1 deletion include/soc/tegra/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum tegra_suspend_mode {
TEGRA_MAX_SUSPEND_MODE,
};

#ifdef CONFIG_PM_SLEEP
#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM)
enum tegra_suspend_mode
tegra_pm_validate_suspend_mode(enum tegra_suspend_mode mode);

Expand Down

0 comments on commit 2b20b61

Please sign in to comment.