From: Tang Yuantian Date: Sun, 26 Jan 2014 14:00:41 +0800 Subject: [U-Boot] [PATCH 3/3] mpc85xx: Add deep sleep support on T1040QDS In-Reply-To: <1390716041-13541-1-git-send-email-Yuantian.Tang@freescale.com> References: <1390716041-13541-1-git-send-email-Yuantian.Tang@freescale.com> Message-ID: <1390716041-13541-3-git-send-email-Yuantian.Tang@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Tang Yuantian Add deep sleep support on T1040QDS platforms. Signed-off-by: Tang Yuantian --- board/freescale/t1040qds/t1040qds.c | 12 ++++++++++++ include/configs/T1040QDS.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index de3ea5c..2494da6 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "../common/qixis.h" #include "t1040qds.h" @@ -244,3 +245,14 @@ int board_need_mem_reset(void) { return 1; } + +#ifdef CONFIG_DEEP_SLEEP +void board_mem_sleep_setup(void) +{ + /* does not provide HW signals for power management */ + QIXIS_WRITE(pwr_ctl[1], (QIXIS_READ(pwr_ctl[1]) & ~0x2)); + /* Disable MCKE isolation */ + gpio_set_value(2, 0); + udelay(1); +} +#endif diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 91b511b..9c5daf1 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -36,6 +36,10 @@ #define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/t1040qds/t1040_rcw.cfg #endif +/* support deep sleep */ +#define CONFIG_DEEP_SLEEP +#define CONFIG_SILENT_CONSOLE + /* High Level Configuration Options */ #define CONFIG_BOOKE #define CONFIG_E500 /* BOOKE e500 family */ -- 1.8.0