summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc85xx/cpu_init.c
diff options
context:
space:
mode:
authorTang Yuantian <yuantian.tang@freescale.com>2014-04-17 15:33:46 +0800
committerYork Sun <yorksun@freescale.com>2014-04-22 17:58:49 -0700
commitaade20046b7ab5bd9b2afe84ccb31f0adf0c5e1e (patch)
tree238878efdee4574890334657a984c1c2d564fe91 /arch/powerpc/cpu/mpc85xx/cpu_init.c
parent5aef4c86f3629b937cee159c3d44c0d0e9762a42 (diff)
downloadu-boot-imx-aade20046b7ab5bd9b2afe84ccb31f0adf0c5e1e.zip
u-boot-imx-aade20046b7ab5bd9b2afe84ccb31f0adf0c5e1e.tar.gz
u-boot-imx-aade20046b7ab5bd9b2afe84ccb31f0adf0c5e1e.tar.bz2
mpc85xx/t104x: Add deep sleep framework support
When T104x soc wakes up from deep sleep, control is passed to the primary core that starts executing uboot. After re-initialized some IP blocks, like DDRC, kernel will take responsibility to continue to restore environment it leaves before. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/cpu_init.c')
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 941c20e..867abb6 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -350,6 +350,7 @@ void cpu_init_f (void)
extern void m8560_cpm_reset (void);
#ifdef CONFIG_SYS_DCSRBAR_PHYS
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+ gd = (gd_t *)(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
#endif
#if defined(CONFIG_SECURE_BOOT)
struct law_entry law;
@@ -414,6 +415,13 @@ void cpu_init_f (void)
in_be32(&gur->dcsrcr);
#endif
+#ifdef CONFIG_SYS_DCSRBAR_PHYS
+#ifdef CONFIG_DEEP_SLEEP
+ /* disable the console if boot from deep sleep */
+ if (in_be32(&gur->scrtsr[0]) & (1 << 3))
+ gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
+#endif
+#endif
#ifdef CONFIG_SYS_FSL_ERRATUM_A007212
fsl_erratum_a007212_workaround();
#endif