2 * arch/sh/kernel/cpu/sh4a/sleep-sh_mobile.S
4 * Sleep mode and Standby modes support for SuperH Mobile
6 * Copyright (C) 2009 Magnus Damm
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
13 #include <linux/sys.h>
14 #include <linux/errno.h>
15 #include <linux/linkage.h>
16 #include <asm/asm-offsets.h>
17 #include <asm/suspend.h>
19 /* manage self-refresh and enter standby mode.
20 * this code will be copied to on-chip memory and executed from there.
24 ENTRY(sh_mobile_standby)
30 /* SDRAM: disable power down and put in self-refresh mode */
40 tst #SUSP_SH_SLEEP, r0
43 /* set mode to "sleep mode" */
48 tst #SUSP_SH_STANDBY, r0
51 /* set mode to "software standby mode" */
56 tst #SUSP_SH_RSTANDBY, r0
59 /* set mode to "r-standby mode" */
64 tst #SUSP_SH_USTANDBY, r0
67 /* set mode to "u-standby mode" */
73 /* setup and enter selected standby mode */
79 /* reset standby mode to sleep mode */
87 /* SDRAM: set auto-refresh mode */
106 1: .long 0xfe400008 /* SDCR0 */
110 5: .long 0xa4150020 /* STBCR */
111 6: .long 0xfe40001c /* RTCOR */
112 7: .long 0xfe400018 /* RTCNT */
115 /* interrupt vector @ 0x600 */
116 .balign 0x400,0,0x400
118 .balign 0x200,0,0x200
119 /* sh7722 will end up here in sleep mode */
122 sh_mobile_standby_end:
124 ENTRY(sh_mobile_standby_size)
125 .long sh_mobile_standby_end - sh_mobile_standby