diff options
author | krishna kishore <kthota@nvidia.com> | 2010-07-16 22:11:55 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-07-26 15:09:29 -0700 |
commit | df8cf1f41f62864ba2131cc6920d917933b908c5 (patch) | |
tree | 368c5b3c14ebb937c81e033a3b11d90d7eeb08d7 /arch/arm/mach-tegra/suspend.c | |
parent | 69ceb273e12caf3ceb4bc3d2aeb69c441046ed6d (diff) |
[ARM] tegra: suspend: add work-around for AP20 A03 LP0 restore
SDRAM initialization is broken in the boot ROM on AP20 A03, so LP0 restore
needs to reload the first-stage bootloader and then jump to its LP0
restore sequence. to trigger this behavior, the lp0 flag is moved to a
dummy location in the scratch register which the boot ROM ignores, but
the bootloader will detect.
Change-Id: Iea144e7440367938755ab66d67758558bc184b44
Reviewed-on: http://git-master/r/4022
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/suspend.c')
-rw-r--r-- | arch/arm/mach-tegra/suspend.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/suspend.c b/arch/arm/mach-tegra/suspend.c index 8eda2fab9873..b0d84eee10ee 100644 --- a/arch/arm/mach-tegra/suspend.c +++ b/arch/arm/mach-tegra/suspend.c @@ -49,6 +49,7 @@ #include "nvrm/core/common/nvrm_message.h" #include "power.h" +#include "board.h" /* NOTE: only add elements to the end of this structure, since the assembly * code uses hard-coded offsets */ @@ -344,9 +345,16 @@ static void tegra_setup_warmboot(void) { u32 scratch0; - /* Turn the WARMBOOT flag on in scratch0 */ scratch0 = readl(pmc + PMC_SCRATCH0); - scratch0 |= 1; + /* lp0 restore is broken in the ap20 a03 boot rom, so fake the + * bootrom into performing a regular boot, but pass a flag to the + * bootloader to bypass the kernel reload and jump to the lp0 + * restore sequence */ + if (tegra_is_ap20_a03()) + scratch0 |= (1<<5); + else + scratch0 |= 1; + pmc_32kwritel(scratch0, PMC_SCRATCH0); /* Write the AVP warmboot entry address in SCRATCH1 */ |