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