1 /* SPDX-License-Identifier: GPL-2.0 2 * 3 * AP325RXA sdram self/auto-refresh setup code 4 * 5 * Copyright (C) 2009 Magnus Damm 6 */ 7 8 #include <linux/sys.h> 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> 14 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. 17 */ 18 .balign 4 19 ENTRY(ap325rxa_sdram_enter_start) 20 21 /* SBSC: disable power down and put in self-refresh mode */ 22 mov.l 1f, r4 23 mov.l 2f, r1 24 mov.l @r4, r2 25 or r1, r2 26 mov.l 3f, r3 27 and r3, r2 28 mov.l r2, @r4 29 30 rts 31 nop 32 33 .balign 4 34 1: .long 0xfe400008 /* SDCR0 */ 35 2: .long 0x00000400 36 3: .long 0xffff7fff 37 ENTRY(ap325rxa_sdram_enter_end) 38 39 .balign 4 40 ENTRY(ap325rxa_sdram_leave_start) 41 42 /* SBSC: set auto-refresh mode */ 43 mov.l 1f, r4 44 mov.l @r4, r0 45 mov.l 4f, r1 46 and r1, r0 47 mov.l r0, @r4 48 mov.l 6f, r4 49 mov.l 8f, r0 50 mov.l @r4, r1 51 mov #-1, r4 52 add r4, r1 53 or r1, r0 54 mov.l 7f, r1 55 mov.l r0, @r1 56 57 rts 58 nop 59 60 .balign 4 61 1: .long 0xfe400008 /* SDCR0 */ 62 4: .long 0xfffffbff 63 6: .long 0xfe40001c /* RTCOR */ 64 7: .long 0xfe400018 /* RTCNT */ 65 8: .long 0xa55a0000 66 ENTRY(ap325rxa_sdram_leave_end)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.