Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/arch/arm/mach-msm/pm.c 2010-11-15 03:06:19.257038324 +1300
- +++ b/arch/arm/mach-msm/pm.c 2010-11-18 00:08:59.541984000 +1300
- @@ -228,6 +228,7 @@
- * Enable it after booting up BOOT_LOCK_TIMEOUT sec.
- */
- #define BOOT_LOCK_TIMEOUT (60 * HZ)
- +#define BOOT_LOCK_TIMEOUT_SHORT (10 * HZ)
- static void do_expire_boot_lock(struct work_struct *work)
- {
- enable_hlt();
- @@ -878,6 +879,30 @@
- #endif
- }
- +static void __init boot_lock_nohalt(void)
- +
- +{
- + int nohalt_timeout;
- +
- + /* normal/factory2/recovery */
- + switch (board_mfg_mode()) {
- + case 0: /* normal */
- + case 1: /* factory2 */
- + case 2: /* recovery */
- + nohalt_timeout = BOOT_LOCK_TIMEOUT;
- + break;
- + case 3: /* charge */
- + case 4: /* power_test */
- + case 5: /* offmode_charge */
- + default:
- + nohalt_timeout = BOOT_LOCK_TIMEOUT_SHORT;
- + break;
- + }
- + disable_hlt();
- + schedule_delayed_work(&work_expire_boot_lock, nohalt_timeout);
- + pr_info("Acquire 'boot-time' halt_lock %ds\n", nohalt_timeout / HZ);
- +}
- +
- static int __init msm_pm_init(void)
- {
- pm_power_off = msm_pm_power_off;
- @@ -909,6 +934,7 @@
- schedule_delayed_work(&work_expire_boot_lock, BOOT_LOCK_TIMEOUT);
- pr_info("Acquire 'boot-time' halt_lock\n");
- }
- + boot_lock_nohalt();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement