mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
soc/tegra: fuse: Enable fuse clock on suspend for Tegra124
The FUSE clock should be enabled during suspend on Tegra124. Currently clk driver enables it on all SoCs, but FUSE may require a higher core voltage on Tegra30 while enabled. Move the quirk into the FUSE driver and make it specific to Tegra124. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
24a15252ff
commit
59c6fceb2e
@ -275,9 +275,38 @@ static int __maybe_unused tegra_fuse_runtime_suspend(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused tegra_fuse_suspend(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Critical for RAM re-repair operation, which must occur on resume
|
||||
* from LP1 system suspend and as part of CCPLEX cluster switching.
|
||||
*/
|
||||
if (fuse->soc->clk_suspend_on)
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
else
|
||||
ret = pm_runtime_force_suspend(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __maybe_unused tegra_fuse_resume(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (fuse->soc->clk_suspend_on)
|
||||
pm_runtime_put(dev);
|
||||
else
|
||||
ret = pm_runtime_force_resume(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops tegra_fuse_pm = {
|
||||
SET_RUNTIME_PM_OPS(tegra_fuse_runtime_suspend, tegra_fuse_runtime_resume,
|
||||
NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(tegra_fuse_suspend, tegra_fuse_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra_fuse_driver = {
|
||||
|
@ -167,4 +167,5 @@ const struct tegra_fuse_soc tegra20_fuse_soc = {
|
||||
.probe = tegra20_fuse_probe,
|
||||
.info = &tegra20_fuse_info,
|
||||
.soc_attr_group = &tegra_soc_attr_group,
|
||||
.clk_suspend_on = false,
|
||||
};
|
||||
|
@ -112,6 +112,7 @@ const struct tegra_fuse_soc tegra30_fuse_soc = {
|
||||
.speedo_init = tegra30_init_speedo_data,
|
||||
.info = &tegra30_fuse_info,
|
||||
.soc_attr_group = &tegra_soc_attr_group,
|
||||
.clk_suspend_on = false,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -127,6 +128,7 @@ const struct tegra_fuse_soc tegra114_fuse_soc = {
|
||||
.speedo_init = tegra114_init_speedo_data,
|
||||
.info = &tegra114_fuse_info,
|
||||
.soc_attr_group = &tegra_soc_attr_group,
|
||||
.clk_suspend_on = false,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -208,6 +210,7 @@ const struct tegra_fuse_soc tegra124_fuse_soc = {
|
||||
.lookups = tegra124_fuse_lookups,
|
||||
.num_lookups = ARRAY_SIZE(tegra124_fuse_lookups),
|
||||
.soc_attr_group = &tegra_soc_attr_group,
|
||||
.clk_suspend_on = true,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -294,6 +297,7 @@ const struct tegra_fuse_soc tegra210_fuse_soc = {
|
||||
.lookups = tegra210_fuse_lookups,
|
||||
.num_lookups = ARRAY_SIZE(tegra210_fuse_lookups),
|
||||
.soc_attr_group = &tegra_soc_attr_group,
|
||||
.clk_suspend_on = false,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -324,6 +328,7 @@ const struct tegra_fuse_soc tegra186_fuse_soc = {
|
||||
.lookups = tegra186_fuse_lookups,
|
||||
.num_lookups = ARRAY_SIZE(tegra186_fuse_lookups),
|
||||
.soc_attr_group = &tegra_soc_attr_group,
|
||||
.clk_suspend_on = false,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -354,6 +359,7 @@ const struct tegra_fuse_soc tegra194_fuse_soc = {
|
||||
.lookups = tegra194_fuse_lookups,
|
||||
.num_lookups = ARRAY_SIZE(tegra194_fuse_lookups),
|
||||
.soc_attr_group = &tegra194_soc_attr_group,
|
||||
.clk_suspend_on = false,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -384,5 +390,6 @@ const struct tegra_fuse_soc tegra234_fuse_soc = {
|
||||
.lookups = tegra234_fuse_lookups,
|
||||
.num_lookups = ARRAY_SIZE(tegra234_fuse_lookups),
|
||||
.soc_attr_group = &tegra194_soc_attr_group,
|
||||
.clk_suspend_on = false,
|
||||
};
|
||||
#endif
|
||||
|
@ -34,6 +34,8 @@ struct tegra_fuse_soc {
|
||||
unsigned int num_lookups;
|
||||
|
||||
const struct attribute_group *soc_attr_group;
|
||||
|
||||
bool clk_suspend_on;
|
||||
};
|
||||
|
||||
struct tegra_fuse {
|
||||
|
Loading…
Reference in New Issue
Block a user