diff options
author | Ashwin Joshi <asjoshi@nvidia.com> | 2014-01-24 15:26:35 +0530 |
---|---|---|
committer | Sandeep Trasi <strasi@nvidia.com> | 2014-01-29 03:09:55 -0800 |
commit | 5e9fd77f4b94c106fbd54d56aa3c9b28889fb398 (patch) | |
tree | 7330fd7af4bd345beb279e6b30d24e1c40be33ac /arch/arm/mach-tegra/dvfs.c | |
parent | 4a2f89599c28d5ccaa8f06aa8372db62107d5522 (diff) |
ARM: tegra: dvfs: Enable connected dvfs rails
If CONFIG_TEGRA_DVFS_RAIL_CONNECT_ALL is set, enable rails and voltage
scaling only if all required rails connect successfully. Otherwise,
enable all those rails which connect successfully.
Bug 1410210
Change-Id: I9ba692b4a3946dc31ce13dea863ffb493cf9e080
Signed-off-by: Ashwin Joshi <asjoshi@nvidia.com>
Reviewed-on: http://git-master/r/357668
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: Sandeep Trasi <strasi@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/dvfs.c')
-rw-r--r-- | arch/arm/mach-tegra/dvfs.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/dvfs.c b/arch/arm/mach-tegra/dvfs.c index 12f71966a9a0..638abe40a5d5 100644 --- a/arch/arm/mach-tegra/dvfs.c +++ b/arch/arm/mach-tegra/dvfs.c @@ -1955,6 +1955,11 @@ int tegra_dvfs_rail_dfll_mode_set_cold(struct dvfs_rail *rail) * by the regulator api for each one. Must be called in late init, after * all the regulator api's regulators are initialized. */ + +#ifdef CONFIG_TEGRA_DVFS_RAIL_CONNECT_ALL +/* + * Enable voltage scaling only if all the rails connect successfully + */ int __init tegra_dvfs_rail_connect_regulators(void) { bool connected = true; @@ -1986,6 +1991,29 @@ int __init tegra_dvfs_rail_connect_regulators(void) return 0; } +#else +int __init tegra_dvfs_rail_connect_regulators(void) +{ + struct dvfs_rail *rail; + + mutex_lock(&dvfs_lock); + + list_for_each_entry(rail, &dvfs_rail_list, node) { + if (!dvfs_rail_connect_to_regulator(rail)) { + dvfs_rail_update(rail); + if (!rail->disabled) + continue; + /* Don't rely on boot level - force disabled voltage */ + rail->disabled = false; + } + __tegra_dvfs_rail_disable(rail); + } + + mutex_unlock(&dvfs_lock); + + return 0; +} +#endif int __init tegra_dvfs_rail_register_notifiers(void) { |