1 /* SPDX-License-Identifier: GPL-2.0
3 * Migo-R sdram self/auto-refresh setup code
5 * Copyright (C) 2009 Magnus Damm
9 #include <linux/errno.h>
10 #include <linux/linkage.h>
11 #include <asm/asm-offsets.h>
12 #include <asm/suspend.h>
13 #include <asm/romimage-macros.h>
15 /* code to enter and leave self-refresh. must be self-contained.
16 * this code will be copied to on-chip memory and executed from there.
19 ENTRY(migor_sdram_enter_start)
21 /* SBSC: disable power down and put in self-refresh mode */
34 1: .long 0xfe400008 /* SDCR0 */
37 ENTRY(migor_sdram_enter_end)
40 ENTRY(migor_sdram_leave_start)
42 /* SBSC: set auto-refresh mode */
61 1: .long 0xfe400008 /* SDCR0 */
63 6: .long 0xfe40001c /* RTCOR */
64 7: .long 0xfe400018 /* RTCNT */
66 ENTRY(migor_sdram_leave_end)