diff options
author | Bo Yan <byan@nvidia.com> | 2011-05-02 15:00:26 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-22 23:25:40 -0700 |
commit | 34ef5fdb48725e0e076a9f3da532234a4388ddba (patch) | |
tree | 5f538b043472185b9dc14c0cdf75aa7ec3bc5255 /arch/arm/mach-tegra/dvfs.c | |
parent | aa03120c4166d831d946fcd26007b3220b4d4106 (diff) |
ARM: tegra: restore voltage to nominal when reboot
At the time of reboot, all rails need to be set to nominal to ensure
the success of subsequent boot.
bug 821969 bug 797082
Original-Change-Id: Iee635c222619dfcb3e98f13e665ea2bd04e94245
Reviewed-on: http://git-master/r/30086
Reviewed-by: Bo Yan <byan@nvidia.com>
Tested-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Racbc707a55e92261310e956707a850df1db00f72
Diffstat (limited to 'arch/arm/mach-tegra/dvfs.c')
-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 64d55aed3454..9ead21e6cbc0 100644 --- a/arch/arm/mach-tegra/dvfs.c +++ b/arch/arm/mach-tegra/dvfs.c @@ -31,6 +31,7 @@ #include <linux/slab.h> #include <linux/suspend.h> #include <linux/delay.h> +#include <linux/reboot.h> #include <mach/clk.h> @@ -407,6 +408,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) { @@ -493,6 +511,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; } |