summaryrefslogtreecommitdiff
path: root/board/freescale/ls1021atwr
diff options
context:
space:
mode:
authortang yuantian <Yuantian.Tang@freescale.com>2015-09-24 15:52:02 +0800
committerYork Sun <yorksun@freescale.com>2015-10-30 09:19:48 -0700
commit0210a3698862801169e3149475174b5268602a93 (patch)
tree0e8ab8910e41db60517dbb1fe71318a9aee7334a /board/freescale/ls1021atwr
parent6ec9aef2cef311c57652e8d17b09eceac2cebb06 (diff)
downloadu-boot-imx-0210a3698862801169e3149475174b5268602a93.zip
u-boot-imx-0210a3698862801169e3149475174b5268602a93.tar.gz
u-boot-imx-0210a3698862801169e3149475174b5268602a93.tar.bz2
arm: ls1021atwr: optimize the deep sleep latency
It will take more than 1s when wake up from deep sleep. Most of the time is spent on outputing information. This patch reduced the deep sleep latency by: 1. avoid outputing system informaton 2. remove flush cache after DDR restore 3. skip reloading second stage uboot binary when SD boot Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board/freescale/ls1021atwr')
-rw-r--r--board/freescale/ls1021atwr/ls1021atwr.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index 445ea24..4918c11 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -436,8 +436,10 @@ int board_early_init_f(void)
}
#if defined(CONFIG_DEEP_SLEEP)
- if (is_warm_boot())
- fsl_dp_disable_console();
+ if (is_warm_boot()) {
+ timer_init();
+ dram_init();
+ }
#endif
return 0;
@@ -446,6 +448,8 @@ int board_early_init_f(void)
#ifdef CONFIG_SPL_BUILD
void board_init_f(ulong dummy)
{
+ void (*second_uboot)(void);
+
/* Clear the BSS */
memset(__bss_start, 0, __bss_end - __bss_start);
@@ -466,6 +470,17 @@ void board_init_f(ulong dummy)
enable_layerscape_ns_access();
#endif
+ /*
+ * if it is woken up from deep sleep, then jump to second
+ * stage uboot and continue executing without recopying
+ * it from SD since it has already been reserved in memeory
+ * in last boot.
+ */
+ if (is_warm_boot()) {
+ second_uboot = (void (*)(void))CONFIG_SYS_TEXT_BASE;
+ second_uboot();
+ }
+
board_init_r(NULL, 0);
}
#endif