msm: restart: reset pmic before rebooting or powering off
The pmic needs to shut off certain regulators and configure certain
interrupt status bits in order to properly shut down.
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
diff --git a/arch/arm/mach-msm/restart.c b/arch/arm/mach-msm/restart.c
index 7e37873..0de65a5 100644
--- a/arch/arm/mach-msm/restart.c
+++ b/arch/arm/mach-msm/restart.c
@@ -21,6 +21,7 @@
#include <linux/pm.h>
#include <linux/mfd/pmic8058.h>
#include <linux/mfd/pmic8901.h>
+#include <linux/mfd/pm8xxx/misc.h>
#include <asm/mach-types.h>
@@ -115,6 +116,7 @@
pm8058_reset_pwr_off(0);
pm8901_reset_pwr_off(0);
}
+ pm8xxx_reset_pwr_off(0);
__raw_writel(0, PSHOLD_CTL_SU);
mdelay(10000);
printk(KERN_ERR "Powering off has failed\n");
@@ -145,6 +147,7 @@
if (cpu_is_msm8x60())
pm8058_reset_pwr_off(1);
+ pm8xxx_reset_pwr_off(1);
if (cmd != NULL) {
if (!strncmp(cmd, "bootloader", 10)) {