1
2
3
4
5
6
7
8
9
10
11
12#include <linux/linkage.h>
13#include <asm/assembler.h>
14#include <mach/hardware.h>
15
16#include <mach/pxa2xx-regs.h>
17
18 .text
19
20#ifdef CONFIG_PXA27x
21ENTRY(pxa_cpu_standby)
22 ldr r0, =PSSR
23 mov r1,
24 mov r2,
25 mov r3,
26 ldr ip, [r3]
27 b 1f
28
29 .align 5
301: mcr p14, 0, r2, c7, c0, 0 @ put the system into Standby
31 str r1, [r0] @ make sure PSSR_PH/STS are clear
32 mov pc, lr
33
34#endif
35
36#ifdef CONFIG_PXA3xx
37
38#define PXA3_MDCNFG 0x0000
39#define PXA3_MDCNFG_DMCEN (1 << 30)
40#define PXA3_DDR_HCAL 0x0060
41#define PXA3_DDR_HCAL_HCRNG 0x1f
42#define PXA3_DDR_HCAL_HCPROG (1 << 28)
43#define PXA3_DDR_HCAL_HCEN (1 << 31)
44#define PXA3_DMCIER 0x0070
45#define PXA3_DMCIER_EDLP (1 << 29)
46#define PXA3_DMCISR 0x0078
47#define PXA3_RCOMP 0x0100
48#define PXA3_RCOMP_SWEVAL (1 << 31)
49
50ENTRY(pm_enter_standby_start)
51 mov r1,
52 add r1, r1,
53
54
55
56
57
58
59
60
61
62 ldr r2, [r1] @ Dummy read PXA3_MDCNFG
63
64 mcr p14, 0, r0, c7, c0, 0
65 .rept 8
66 nop
67 .endr
68
69 ldr r0, [r1,
70 bic r0, r0,
71 str r0, [r1,
721: ldr r0, [r1,
73 tst r0,
74 bne 1b
75
76 ldr r0, [r1,
77 orr r0, r0,
78 str r0, [r1,
79
80 mov r0,
81 str r0, [r1,
82
83 ldr r0, [r1,
84 orr r0, r0,
85 str r0, [r1,
86
87 ldr r0, [r1,
88 bic r0, r0,
89 orr r0, r0,
90 str r0, [r1,
91
921: ldr r0, [r1,
93 tst r0,
94 beq 1b
95
96 ldr r0, [r1,
97 orr r0, r0,
98 str r0, [r1,
991: ldr r0, [r1,
100 tst r0,
101 beq 1b
102
103 ldr r0, [r1,
104 orr r0, r0,
105 str r0, [r1,
106
107 ldr r0, [r1,
108 bic r0, r0,
109 str r0, [r1,
110
111 mov pc, lr
112ENTRY(pm_enter_standby_end)
113
114#endif
115