Advertisement
Guest User

Untitled

a guest
Nov 17th, 2010
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.25 KB | None | 0 0
  1. --- a/arch/arm/mach-msm/pm.c    2010-11-15 03:06:19.257038324 +1300
  2. +++ b/arch/arm/mach-msm/pm.c    2010-11-18 00:08:59.541984000 +1300
  3. @@ -228,6 +228,7 @@
  4.   * Enable it after booting up BOOT_LOCK_TIMEOUT sec.
  5.   */
  6.  #define BOOT_LOCK_TIMEOUT      (60 * HZ)
  7. +#define BOOT_LOCK_TIMEOUT_SHORT      (10 * HZ)
  8.  static void do_expire_boot_lock(struct work_struct *work)
  9.  {
  10.     enable_hlt();
  11. @@ -878,6 +879,30 @@
  12.  #endif
  13.  }
  14.  
  15. +static void __init boot_lock_nohalt(void)
  16. +
  17. +{
  18. +   int nohalt_timeout;
  19. +
  20. +   /* normal/factory2/recovery */
  21. +   switch (board_mfg_mode()) {
  22. +   case 0: /* normal */
  23. +   case 1: /* factory2 */
  24. +   case 2: /* recovery */
  25. +       nohalt_timeout = BOOT_LOCK_TIMEOUT;
  26. +       break;
  27. +   case 3: /* charge */
  28. +   case 4: /* power_test */
  29. +   case 5: /* offmode_charge */
  30. +   default:
  31. +       nohalt_timeout = BOOT_LOCK_TIMEOUT_SHORT;
  32. +       break;
  33. +   }
  34. +   disable_hlt();
  35. +   schedule_delayed_work(&work_expire_boot_lock, nohalt_timeout);
  36. +   pr_info("Acquire 'boot-time' halt_lock %ds\n", nohalt_timeout / HZ);
  37. +}
  38. +
  39.  static int __init msm_pm_init(void)
  40.  {
  41.     pm_power_off = msm_pm_power_off;
  42. @@ -909,6 +934,7 @@
  43.         schedule_delayed_work(&work_expire_boot_lock, BOOT_LOCK_TIMEOUT);
  44.         pr_info("Acquire 'boot-time' halt_lock\n");
  45.     }
  46. +   boot_lock_nohalt();
  47.     return 0;
  48.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement