diff options
author | Sachin Nikam <snikam@nvidia.com> | 2011-01-17 18:58:16 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:23 -0800 |
commit | b2e4896f22ad6400c408d4c1aae938e75ca306d9 (patch) | |
tree | 24ee3735af5a39953075cc9ad921e163026eba57 /arch/arm/mach-tegra/board-whistler-power.c | |
parent | 37781e357ef9f6cee676ad2ac26ac7d3088cb076 (diff) |
[ARM] tegra: Enable LP0 support
Bug 780047
Original-Change-Id: Ideec82c535d9fbad869cce89375828342da91dbb
Reviewed-on: http://git-master/r/16058
Tested-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Re614c8b44c1062d3444ecabea1c9163ef0473ede
Diffstat (limited to 'arch/arm/mach-tegra/board-whistler-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-power.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-power.c b/arch/arm/mach-tegra/board-whistler-power.c index 9723a952f41d..eebdd869679d 100644 --- a/arch/arm/mach-tegra/board-whistler-power.c +++ b/arch/arm/mach-tegra/board-whistler-power.c @@ -30,6 +30,7 @@ #include <mach/irqs.h> #include "gpio-names.h" +#include "fuse.h" #include "power.h" #include "wakeups-t2.h" #include "board.h" @@ -223,23 +224,30 @@ static struct i2c_board_info __initdata whistler_regulators[] = { static struct tegra_suspend_platform_data whistler_suspend_data = { .cpu_timer = 2000, - .cpu_off_timer = 0, - .suspend_mode = TEGRA_SUSPEND_NONE, + .cpu_off_timer = 1000, + .suspend_mode = TEGRA_SUSPEND_LP0, .core_timer = 0x7e7e, - .core_off_timer = 0, + .core_off_timer = 0xf, .separate_req = true, .corereq_high = true, .sysclkreq_high = true, - .wake_enb = 0, + .wake_enb = TEGRA_WAKE_KBC_EVENT, .wake_high = 0, .wake_low = 0, - .wake_any = 0, + .wake_any = TEGRA_WAKE_KBC_EVENT, }; int __init whistler_regulator_init(void) { void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); + void __iomem *chip_id = IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804; u32 pmc_ctrl; + u32 minor; + + minor = (readl(chip_id) >> 16) & 0xf; + /* A03 (but not A03p) chips do not support LP0 */ + if (minor == 3 && !(tegra_spare_fuse(18) || tegra_spare_fuse(19))) + whistler_suspend_data.suspend_mode = TEGRA_SUSPEND_LP1; /* configure the power management controller to trigger PMU * interrupts when low */ |