diff options
author | Bo Yan <byan@nvidia.com> | 2011-05-02 15:00:26 -0700 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-07-21 18:09:37 -0700 |
commit | cd997b022260b15c7b9a419ec11cdc1c90ccdaa8 (patch) | |
tree | d97e7d8a6a94d76f4b6afe380af675c3d16bebd7 | |
parent | 13bbb59bfe687944923bceb1b2f60020546ce082 (diff) |
ARM: tegra: restore voltage to nominal when reboottegra-11.2.11
At the time of reboot, all rails need to be set to nominal to ensure
the success of subsequent boot
bug 821969
bug 797082
http://git-master/r/#change,42117
(cherry picked from commit 34a922bbf6cad91dd4f5129a1c7ad96f475f34fe)
Change-Id: I5044109866a032dc89d7cd0b83938ecd4b3f360a
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/42297
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/dvfs.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/dvfs.c b/arch/arm/mach-tegra/dvfs.c index f53b20151cdb..f189710c15bb 100644 --- a/arch/arm/mach-tegra/dvfs.c +++ b/arch/arm/mach-tegra/dvfs.c @@ -28,6 +28,7 @@ #include <linux/slab.h> #include <linux/suspend.h> #include <linux/delay.h> +#include <linux/reboot.h> #include <asm/clkdev.h> @@ -394,6 +395,23 @@ static struct notifier_block tegra_dvfs_nb = { .notifier_call = tegra_dvfs_pm_notify, }; +static int tegra_dvfs_reboot_notify(struct notifier_block *nb, + unsigned long event, void *data) +{ + switch (event) { + case SYS_RESTART: + case SYS_HALT: + case SYS_POWER_OFF: + tegra_dvfs_suspend(); + return NOTIFY_OK; + } + return NOTIFY_DONE; +} + +static struct notifier_block tegra_dvfs_reboot_nb = { + .notifier_call = tegra_dvfs_reboot_notify, +}; + /* must be called with dvfs lock held */ static void __tegra_dvfs_rail_disable(struct dvfs_rail *rail) { @@ -472,6 +490,7 @@ int __init tegra_dvfs_late_init(void) mutex_unlock(&dvfs_lock); register_pm_notifier(&tegra_dvfs_nb); + register_reboot_notifier(&tegra_dvfs_reboot_nb); return 0; } |