Blame view

arch/arm/mach-exynos/pmu.c 41.2 KB
7d44d2ba1   Jongpill Lee   ARM: EXYNOS: Add ...
1
  /*
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
2
   * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd.
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
3
4
   *		http://www.samsung.com/
   *
7d44d2ba1   Jongpill Lee   ARM: EXYNOS: Add ...
5
   * EXYNOS - CPU PMU(Power Management Unit) support
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
6
7
8
9
10
11
12
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
  
  #include <linux/io.h>
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
13
  #include <linux/of.h>
8cfc7fdd3   Pankaj Dubey   ARM: EXYNOS: move...
14
  #include <linux/of_address.h>
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
15
  #include <linux/platform_device.h>
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
16
  #include <linux/delay.h>
8cfc7fdd3   Pankaj Dubey   ARM: EXYNOS: move...
17
18
  #include <linux/notifier.h>
  #include <linux/reboot.h>
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
19

e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
20

6b7bfd829   Pankaj Dubey   ARM: EXYNOS: Move...
21
  #include "exynos-pmu.h"
65c9a8530   Kukjin Kim   ARM: EXYNOS: loca...
22
  #include "regs-pmu.h"
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
23

6b7bfd829   Pankaj Dubey   ARM: EXYNOS: Move...
24
25
26
27
  #define PMU_TABLE_END	(-1U)
  
  struct exynos_pmu_conf {
  	unsigned int offset;
b04fa9f70   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: use ...
28
  	u8 val[NUM_SYS_POWERDOWN];
6b7bfd829   Pankaj Dubey   ARM: EXYNOS: Move...
29
  };
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
30
31
32
33
34
35
  struct exynos_pmu_data {
  	const struct exynos_pmu_conf *pmu_config;
  	const struct exynos_pmu_conf *pmu_config_extra;
  
  	void (*pmu_init)(void);
  	void (*powerdown_conf)(enum sys_powerdown);
8fcc774fc   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: add ...
36
  	void (*powerdown_conf_extra)(enum sys_powerdown);
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
37
38
39
40
41
42
  };
  
  struct exynos_pmu_context {
  	struct device *dev;
  	const struct exynos_pmu_data *pmu_data;
  };
6b7bfd829   Pankaj Dubey   ARM: EXYNOS: Move...
43
  static void __iomem *pmu_base_addr;
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
44
  static struct exynos_pmu_context *pmu_context;
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
45

6b7bfd829   Pankaj Dubey   ARM: EXYNOS: Move...
46
47
48
49
50
51
52
53
54
  static inline void pmu_raw_writel(u32 val, u32 offset)
  {
  	writel_relaxed(val, pmu_base_addr + offset);
  }
  
  static inline u32 pmu_raw_readl(u32 offset)
  {
  	return readl_relaxed(pmu_base_addr + offset);
  }
8fcc774fc   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: add ...
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
  static struct exynos_pmu_conf exynos3250_pmu_config[] = {
  	/* { .offset = offset, .val = { AFTR, W-AFTR, SLEEP } */
  	{ EXYNOS3_ARM_CORE0_SYS_PWR_REG,		{ 0x0, 0x0, 0x2} },
  	{ EXYNOS3_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_RE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} },
  	{ EXYNOS3_CMU_RESET_G3D_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS3_CMU_RESET_LCD0_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS3_CMU_RESET_ISP_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS3_CMU_RESET_MAUDIO_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS3_TOP_BUS_SYS_PWR_REG,			{ 0x3, 0x0, 0x0} },
  	{ EXYNOS3_TOP_RETENTION_SYS_PWR_REG,		{ 0x1, 0x1, 0x1} },
  	{ EXYNOS3_TOP_PWR_SYS_PWR_REG,			{ 0x3, 0x3, 0x3} },
  	{ EXYNOS3_TOP_BUS_COREBLK_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS3_TOP_RETENTION_COREBLK_SYS_PWR_REG,	{ 0x1, 0x1, 0x1} },
  	{ EXYNOS3_TOP_PWR_COREBLK_SYS_PWR_REG,		{ 0x3, 0x3, 0x3} },
  	{ EXYNOS3_LOGIC_RESET_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_OSCCLK_GATE_SYS_PWR_REG,		{ 0x1, 0x1, 0x1} },
  	{ EXYNOS3_LOGIC_RESET_COREBLK_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_OSCCLK_GATE_COREBLK_SYS_PWR_REG,	{ 0x1, 0x0, 0x1} },
  	{ EXYNOS3_PAD_RETENTION_DRAM_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_MAUDIO_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_GPIO_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_UART_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_MMC0_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_MMC1_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_MMC2_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_SPI_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_EBIA_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_EBIB_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_RETENTION_JTAG_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_ISOLATION_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_PAD_ALV_SEL_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_XUSBXTI_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_XXTI_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_EXT_REGULATOR_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_EXT_REGULATOR_COREBLK_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_GPIO_MODE_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_GPIO_MODE_MAUDIO_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_TOP_ASB_RESET_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_TOP_ASB_ISOLATION_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_TOP_ASB_RESET_COREBLK_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS3_TOP_ASB_ISOLATION_COREBLK_SYS_PWR_REG, { 0x1, 0x1, 0x0} },
  	{ EXYNOS3_CAM_SYS_PWR_REG,			{ 0x7, 0x0, 0x0} },
  	{ EXYNOS3_MFC_SYS_PWR_REG,			{ 0x7, 0x0, 0x0} },
  	{ EXYNOS3_G3D_SYS_PWR_REG,			{ 0x7, 0x0, 0x0} },
  	{ EXYNOS3_LCD0_SYS_PWR_REG,			{ 0x7, 0x0, 0x0} },
  	{ EXYNOS3_ISP_SYS_PWR_REG,			{ 0x7, 0x0, 0x0} },
  	{ EXYNOS3_MAUDIO_SYS_PWR_REG,			{ 0x7, 0x0, 0x0} },
  	{ EXYNOS3_CMU_SYSCLK_ISP_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ PMU_TABLE_END,},
  };
53302222d   Daniel Kurtz   ARM: EXYNOS: Cons...
140
  static const struct exynos_pmu_conf exynos4210_pmu_config[] = {
2e94ac428   Pankaj Dubey   ARM: EXYNOS: Refa...
141
  	/* { .offset = offset, .val = { AFTR, LPA, SLEEP } */
0dba4dc4d   Jongpill Lee   ARM: EXYNOS4: Mod...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
  	{ S5P_ARM_CORE0_LOWPWR,			{ 0x0, 0x0, 0x2 } },
  	{ S5P_DIS_IRQ_CORE0,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_CENTRAL0,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_ARM_CORE1_LOWPWR,			{ 0x0, 0x0, 0x2 } },
  	{ S5P_DIS_IRQ_CORE1,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_CENTRAL1,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_ARM_COMMON_LOWPWR,		{ 0x0, 0x0, 0x2 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 0x1, 0x1, 0x0 } },
  	{ S5P_CMU_RESET_MFC_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_CMU_RESET_G3D_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_CMU_RESET_LCD0_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_CMU_RESET_LCD1_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_CMU_RESET_MAUDIO_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_CMU_RESET_GPS_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_TOP_BUS_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_TOP_RETENTION_LOWPWR,		{ 0x1, 0x0, 0x1 } },
  	{ S5P_TOP_PWR_LOWPWR,			{ 0x3, 0x0, 0x3 } },
  	{ S5P_LOGIC_RESET_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_ONENAND_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_MODIMIF_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_G2D_ACP_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_USBOTG_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_HSMMC_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_CSSYS_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_SECSS_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_PCIE_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_SATA_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_DRAM_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_MAUDIO_LOWPWR,	{ 0x1, 0x1, 0x0 } },
  	{ S5P_PAD_RETENTION_GPIO_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_UART_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_MMCA_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_MMCB_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_EBIA_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_EBIB_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_ISOLATION_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_ALV_SEL_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_XUSBXTI_LOWPWR,			{ 0x1, 0x1, 0x0 } },
  	{ S5P_XXTI_LOWPWR,			{ 0x1, 0x1, 0x0 } },
  	{ S5P_EXT_REGULATOR_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_GPIO_MODE_LOWPWR,			{ 0x1, 0x0, 0x0 } },
  	{ S5P_GPIO_MODE_MAUDIO_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_CAM_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_TV_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_MFC_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_G3D_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_LCD0_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_LCD1_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_MAUDIO_LOWPWR,			{ 0x7, 0x7, 0x0 } },
  	{ S5P_GPS_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_GPS_ALIVE_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ PMU_TABLE_END,},
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
214
  };
53302222d   Daniel Kurtz   ARM: EXYNOS: Cons...
215
  static const struct exynos_pmu_conf exynos4x12_pmu_config[] = {
00a351f27   Jongpill Lee   ARM: EXYNOS4: Sup...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
  	{ S5P_ARM_CORE0_LOWPWR,			{ 0x0, 0x0, 0x2 } },
  	{ S5P_DIS_IRQ_CORE0,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_CENTRAL0,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_ARM_CORE1_LOWPWR,			{ 0x0, 0x0, 0x2 } },
  	{ S5P_DIS_IRQ_CORE1,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_CENTRAL1,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_ISP_ARM_LOWPWR,			{ 0x1, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR,	{ 0x0, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR,	{ 0x0, 0x0, 0x0 } },
  	{ S5P_ARM_COMMON_LOWPWR,		{ 0x0, 0x0, 0x2 } },
  	{ S5P_L2_0_LOWPWR,			{ 0x0, 0x0, 0x3 } },
  	/* XXX_OPTION register should be set other field */
  	{ S5P_ARM_L2_0_OPTION,			{ 0x10, 0x10, 0x0 } },
  	{ S5P_L2_1_LOWPWR,			{ 0x0, 0x0, 0x3 } },
  	{ S5P_ARM_L2_1_OPTION,			{ 0x10, 0x10, 0x0 } },
  	{ S5P_CMU_ACLKSTOP_LOWP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OWPWR,	{ 0x1, 0x0, 0x1 } },
  	{ S5P_ONENAND_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_ONENAND_MEM_OPTION,		{ 0x10, 0x10, 0x0 } },
  	{ S5P_HSI_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_HSI_MEM_OPTION,			{ 0x10, 0x10, 0x0 } },
  	{ S5P_G2D_ACP_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_G2D_ACP_MEM_OPTION,		{ 0x10, 0x10, 0x0 } },
  	{ S5P_USBOTG_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_USBOTG_MEM_OPTION,		{ 0x10, 0x10, 0x0 } },
  	{ S5P_HSMMC_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_HSMMC_MEM_OPTION,			{ 0x10, 0x10, 0x0 } },
  	{ S5P_CSSYS_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_CSSYS_MEM_OPTION,			{ 0x10, 0x10, 0x0 } },
  	{ S5P_SECSS_MEM_LOWPWR,			{ 0x3, 0x0, 0x0 } },
  	{ S5P_SECSS_MEM_OPTION,			{ 0x10, 0x10, 0x0 } },
  	{ S5P_ROTATOR_MEM_LOWPWR,		{ 0x3, 0x0, 0x0 } },
  	{ S5P_ROTATOR_MEM_OPTION,		{ 0x10, 0x10, 0x0 } },
  	{ S5P_PAD_RETENTION_DRAM_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_MAUDIO_LOWPWR,	{ 0x1, 0x1, 0x0 } },
  	{ S5P_PAD_RETENTION_GPIO_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_UART_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_MMCA_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_MMCB_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_EBIA_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_EBIB_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_GPIO_COREBLK_LOWPWR,{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_ISOLATION_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_ISOLATION_COREBLK_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_PAD_RETENTION_ALV_SEL_LOWPWR,	{ 0x1, 0x0, 0x0 } },
  	{ S5P_XUSBXTI_LOWPWR,			{ 0x1, 0x1, 0x0 } },
  	{ S5P_XXTI_LOWPWR,			{ 0x1, 0x1, 0x0 } },
  	{ S5P_EXT_REGULATOR_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_GPIO_MODE_LOWPWR,			{ 0x1, 0x0, 0x0 } },
  	{ S5P_GPIO_MODE_COREBLK_LOWPWR,		{ 0x1, 0x0, 0x0 } },
  	{ S5P_GPIO_MODE_MAUDIO_LOWPWR,		{ 0x1, 0x1, 0x0 } },
  	{ S5P_TOP_ASB_RESET_LOWPWR,		{ 0x1, 0x1, 0x1 } },
  	{ S5P_TOP_ASB_ISOLATION_LOWPWR,		{ 0x1, 0x0, 0x1 } },
  	{ S5P_CAM_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_TV_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_MFC_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_G3D_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_LCD0_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_ISP_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_MAUDIO_LOWPWR,			{ 0x7, 0x7, 0x0 } },
  	{ S5P_GPS_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_GPS_ALIVE_LOWPWR,			{ 0x7, 0x0, 0x0 } },
  	{ S5P_CMU_SYSCLK_ISP_LOWPWR,		{ 0x1, 0x0, 0x0 } },
  	{ S5P_CMU_SYSCLK_GPS_LOWPWR,		{ 0x1, 0x0, 0x0 } },
  	{ PMU_TABLE_END,},
  };
53302222d   Daniel Kurtz   ARM: EXYNOS: Cons...
322
  static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
5ddfa8428   Inderpal Singh   ARM: EXYNOS: Supp...
323
324
325
326
327
328
329
330
  	{ S5P_ARM_CORE2_LOWPWR,			{ 0x0, 0x0, 0x2 } },
  	{ S5P_DIS_IRQ_CORE2,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_CENTRAL2,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_ARM_CORE3_LOWPWR,			{ 0x0, 0x0, 0x2 } },
  	{ S5P_DIS_IRQ_CORE3,			{ 0x0, 0x0, 0x0 } },
  	{ S5P_DIS_IRQ_CENTRAL3,			{ 0x0, 0x0, 0x0 } },
  	{ PMU_TABLE_END,},
  };
53302222d   Daniel Kurtz   ARM: EXYNOS: Cons...
331
  static const struct exynos_pmu_conf exynos5250_pmu_config[] = {
2e94ac428   Pankaj Dubey   ARM: EXYNOS: Refa...
332
  	/* { .offset = offset, .val = { AFTR, LPA, SLEEP } */
7d44d2ba1   Jongpill Lee   ARM: EXYNOS: Add ...
333
334
335
336
337
338
339
340
341
342
343
344
345
  	{ EXYNOS5_ARM_CORE0_SYS_PWR_REG,		{ 0x0, 0x0, 0x2} },
  	{ EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_ARM_CORE1_SYS_PWR_REG,		{ 0x0, 0x0, 0x2} },
  	{ EXYNOS5_DIS_IRQ_ARM_CORE1_LOCAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_ARM_CORE1_CENTRAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_FSYS_ARM_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_FSYS_ARM_CENTRAL_SYS_PWR_REG,	{ 0x1, 0x1, 0x1} },
  	{ EXYNOS5_ISP_ARM_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_ISP_ARM_LOCAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_ISP_ARM_CENTRAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_ARM_COMMON_SYS_PWR_REG,		{ 0x0, 0x0, 0x2} },
  	{ EXYNOS5_ARM_L2_SYS_PWR_REG,			{ 0x3, 0x3, 0x3} },
088584618   Inderpal Singh   ARM: EXYNOS5: Fix...
346
  	{ EXYNOS5_ARM_L2_OPTION,			{ 0x10, 0x10, 0x0 } },
7d44d2ba1   Jongpill Lee   ARM: EXYNOS: Add ...
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  	{ EXYNOS5_CMU_ACLKSTOP_SYS_PWR_REG,		{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_CMU_SCLKSTOP_SYS_PWR_REG,		{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_CMU_RESET_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_CMU_ACLKSTOP_SYSMEM_SYS_PWR_REG,	{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_CMU_SCLKSTOP_SYSMEM_SYS_PWR_REG,	{ 0x1, 0x0, 0x1} },
  	{ EXYN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_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_OSCCLK_GATE_SYS_PWR_REG,		{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_LOGIC_RESET_SYSMEM_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_OSCCLK_GATE_SYSMEM_SYS_PWR_REG,	{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_USBOTG_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_G2D_MEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_USBDRD_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_SDMMC_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_CSSYS_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_SECSS_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_ROTATOR_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_INTRAM_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_INTROM_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_JPEG_MEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x0} },
32ed35ff2   Vikas Sajjan   ARM: EXYNOS: Move...
384
  	{ EXYNOS5_JPEG_MEM_OPTION,			{ 0x10, 0x10, 0x0} },
7d44d2ba1   Jongpill Lee   ARM: EXYNOS: Add ...
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
  	{ EXYNOS5_HSI_MEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_MCUIOP_MEM_SYS_PWR_REG,		{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_SATA_MEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_DRAM_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_MAU_SYS_PWR_REG,	{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_GPIO_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_UART_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_MMCA_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_MMCB_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_EBIA_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_EBIB_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_SPI_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_GPIO_SYSMEM_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_ISOLATION_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_ISOLATION_SYSMEM_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_ALV_SEL_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_XUSBXTI_SYS_PWR_REG,			{ 0x1, 0x1, 0x1} },
  	{ EXYNOS5_XXTI_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_EXT_REGULATOR_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_GPIO_MODE_SYS_PWR_REG,		{ 0x1, 0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S_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SYSCLK_G3D_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SYSCLK_DISP1_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SYSCLK_MAU_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_CMU_RESET_GSCL_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_ISP_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_MFC_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_G3D_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_DISP1_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_MAU_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ PMU_TABLE_END,},
  };
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
  static struct exynos_pmu_conf exynos5420_pmu_config[] = {
  	/* { .offset = offset, .val = { AFTR, LPA, SLEEP } */
  	{ EXYNOS5_ARM_CORE0_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_ARM_CORE0_L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PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_KFC_CORE2_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_DIS_IRQ_KFC_CORE2_LOCAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_DIS_IRQ_KFC_CORE2_CENTRAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_KFC_CORE3_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_DIS_IRQ_KFC_CORE3_LOCAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_DIS_IRQ_KFC_CORE3_CENTRAL_SYS_PWR_REG,	{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_ISP_ARM_SYS_PWR_REG,				{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_ISP_ARM_LOCAL_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_DIS_IRQ_ISP_ARM_CENTRAL_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_ARM_COMMON_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_KFC_COMMON_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_ARM_L2_SYS_PWR_REG,				{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_KFC_L2_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_ACLKSTOP_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SCLKSTOP_SYS_PWR_REG,			{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_CMU_RESET_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_CMU_ACLKSTOP_SYSMEM_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SCLKSTOP_SYSMEM_SYS_PWR_REG,		{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_CMU_RESET_SYSMEM_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_DRAM_FREQ_DOWN_SYS_PWR_REG,			{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_DDRPHY_DLLOFF_SYS_PWR_REG,			{ 0x1, 0x1, 0x1} },
  	{ EXYNOS5_DDRPHY_DLLLOCK_SYS_PWR_REG,			{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_APLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_MPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_VPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_EPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_BPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_CPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_DPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_IPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_KPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_MPLLUSER_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_BPLLUSER_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_RPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_SPLL_SYSCLK_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_TOP_BUS_SYS_PWR_REG,				{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_TOP_RETENTION_SYS_PWR_REG,			{ 0x1, 0x1, 0x1} },
  	{ EXYNOS5_TOP_PWR_SYS_PWR_REG,				{ 0x3, 0x3, 0x0} },
  	{ EXYNOS5_TOP_BUS_SYSMEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_TOP_RETENTION_SYSMEM_SYS_PWR_REG,		{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_TOP_PWR_SYSMEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x0} },
  	{ EXYNOS5_LOGIC_RESET_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_OSCCLK_GATE_SYS_PWR_REG,			{ 0x1, 0x0, 0x1} },
  	{ EXYNOS5_LOGIC_RESET_SYSMEM_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_OSCCLK_GATE_SYSMEM_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_INTRAM_MEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x3} },
  	{ EXYNOS5420_INTROM_MEM_SYS_PWR_REG,			{ 0x3, 0x0, 0x3} },
  	{ EXYNOS5_PAD_RETENTION_DRAM_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_RETENTION_MAU_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_JTAG_SYS_PWR_REG,		{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_DRAM_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_UART_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_MMC0_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_MMC1_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_MMC2_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_HSI_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_EBIA_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_EBIB_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_SPI_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5420_PAD_RETENTION_DRAM_COREBLK_SYS_PWR_REG,	{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_ISOLATION_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_PAD_ISOLATION_SYSMEM_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_PAD_ALV_SEL_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_XUSBXTI_SYS_PWR_REG,				{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_XXTI_SYS_PWR_REG,				{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_EXT_REGULATOR_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_GPIO_MODE_SYS_PWR_REG,			{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_GPIO_MODE_SYSMEM_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_GPIO_MODE_MAU_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_TOP_ASB_RESET_SYS_PWR_REG,			{ 0x1, 0x1, 0x0} },
  	{ EXYNOS5_TOP_ASB_ISOLATION_SYS_PWR_REG,		{ 0x1, 0x0, 0x0} },
  	{ EXYNOS5_GSCL_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5_ISP_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5_MFC_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5_G3D_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_DISP1_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_MAU_SYS_PWR_REG,				{ 0x7, 0x7, 0x0} },
  	{ EXYNOS5420_G2D_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_MSC_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_FSYS_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_FSYS2_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_PSGEN_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_PERIC_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5420_WCORE_SYS_PWR_REG,				{ 0x7, 0x0, 0x0} },
  	{ EXYNOS5_CMU_CLKSTOP_GSCL_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_CLKSTOP_ISP_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_CLKSTOP_MFC_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_CLKSTOP_G3D_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_DISP1_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_MAU_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_G2D_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_MSC_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_FSYS_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_PSGEN_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_PERIC_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_CLKSTOP_WCORE_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SYSCLK_GSCL_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SYSCLK_ISP_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SYSCLK_MFC_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_SYSCLK_G3D_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_DISP1_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_MAU_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_G2D_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_MSC_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_FSYS_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_FSYS2_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_PSGEN_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_PERIC_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_SYSCLK_WCORE_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_FSYS2_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_PSGEN_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_PERIC_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_WCORE_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_GSCL_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_ISP_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_MFC_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5_CMU_RESET_G3D_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_DISP1_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_MAU_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_G2D_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_MSC_SYS_PWR_REG,			{ 0x0, 0x0, 0x0} },
  	{ EXYNOS5420_CMU_RESET_FSYS_SYS_PWR_REG,		{ 0x0, 0x0, 0x0} },
  	{ PMU_TABLE_END,},
  };
8fcc774fc   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: add ...
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
  static unsigned int const exynos3250_list_feed[] = {
  	EXYNOS3_ARM_CORE_OPTION(0),
  	EXYNOS3_ARM_CORE_OPTION(1),
  	EXYNOS3_ARM_CORE_OPTION(2),
  	EXYNOS3_ARM_CORE_OPTION(3),
  	EXYNOS3_ARM_COMMON_OPTION,
  	EXYNOS3_TOP_PWR_OPTION,
  	EXYNOS3_CORE_TOP_PWR_OPTION,
  	S5P_CAM_OPTION,
  	S5P_MFC_OPTION,
  	S5P_G3D_OPTION,
  	S5P_LCD0_OPTION,
  	S5P_ISP_OPTION,
  };
  
  static void exynos3250_powerdown_conf_extra(enum sys_powerdown mode)
  {
  	unsigned int i;
  	unsigned int tmp;
  
  	/* Enable only SC_FEEDBACK */
  	for (i = 0; i < ARRAY_SIZE(exynos3250_list_feed); i++) {
  		tmp = pmu_raw_readl(exynos3250_list_feed[i]);
  		tmp &= ~(EXYNOS3_OPTION_USE_SC_COUNTER);
  		tmp |= EXYNOS3_OPTION_USE_SC_FEEDBACK;
  		pmu_raw_writel(tmp, exynos3250_list_feed[i]);
  	}
  
  	if (mode != SYS_SLEEP)
  		return;
  
  	pmu_raw_writel(XUSBXTI_DURATION, EXYNOS3_XUSBXTI_DURATION);
  	pmu_raw_writel(XXTI_DURATION, EXYNOS3_XXTI_DURATION);
  	pmu_raw_writel(EXT_REGULATOR_DURATION, EXYNOS3_EXT_REGULATOR_DURATION);
  	pmu_raw_writel(EXT_REGULATOR_COREBLK_DURATION,
  		       EXYNOS3_EXT_REGULATOR_COREBLK_DURATION);
  }
2e94ac428   Pankaj Dubey   ARM: EXYNOS: Refa...
616
  static unsigned int const exynos5_list_both_cnt_feed[] = {
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
617
618
619
620
621
622
623
624
625
626
627
628
  	EXYNOS5_ARM_CORE0_OPTION,
  	EXYNOS5_ARM_CORE1_OPTION,
  	EXYNOS5_ARM_COMMON_OPTION,
  	EXYNOS5_GSCL_OPTION,
  	EXYNOS5_ISP_OPTION,
  	EXYNOS5_MFC_OPTION,
  	EXYNOS5_G3D_OPTION,
  	EXYNOS5_DISP1_OPTION,
  	EXYNOS5_MAU_OPTION,
  	EXYNOS5_TOP_PWR_OPTION,
  	EXYNOS5_TOP_PWR_SYSMEM_OPTION,
  };
d4c6c6cf8   Pankaj Dubey   ARM: EXYNOS: fix ...
629
  static unsigned int const exynos5_list_disable_wfi_wfe[] = {
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
630
631
632
633
  	EXYNOS5_ARM_CORE1_OPTION,
  	EXYNOS5_FSYS_ARM_OPTION,
  	EXYNOS5_ISP_ARM_OPTION,
  };
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
  static unsigned int const exynos5420_list_disable_pmu_reg[] = {
  	EXYNOS5_CMU_CLKSTOP_GSCL_SYS_PWR_REG,
  	EXYNOS5_CMU_CLKSTOP_ISP_SYS_PWR_REG,
  	EXYNOS5_CMU_CLKSTOP_G3D_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_DISP1_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_MAU_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_G2D_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_MSC_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_FSYS_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_PSGEN_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_PERIC_SYS_PWR_REG,
  	EXYNOS5420_CMU_CLKSTOP_WCORE_SYS_PWR_REG,
  	EXYNOS5_CMU_SYSCLK_GSCL_SYS_PWR_REG,
  	EXYNOS5_CMU_SYSCLK_ISP_SYS_PWR_REG,
  	EXYNOS5_CMU_SYSCLK_G3D_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_DISP1_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_MAU_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_G2D_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_MSC_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_FSYS_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_FSYS2_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_PSGEN_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_PERIC_SYS_PWR_REG,
  	EXYNOS5420_CMU_SYSCLK_WCORE_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_FSYS2_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_PSGEN_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_PERIC_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_WCORE_SYS_PWR_REG,
  	EXYNOS5_CMU_RESET_GSCL_SYS_PWR_REG,
  	EXYNOS5_CMU_RESET_ISP_SYS_PWR_REG,
  	EXYNOS5_CMU_RESET_G3D_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_DISP1_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_MAU_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_G2D_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_MSC_SYS_PWR_REG,
  	EXYNOS5420_CMU_RESET_FSYS_SYS_PWR_REG,
  };
c4241a582   Marek Szyprowski   ARM: EXYNOS: use ...
671
  static void exynos_power_off(void)
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
  {
  	unsigned int tmp;
  
  	pr_info("Power down.
  ");
  	tmp = pmu_raw_readl(EXYNOS_PS_HOLD_CONTROL);
  	tmp ^= (1 << 8);
  	pmu_raw_writel(tmp, EXYNOS_PS_HOLD_CONTROL);
  
  	/* Wait a little so we don't give a false warning below */
  	mdelay(100);
  
  	pr_err("Power down failed, please power off system manually.
  ");
  	while (1)
  		;
  }
b69bef97d   Krzysztof Kozlowski   ARM: EXYNOS: Make...
689
  static void exynos5420_powerdown_conf(enum sys_powerdown mode)
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
690
691
692
693
694
695
696
697
698
699
700
  {
  	u32 this_cluster;
  
  	this_cluster = MPIDR_AFFINITY_LEVEL(read_cpuid_mpidr(), 1);
  
  	/*
  	 * set the cluster id to IROM register to ensure that we wake
  	 * up with the current cluster.
  	 */
  	pmu_raw_writel(this_cluster, EXYNOS_IROM_DATA2);
  }
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
701
  static void exynos5_powerdown_conf(enum sys_powerdown mode)
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
702
703
704
705
706
707
708
  {
  	unsigned int i;
  	unsigned int tmp;
  
  	/*
  	 * Enable both SC_FEEDBACK and SC_COUNTER
  	 */
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
709
  	for (i = 0; i < ARRAY_SIZE(exynos5_list_both_cnt_feed); i++) {
2e94ac428   Pankaj Dubey   ARM: EXYNOS: Refa...
710
  		tmp = pmu_raw_readl(exynos5_list_both_cnt_feed[i]);
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
711
712
  		tmp |= (EXYNOS5_USE_SC_FEEDBACK |
  			EXYNOS5_USE_SC_COUNTER);
2e94ac428   Pankaj Dubey   ARM: EXYNOS: Refa...
713
  		pmu_raw_writel(tmp, exynos5_list_both_cnt_feed[i]);
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
714
715
716
717
  	}
  
  	/*
  	 * SKIP_DEACTIVATE_ACEACP_IN_PWDN_BITFIELD Enable
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
718
  	 */
2e94ac428   Pankaj Dubey   ARM: EXYNOS: Refa...
719
  	tmp = pmu_raw_readl(EXYNOS5_ARM_COMMON_OPTION);
088584618   Inderpal Singh   ARM: EXYNOS5: Fix...
720
  	tmp |= EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN;
2e94ac428   Pankaj Dubey   ARM: EXYNOS: Refa...
721
  	pmu_raw_writel(tmp, EXYNOS5_ARM_COMMON_OPTION);
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
722
723
724
725
  
  	/*
  	 * Disable WFI/WFE on XXX_OPTION
  	 */
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
726
  	for (i = 0; i < ARRAY_SIZE(exynos5_list_disable_wfi_wfe); i++) {
d4c6c6cf8   Pankaj Dubey   ARM: EXYNOS: fix ...
727
  		tmp = pmu_raw_readl(exynos5_list_disable_wfi_wfe[i]);
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
728
729
  		tmp &= ~(EXYNOS5_OPTION_USE_STANDBYWFE |
  			 EXYNOS5_OPTION_USE_STANDBYWFI);
d4c6c6cf8   Pankaj Dubey   ARM: EXYNOS: fix ...
730
  		pmu_raw_writel(tmp, exynos5_list_disable_wfi_wfe[i]);
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
731
732
  	}
  }
7d44d2ba1   Jongpill Lee   ARM: EXYNOS: Add ...
733
  void exynos_sys_powerdown_conf(enum sys_powerdown mode)
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
734
  {
0dba4dc4d   Jongpill Lee   ARM: EXYNOS4: Mod...
735
  	unsigned int i;
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
736
  	const struct exynos_pmu_data *pmu_data = pmu_context->pmu_data;
60e49ca65   Jongpill Lee   ARM: EXYNOS: Supp...
737

14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
738
739
  	if (pmu_data->powerdown_conf)
  		pmu_data->powerdown_conf(mode);
5ddfa8428   Inderpal Singh   ARM: EXYNOS: Supp...
740

14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
741
742
743
744
745
  	if (pmu_data->pmu_config) {
  		for (i = 0; (pmu_data->pmu_config[i].offset != PMU_TABLE_END); i++)
  			pmu_raw_writel(pmu_data->pmu_config[i].val[mode],
  					pmu_data->pmu_config[i].offset);
  	}
8fcc774fc   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: add ...
746
747
  	if (pmu_data->powerdown_conf_extra)
  		pmu_data->powerdown_conf_extra(mode);
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
748
749
750
751
  	if (pmu_data->pmu_config_extra) {
  		for (i = 0; pmu_data->pmu_config_extra[i].offset != PMU_TABLE_END; i++)
  			pmu_raw_writel(pmu_data->pmu_config_extra[i].val[mode],
  					pmu_data->pmu_config_extra[i].offset);
5ddfa8428   Inderpal Singh   ARM: EXYNOS: Supp...
752
  	}
0dba4dc4d   Jongpill Lee   ARM: EXYNOS4: Mod...
753
  }
8fcc774fc   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: add ...
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
  static void exynos3250_pmu_init(void)
  {
  	unsigned int value;
  
  	/*
  	 * To prevent from issuing new bus request form L2 memory system
  	 * If core status is power down, should be set '1' to L2 power down
  	 */
  	value = pmu_raw_readl(EXYNOS3_ARM_COMMON_OPTION);
  	value |= EXYNOS3_OPTION_SKIP_DEACTIVATE_ACEACP_IN_PWDN;
  	pmu_raw_writel(value, EXYNOS3_ARM_COMMON_OPTION);
  
  	/* Enable USE_STANDBY_WFI for all CORE */
  	pmu_raw_writel(S5P_USE_STANDBY_WFI_ALL, S5P_CENTRAL_SEQ_OPTION);
  
  	/*
  	 * Set PSHOLD port for output high
  	 */
  	value = pmu_raw_readl(S5P_PS_HOLD_CONTROL);
  	value |= S5P_PS_HOLD_OUTPUT_HIGH;
  	pmu_raw_writel(value, S5P_PS_HOLD_CONTROL);
  
  	/*
  	 * Enable signal for PSHOLD port
  	 */
  	value = pmu_raw_readl(S5P_PS_HOLD_CONTROL);
  	value |= S5P_PS_HOLD_EN;
  	pmu_raw_writel(value, S5P_PS_HOLD_CONTROL);
  }
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
783
  static void exynos5250_pmu_init(void)
0dba4dc4d   Jongpill Lee   ARM: EXYNOS4: Mod...
784
  {
7d896aace   Jonghwan Choi   ARM: EXYNOS: Clea...
785
  	unsigned int value;
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
786
787
788
789
790
791
792
793
794
795
796
797
  	/*
  	 * When SYS_WDTRESET is set, watchdog timer reset request
  	 * is ignored by power management unit.
  	 */
  	value = pmu_raw_readl(EXYNOS5_AUTO_WDTRESET_DISABLE);
  	value &= ~EXYNOS5_SYS_WDTRESET;
  	pmu_raw_writel(value, EXYNOS5_AUTO_WDTRESET_DISABLE);
  
  	value = pmu_raw_readl(EXYNOS5_MASK_WDTRESET_REQUEST);
  	value &= ~EXYNOS5_SYS_WDTRESET;
  	pmu_raw_writel(value, EXYNOS5_MASK_WDTRESET_REQUEST);
  }
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
  static void exynos5420_pmu_init(void)
  {
  	unsigned int value;
  	int i;
  
  	/*
  	 * Set the CMU_RESET, CMU_SYSCLK and CMU_CLKSTOP registers
  	 * for local power blocks to Low initially as per Table 8-4:
  	 * "System-Level Power-Down Configuration Registers".
  	 */
  	for (i = 0; i < ARRAY_SIZE(exynos5420_list_disable_pmu_reg); i++)
  		pmu_raw_writel(0, exynos5420_list_disable_pmu_reg[i]);
  
  	/* Enable USE_STANDBY_WFI for all CORE */
  	pmu_raw_writel(EXYNOS5420_USE_STANDBY_WFI_ALL, S5P_CENTRAL_SEQ_OPTION);
  
  	value  = pmu_raw_readl(EXYNOS_L2_OPTION(0));
  	value &= ~EXYNOS5_USE_RETENTION;
  	pmu_raw_writel(value, EXYNOS_L2_OPTION(0));
  
  	value = pmu_raw_readl(EXYNOS_L2_OPTION(1));
  	value &= ~EXYNOS5_USE_RETENTION;
  	pmu_raw_writel(value, EXYNOS_L2_OPTION(1));
  
  	/*
  	 * If L2_COMMON is turned off, clocks related to ATB async
  	 * bridge are gated. Thus, when ISP power is gated, LPI
  	 * may get stuck.
  	 */
  	value = pmu_raw_readl(EXYNOS5420_LPI_MASK);
  	value |= EXYNOS5420_ATB_ISP_ARM;
  	pmu_raw_writel(value, EXYNOS5420_LPI_MASK);
  
  	value  = pmu_raw_readl(EXYNOS5420_LPI_MASK1);
  	value |= EXYNOS5420_ATB_KFC;
  	pmu_raw_writel(value, EXYNOS5420_LPI_MASK1);
  
  	/* Prevent issue of new bus request from L2 memory */
  	value = pmu_raw_readl(EXYNOS5420_ARM_COMMON_OPTION);
  	value |= EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN;
  	pmu_raw_writel(value, EXYNOS5420_ARM_COMMON_OPTION);
  
  	value = pmu_raw_readl(EXYNOS5420_KFC_COMMON_OPTION);
  	value |= EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN;
  	pmu_raw_writel(value, EXYNOS5420_KFC_COMMON_OPTION);
  
  	/* This setting is to reduce suspend/resume time */
  	pmu_raw_writel(DUR_WAIT_RESET, EXYNOS5420_LOGIC_RESET_DURATION3);
  
  	/* Serialized CPU wakeup of Eagle */
  	pmu_raw_writel(SPREAD_ENABLE, EXYNOS5420_ARM_INTR_SPREAD_ENABLE);
  
  	pmu_raw_writel(SPREAD_USE_STANDWFI,
  			EXYNOS5420_ARM_INTR_SPREAD_USE_STANDBYWFI);
  
  	pmu_raw_writel(0x1, EXYNOS5420_UP_SCHEDULER);
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
854
855
856
  	pr_info("EXYNOS5420 PMU initialized
  ");
  }
8cfc7fdd3   Pankaj Dubey   ARM: EXYNOS: move...
857
858
859
860
861
862
863
  static int pmu_restart_notify(struct notifier_block *this,
  		unsigned long code, void *unused)
  {
  	pmu_raw_writel(0x1, EXYNOS_SWRESET);
  
  	return NOTIFY_DONE;
  }
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
864

8fcc774fc   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: add ...
865
866
867
868
869
  static const struct exynos_pmu_data exynos3250_pmu_data = {
  	.pmu_config	= exynos3250_pmu_config,
  	.pmu_init	= exynos3250_pmu_init,
  	.powerdown_conf_extra	= exynos3250_powerdown_conf_extra,
  };
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
  static const struct exynos_pmu_data exynos4210_pmu_data = {
  	.pmu_config	= exynos4210_pmu_config,
  };
  
  static const struct exynos_pmu_data exynos4212_pmu_data = {
  	.pmu_config	= exynos4x12_pmu_config,
  };
  
  static const struct exynos_pmu_data exynos4412_pmu_data = {
  	.pmu_config		= exynos4x12_pmu_config,
  	.pmu_config_extra	= exynos4412_pmu_config,
  };
  
  static const struct exynos_pmu_data exynos5250_pmu_data = {
  	.pmu_config	= exynos5250_pmu_config,
  	.pmu_init	= exynos5250_pmu_init,
  	.powerdown_conf	= exynos5_powerdown_conf,
  };
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
888
889
890
891
892
  static struct exynos_pmu_data exynos5420_pmu_data = {
  	.pmu_config	= exynos5420_pmu_config,
  	.pmu_init	= exynos5420_pmu_init,
  	.powerdown_conf	= exynos5420_powerdown_conf,
  };
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
893
894
895
896
897
  /*
   * PMU platform driver and devicetree bindings.
   */
  static const struct of_device_id exynos_pmu_of_device_ids[] = {
  	{
8fcc774fc   Bartlomiej Zolnierkiewicz   ARM: EXYNOS: add ...
898
899
900
  		.compatible = "samsung,exynos3250-pmu",
  		.data = &exynos3250_pmu_data,
  	}, {
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
901
902
903
904
905
906
907
908
909
910
911
  		.compatible = "samsung,exynos4210-pmu",
  		.data = &exynos4210_pmu_data,
  	}, {
  		.compatible = "samsung,exynos4212-pmu",
  		.data = &exynos4212_pmu_data,
  	}, {
  		.compatible = "samsung,exynos4412-pmu",
  		.data = &exynos4412_pmu_data,
  	}, {
  		.compatible = "samsung,exynos5250-pmu",
  		.data = &exynos5250_pmu_data,
af2e0a075   Abhilash Kesavan   ARM: EXYNOS: Add ...
912
913
914
  	}, {
  		.compatible = "samsung,exynos5420-pmu",
  		.data = &exynos5420_pmu_data,
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
915
916
917
  	},
  	{ /*sentinel*/ },
  };
7d896aace   Jonghwan Choi   ARM: EXYNOS: Clea...
918

8cfc7fdd3   Pankaj Dubey   ARM: EXYNOS: move...
919
920
921
922
923
924
925
  /*
   * Exynos PMU restart notifier, handles restart functionality
   */
  static struct notifier_block pmu_restart_handler = {
  	.notifier_call = pmu_restart_notify,
  	.priority = 128,
  };
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
926
927
928
929
930
  static int exynos_pmu_probe(struct platform_device *pdev)
  {
  	const struct of_device_id *match;
  	struct device *dev = &pdev->dev;
  	struct resource *res;
8cfc7fdd3   Pankaj Dubey   ARM: EXYNOS: move...
931
  	int ret;
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
932
933
934
935
936
937
938
939
940
941
942
943
944
  
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  	pmu_base_addr = devm_ioremap_resource(dev, res);
  	if (IS_ERR(pmu_base_addr))
  		return PTR_ERR(pmu_base_addr);
  
  	pmu_context = devm_kzalloc(&pdev->dev,
  			sizeof(struct exynos_pmu_context),
  			GFP_KERNEL);
  	if (!pmu_context) {
  		dev_err(dev, "Cannot allocate memory.
  ");
  		return -ENOMEM;
00a351f27   Jongpill Lee   ARM: EXYNOS4: Sup...
945
  	}
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
946
947
948
949
950
  	pmu_context->dev = dev;
  
  	match = of_match_node(exynos_pmu_of_device_ids, dev->of_node);
  
  	pmu_context->pmu_data = match->data;
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
951

14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
952
953
954
955
  	if (pmu_context->pmu_data->pmu_init)
  		pmu_context->pmu_data->pmu_init();
  
  	platform_set_drvdata(pdev, pmu_context);
8cfc7fdd3   Pankaj Dubey   ARM: EXYNOS: move...
956
957
958
959
  	ret = register_restart_handler(&pmu_restart_handler);
  	if (ret)
  		dev_warn(dev, "can't register restart handler err=%d
  ", ret);
c4241a582   Marek Szyprowski   ARM: EXYNOS: use ...
960
  	pm_power_off = exynos_power_off;
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
961
962
  	dev_dbg(dev, "Exynos PMU Driver probe done
  ");
0dba4dc4d   Jongpill Lee   ARM: EXYNOS4: Mod...
963
  	return 0;
e28e30147   Jaecheol Lee   ARM: EXYNOS4: Sup...
964
  }
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
965
966
967
968
  
  static struct platform_driver exynos_pmu_driver = {
  	.driver  = {
  		.name   = "exynos-pmu",
14fc8b93d   Pankaj Dubey   ARM: EXYNOS: Add ...
969
970
971
972
973
974
975
976
977
978
979
  		.of_match_table = exynos_pmu_of_device_ids,
  	},
  	.probe = exynos_pmu_probe,
  };
  
  static int __init exynos_pmu_init(void)
  {
  	return platform_driver_register(&exynos_pmu_driver);
  
  }
  postcore_initcall(exynos_pmu_init);