Skip to content

Commit

Permalink
tenderloin: add in device specific shutdown/reboot commands
Browse files Browse the repository at this point in the history
Change-Id: I8f605cf851cd33d71318a66a5263a109454e6e49
  • Loading branch information
flintman authored and invisiblek committed Jan 4, 2014
1 parent 70e6f34 commit 051c60a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion arch/arm/mach-msm/restart_stock.c
Expand Up @@ -158,8 +158,14 @@ static void __msm_power_off(int lower_pshold)

static void msm_power_off(void)
{
#if defined(CONFIG_MACH_TENDERLOIN)
/* use HPalm bootloader to shutdown/poweroff */
printk(KERN_INFO "%s: Initiating poweroff via bootloader\n", __func__);
msm_restart(0, "shutdown");
#else
/* MSM initiated power off, lower ps_hold */
__msm_power_off(1);
#endif
}

static void cpu_power_off(void *data)
Expand Down Expand Up @@ -293,11 +299,20 @@ void msm_restart(char mode, const char *cmd)
__raw_writel(RESTART_REASON_UPDATE, restart_reason);
// Palm specific end
} else {
__raw_writel(0x77665501, restart_reason);
#if defined(CONFIG_MACH_TENDERLOIN)
/* use HPalm bootloader to reboot */
printk(KERN_INFO "%s: Initiating reboot via bootloader\n", __func__);
__raw_writel(RESTART_REASON_REBOOT, restart_reason);
#else
__raw_writel(0x77665501, restart_reason);
#endif
}
} else {
#ifndef CONFIG_MACH_TENDERLOIN
__raw_writel(0x77665501, restart_reason);
#endif
}

#ifdef CONFIG_LGE_CRASH_HANDLER
if (in_panic == 1)
set_kernel_crash_magic_number();
Expand Down

0 comments on commit 051c60a

Please sign in to comment.