1
2
3
4
5
6
7
8
9
10
11#include <linux/sys.h>
12#include <linux/errno.h>
13#include <linux/linkage.h>
14#include <asm/asm-offsets.h>
15#include <asm/suspend.h>
16#include <asm/romimage-macros.h>
17
18
19
20
21 .balign 4
22ENTRY(ms7724se_sdram_enter_start)
23
24
25
26 ED 0xFD000010, 0x00000000
27 ED 0xFD000040, 0x00000000
28 ED 0xFD000014, 0x00000002
29 ED 0xFD000014, 0x00000004
30 ED 0xFD000040, 0x00000001
31
32 rts
33 nop
34
35ENTRY(ms7724se_sdram_enter_end)
36
37 .balign 4
38ENTRY(ms7724se_sdram_leave_start)
39
40
41
42 mov.l @(SH_SLEEP_MODE, r5), r0
43 tst
44 bf resume_rstandby
45
46 ED 0xFD000040, 0x00000000
47 WAIT 1
48 ED 0xFD000014, 0x00000002
49 ED 0xFD000014, 0x00000004
50 ED 0xFD000010, 0x00000001
51 ED 0xFD000040, 0x00010000
52
53 rts
54 nop
55
56resume_rstandby:
57
58
59
60 ED 0xA4150024, 0x00004000
61
62 mov.l FRQCRA,r0
63 mov.l @r0,r3
64 mov.l KICK,r1
65 or r1, r3
66 mov.l r3, @r0
67
68 mov.l LSTATS,r0
69 mov
70WAIT_LSTATS:
71 mov.l @r0,r3
72 tst r1,r3
73 bf WAIT_LSTATS
74
75
76
77 ED 0xFD000108, 0x00000181
78 ED 0xFD000020, 0x015B0002
79 ED 0xFD000030, 0x03071502
80 ED 0xFD000034, 0x02020102
81 ED 0xFD000038, 0x01090405
82 ED 0xFD00003C, 0x00000002
83 ED 0xFD000008, 0x00000005
84 ED 0xFD000040, 0x00000001
85 ED 0xFD000040, 0x00000000
86 ED 0xFD000018, 0x00000001
87
88 mov
89WAIT_400NS:
90 dt r0
91 bf WAIT_400NS
92
93 ED 0xFD000014, 0x00000002
94 ED 0xFD000060, 0x00020000
95 ED 0xFD000060, 0x00030000
96 ED 0xFD000060, 0x00010004
97 ED 0xFD000060, 0x00000532
98 ED 0xFD000014, 0x00000002
99 ED 0xFD000014, 0x00000004
100 ED 0xFD000014, 0x00000004
101 ED 0xFD000060, 0x00000432
102 ED 0xFD000060, 0x000103c0
103 ED 0xFD000060, 0x00010040
104
105 mov
106WAIT_400NS_2:
107 dt r0
108 bf WAIT_400NS_2
109
110 ED 0xFD000010, 0x00000001
111 ED 0xFD000044, 0x0000050f
112 ED 0xFD000048, 0x236800e6
113
114 mov.l DUMMY,r0
115 mov.l @r0, r1
116
117 ED 0xFD000014, 0x00000002
118 ED 0xFD000014, 0x00000004
119 ED 0xFD000108, 0x00000080
120 ED 0xFD000040, 0x00010000
121
122 rts
123 nop
124
125 .balign 4
126DUMMY: .long 0xac400000
127FRQCRA: .long 0xa4150000
128KICK: .long 0x80000000
129LSTATS: .long 0xa4150060
130
131ENTRY(ms7724se_sdram_leave_end)
132