arm: tegra: enterprise: set suspend_mode
Wen Yi [Mon, 8 Aug 2011 17:15:32 +0000 (10:15 -0700)]
Set LP0 as default suspend_mode for Enterprise and 1197.
Set LP1 as suspend_mode for Enterprise A01.

BUG 861362

Original-Change-Id: I2c0fdbe38b074528accf9c55a780f00c17074373
Reviewed-on: http://git-master/r/45871
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rc85f78a9d7df6531f779e33f42847b7c246b8052

arch/arm/mach-tegra/board-enterprise-power.c
arch/arm/mach-tegra/board-enterprise.h

index edc25a3..4089a88 100644 (file)
@@ -34,6 +34,7 @@
 #include <mach/pinmux.h>
 
 #include "gpio-names.h"
+#include "board.h"
 #include "board-enterprise.h"
 #include "pm.h"
 #include "wakeups-t3.h"
@@ -437,7 +438,7 @@ static void enterprise_board_resume(int lp_state, enum resume_stage stg)
 static struct tegra_suspend_platform_data enterprise_suspend_data = {
        .cpu_timer      = 2000,
        .cpu_off_timer  = 200,
-       .suspend_mode   = TEGRA_SUSPEND_LP1,
+       .suspend_mode   = TEGRA_SUSPEND_LP0,
        .core_timer     = 0x7e7e,
        .core_off_timer = 0,
        .corereq_high   = true,
@@ -446,8 +447,17 @@ static struct tegra_suspend_platform_data enterprise_suspend_data = {
        .board_resume = enterprise_board_resume,
 };
 
+static void enterprise_init_deep_sleep_mode(void)
+{
+       struct board_info bi;
+       tegra_get_board_info(&bi);
+       if (bi.board_id == BOARD_1205 && bi.fab == ENTERPRISE_FAB_A01)
+               enterprise_suspend_data.suspend_mode = TEGRA_SUSPEND_LP1;
+}
+
 int __init enterprise_suspend_init(void)
 {
+       enterprise_init_deep_sleep_mode();
        tegra_init_suspend(&enterprise_suspend_data);
        return 0;
 }
index 296250f..76e11f4 100644 (file)
@@ -77,4 +77,6 @@ void __init enterprise_tsensor_init(void);
 #define CAM_FLASH_MAX_TORCH_AMP        7
 #define CAM_FLASH_MAX_FLASH_AMP        7
 
+#define BOARD_1205             (0x0C05)
+#define ENTERPRISE_FAB_A01     (0x01)
 #endif