summaryrefslogtreecommitdiffstats
path: root/board/freescale/t104xrdb/ddr.c
diff options
context:
space:
mode:
authorTang Yuantian <Yuantian.Tang@freescale.com>2014-11-21 11:17:16 +0800
committerYork Sun <yorksun@freescale.com>2014-12-15 09:17:12 -0800
commit00233528559c913e4bfafb1505ebf65f78e02976 (patch)
tree40606ab17bcdda7be1dc110624731476523ae775 /board/freescale/t104xrdb/ddr.c
parent9c7c86f431866ee102cc68e6b5152f63250f49dc (diff)
downloadblackbird-obmc-uboot-00233528559c913e4bfafb1505ebf65f78e02976.tar.gz
blackbird-obmc-uboot-00233528559c913e4bfafb1505ebf65f78e02976.zip
mpc85xx/t104xrdb: convert deep sleep to generic board interface
A new interface is introduced to support generic board structure. Converts it to use new interface. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board/freescale/t104xrdb/ddr.c')
-rw-r--r--board/freescale/t104xrdb/ddr.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index 2c331eebf9..5aa11b12a4 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -11,6 +11,7 @@
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
#include <asm/fsl_law.h>
+#include <asm/mpc85xx_gpio.h>
#include "ddr.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -109,6 +110,19 @@ found:
popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
}
+#if defined(CONFIG_DEEP_SLEEP)
+void board_mem_sleep_setup(void)
+{
+ void __iomem *cpld_base = (void *)CONFIG_SYS_CPLD_BASE;
+
+ /* does not provide HW signals for power management */
+ clrbits_8(cpld_base + 0x17, 0x40);
+ /* Disable MCKE isolation */
+ gpio_set_value(2, 0);
+ udelay(1);
+}
+#endif
+
phys_size_t initdram(int board_type)
{
phys_size_t dram_size;
@@ -124,5 +138,10 @@ phys_size_t initdram(int board_type)
#else
dram_size = fsl_ddr_sdram_size();
#endif
+
+#if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
+ fsl_dp_resume();
+#endif
+
return dram_size;
}
OpenPOWER on IntegriCloud