Blame view

arch/arm/mach-omap2/omap_hwmod_33xx_data.c 84 KB
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  /*
   * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
   *
   * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
   *
   * This file is automatically generated from the AM33XX hardware databases.
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License as
   * published by the Free Software Foundation version 2.
   *
   * This program is distributed "as is" WITHOUT ANY WARRANTY of any
   * kind, whether express or implied; without even the implied warranty
   * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   * GNU General Public License for more details.
   */
3a8761c02   Tony Lindgren   ARM: OMAP: Split ...
16
  #include <linux/i2c-omap.h>
2a296c8f8   Tony Lindgren   ARM: OMAP: Make p...
17
  #include "omap_hwmod.h"
11964f53e   Tony Lindgren   Merge tag 'omap-d...
18
  #include <linux/platform_data/gpio-omap.h>
aa817b2e6   Kevin Hilman   ARM: OMAP: AM33xx...
19
  #include <linux/platform_data/spi-omap2-mcspi.h>
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
20
21
22
23
24
25
26
  
  #include "omap_hwmod_common_data.h"
  
  #include "control.h"
  #include "cm33xx.h"
  #include "prm33xx.h"
  #include "prm-regbits-33xx.h"
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
27
  #include "prcm43xx.h"
3a8761c02   Tony Lindgren   ARM: OMAP: Split ...
28
  #include "i2c.h"
68f39e74f   Tony Lindgren   ARM: OMAP: Split ...
29
  #include "mmc.h"
05cf03b6e   Vaibhav Hiremath   ARM: OMAP2+: AM33...
30
  #include "wd_timer.h"
bfa2fc658   Afzal Mohammed   ARM: OMAP2+: hwmo...
31
  #include "soc.h"
001e80c47   Sourav Poddar   arm: hwmod: am437...
32
  #include "hdq1w.h"
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
33

a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
34
35
36
37
38
  /*
   * IP blocks
   */
  
  /*
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
39
40
41
42
43
44
45
46
47
48
49
   * 'emif' class
   * instance(s): emif
   */
  static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = {
  	.rev_offs	= 0x0000,
  };
  
  static struct omap_hwmod_class am33xx_emif_hwmod_class = {
  	.name		= "emif",
  	.sysc		= &am33xx_emif_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
50
51
52
53
54
  /* emif */
  static struct omap_hwmod am33xx_emif_hwmod = {
  	.name		= "emif",
  	.class		= &am33xx_emif_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
55
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  	.main_clk	= "dpll_ddr_m2_div2_ck",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'l3' class
   * instance(s): l3_main, l3_s, l3_instr
   */
  static struct omap_hwmod_class am33xx_l3_hwmod_class = {
  	.name		= "l3",
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
72
73
74
75
  static struct omap_hwmod am33xx_l3_main_hwmod = {
  	.name		= "l3_main",
  	.class		= &am33xx_l3_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
76
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
77
78
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* l3_s */
  static struct omap_hwmod am33xx_l3_s_hwmod = {
  	.name		= "l3_s",
  	.class		= &am33xx_l3_hwmod_class,
  	.clkdm_name	= "l3s_clkdm",
  };
  
  /* l3_instr */
  static struct omap_hwmod am33xx_l3_instr_hwmod = {
  	.name		= "l3_instr",
  	.class		= &am33xx_l3_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
96
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
97
98
99
  	.main_clk	= "l3_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'l4' class
   * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
   */
  static struct omap_hwmod_class am33xx_l4_hwmod_class = {
  	.name		= "l4",
  };
  
  /* l4_ls */
  static struct omap_hwmod am33xx_l4_ls_hwmod = {
  	.name		= "l4_ls",
  	.class		= &am33xx_l4_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
118
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
119
120
121
  	.main_clk	= "l4ls_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
122
123
124
125
126
127
128
129
130
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* l4_hs */
  static struct omap_hwmod am33xx_l4_hs_hwmod = {
  	.name		= "l4_hs",
  	.class		= &am33xx_l4_hwmod_class,
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
131
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
132
133
134
  	.main_clk	= "l4hs_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
135
136
137
138
139
140
141
142
143
144
145
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  
  /* l4_wkup */
  static struct omap_hwmod am33xx_l4_wkup_hwmod = {
  	.name		= "l4_wkup",
  	.class		= &am33xx_l4_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
146
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
147
148
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
149
150
151
152
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
153
154
155
156
157
158
  /*
   * 'mpu' class
   */
  static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
  	.name	= "mpu",
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
159
160
161
162
  static struct omap_hwmod am33xx_mpu_hwmod = {
  	.name		= "mpu",
  	.class		= &am33xx_mpu_hwmod_class,
  	.clkdm_name	= "mpu_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
163
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
164
165
166
  	.main_clk	= "dpll_mpu_m2_ck",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'wakeup m3' class
   * Wakeup controller sub-system under wakeup domain
   */
  static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
  	.name		= "wkup_m3",
  };
  
  static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
  	{ .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
183
184
185
186
187
  /* wkup_m3  */
  static struct omap_hwmod am33xx_wkup_m3_hwmod = {
  	.name		= "wkup_m3",
  	.class		= &am33xx_wkup_m3_hwmod_class,
  	.clkdm_name	= "l4_wkup_aon_clkdm",
092bda627   Hebbar Gururaja   ARM: OMAP2+: AM33...
188
  	/* Keep hardreset asserted */
386a79632   Rajendra Nayak   ARM: OMAP2+: Let ...
189
  	.flags		= HWMOD_NO_IDLEST,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
190
191
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.rst_lines	= am33xx_wkup_m3_resets,
  	.rst_lines_cnt	= ARRAY_SIZE(am33xx_wkup_m3_resets),
  };
  
  /*
   * 'pru-icss' class
   * Programmable Real-Time Unit and Industrial Communication Subsystem
   */
  static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
  	.name	= "pruss",
  };
  
  static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
  	{ .name = "pruss", .rst_shift = 1 },
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
210
211
212
213
214
215
  /* pru-icss */
  /* Pseudo hwmod for reset control purpose only */
  static struct omap_hwmod am33xx_pruss_hwmod = {
  	.name		= "pruss",
  	.class		= &am33xx_pruss_hwmod_class,
  	.clkdm_name	= "pruss_ocp_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
216
217
218
  	.main_clk	= "pruss_ocp_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
219
220
221
222
223
224
225
226
227
228
229
230
231
232
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.rst_lines	= am33xx_pruss_resets,
  	.rst_lines_cnt	= ARRAY_SIZE(am33xx_pruss_resets),
  };
  
  /* gfx */
  /* Pseudo hwmod for reset control purpose only */
  static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
  	.name	= "gfx",
  };
  
  static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
27c7004a9   Vaibhav Hiremath   ARM: OMAP2+: AM33...
233
  	{ .name = "gfx", .rst_shift = 0, .st_shift = 0},
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
234
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
235
236
237
238
  static struct omap_hwmod am33xx_gfx_hwmod = {
  	.name		= "gfx",
  	.class		= &am33xx_gfx_hwmod_class,
  	.clkdm_name	= "gfx_l3_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
239
240
241
  	.main_clk	= "gfx_fck_div_ck",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
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
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.rst_lines	= am33xx_gfx_resets,
  	.rst_lines_cnt	= ARRAY_SIZE(am33xx_gfx_resets),
  };
  
  /*
   * 'prcm' class
   * power and reset manager (whole prcm infrastructure)
   */
  static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
  	.name	= "prcm",
  };
  
  /* prcm */
  static struct omap_hwmod am33xx_prcm_hwmod = {
  	.name		= "prcm",
  	.class		= &am33xx_prcm_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
  };
  
  /*
   * 'adc/tsc' class
   * TouchScreen Controller (Anolog-To-Digital Converter)
   */
  static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
  	.rev_offs	= 0x00,
  	.sysc_offs	= 0x10,
  	.sysc_flags	= SYSC_HAS_SIDLEMODE,
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			SIDLE_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
  	.name		= "adc_tsc",
  	.sysc		= &am33xx_adc_tsc_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
281
282
283
  static struct omap_hwmod am33xx_adc_tsc_hwmod = {
  	.name		= "adc_tsc",
  	.class		= &am33xx_adc_tsc_hwmod_class,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
284
285
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * Modules omap_hwmod structures
   *
   * The following IPs are excluded for the moment because:
   * - They do not need an explicit SW control using omap_hwmod API.
   * - They still need to be validated with the driver
   *   properly adapted to omap_hwmod / omap_device
   *
   *    - cEFUSE (doesn't fall under any ocp_if)
   *    - clkdiv32k
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
301
   *    - ocp watch point
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
   */
  #if 0
  /*
   * 'cefuse' class
   */
  static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
  	.name		= "cefuse",
  };
  
  static struct omap_hwmod am33xx_cefuse_hwmod = {
  	.name		= "cefuse",
  	.class		= &am33xx_cefuse_hwmod_class,
  	.clkdm_name	= "l4_cefuse_clkdm",
  	.main_clk	= "cefuse_fck",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'clkdiv32k' class
   */
  static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
  	.name		= "clkdiv32k",
  };
  
  static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
  	.name		= "clkdiv32k",
  	.class		= &am33xx_clkdiv32k_hwmod_class,
  	.clkdm_name	= "clk_24mhz_clkdm",
  	.main_clk	= "clkdiv32k_ick",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
  /* ocpwp */
  static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
  	.name		= "ocpwp",
  };
  
  static struct omap_hwmod am33xx_ocpwp_hwmod = {
  	.name		= "ocpwp",
  	.class		= &am33xx_ocpwp_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.main_clk	= "l4ls_gclk",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
1cb804b93   Mark A. Greer   ARM: AM33XX: hwmo...
360
  #endif
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
361
362
  
  /*
1cb804b93   Mark A. Greer   ARM: AM33XX: hwmo...
363
   * 'aes0' class
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
364
   */
1cb804b93   Mark A. Greer   ARM: AM33XX: hwmo...
365
366
367
368
369
  static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
  	.rev_offs	= 0x80,
  	.sysc_offs	= 0x84,
  	.syss_offs	= 0x88,
  	.sysc_flags	= SYSS_HAS_RESET_STATUS,
676b49ea6   Joel Fernandes   OMAP: AM33xx: hwm...
370
  	.sysc_fields	= &omap_hwmod_sysc_type4,
1cb804b93   Mark A. Greer   ARM: AM33XX: hwmo...
371
372
373
374
375
  };
  
  static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
  	.name		= "aes0",
  	.sysc		= &am33xx_aes0_sysc,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
376
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
377
  static struct omap_hwmod am33xx_aes0_hwmod = {
1cb804b93   Mark A. Greer   ARM: AM33XX: hwmo...
378
379
  	.name		= "aes",
  	.class		= &am33xx_aes0_hwmod_class,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
380
  	.clkdm_name	= "l3_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
381
382
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
383
384
385
386
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
aec94bf5b   Mark A. Greer   ARM: AM33XX: hwmo...
387
388
389
390
391
392
393
  /* sha0 HIB2 (the 'P' (public) device) */
  static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
  	.rev_offs	= 0x100,
  	.sysc_offs	= 0x110,
  	.syss_offs	= 0x114,
  	.sysc_flags	= SYSS_HAS_RESET_STATUS,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
394

a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
395
396
  static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
  	.name		= "sha0",
aec94bf5b   Mark A. Greer   ARM: AM33XX: hwmo...
397
  	.sysc		= &am33xx_sha0_sysc,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
398
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
399
  static struct omap_hwmod am33xx_sha0_hwmod = {
aec94bf5b   Mark A. Greer   ARM: AM33XX: hwmo...
400
  	.name		= "sham",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
401
402
  	.class		= &am33xx_sha0_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
403
404
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
405
406
407
408
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
ca903b6f9   Vaibhav Bedia   ARM: OMAP2+: AM33...
409
410
411
412
413
414
415
416
417
  /* ocmcram */
  static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
  	.name = "ocmcram",
  };
  
  static struct omap_hwmod am33xx_ocmcram_hwmod = {
  	.name		= "ocmcram",
  	.class		= &am33xx_ocmcram_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
418
  	.flags		= HWMOD_INIT_NO_IDLE,
ca903b6f9   Vaibhav Bedia   ARM: OMAP2+: AM33...
419
420
  	.prcm		= {
  		.omap4	= {
ca903b6f9   Vaibhav Bedia   ARM: OMAP2+: AM33...
421
422
423
424
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
1721c7023   Vaibhav Hiremath   ARM: OMAP: AM33XX...
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
  /*
   * 'debugss' class
   * debug sub system
   */
  static struct omap_hwmod_opt_clk debugss_opt_clks[] = {
  	{ .role = "dbg_sysclk", .clk = "dbg_sysclk_ck" },
  	{ .role = "dbg_clka", .clk = "dbg_clka_ck" },
  };
  
  static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
  	.name		= "debugss",
  };
  
  static struct omap_hwmod am33xx_debugss_hwmod = {
  	.name		= "debugss",
  	.class		= &am33xx_debugss_hwmod_class,
  	.clkdm_name	= "l3_aon_clkdm",
  	.main_clk	= "trace_clk_div_ck",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.opt_clks	= debugss_opt_clks,
  	.opt_clks_cnt	= ARRAY_SIZE(debugss_opt_clks),
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
452
453
454
455
456
457
  /* 'smartreflex' class */
  static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
  	.name		= "smartreflex",
  };
  
  /* smartreflex0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
458
459
460
461
  static struct omap_hwmod am33xx_smartreflex0_hwmod = {
  	.name		= "smartreflex0",
  	.class		= &am33xx_smartreflex_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
462
463
464
  	.main_clk	= "smartreflex0_fck",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
465
466
467
468
469
470
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* smartreflex1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
471
472
473
474
  static struct omap_hwmod am33xx_smartreflex1_hwmod = {
  	.name		= "smartreflex1",
  	.class		= &am33xx_smartreflex_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
475
476
477
  	.main_clk	= "smartreflex1_fck",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
478
479
480
481
482
483
484
485
486
487
488
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'control' module class
   */
  static struct omap_hwmod_class am33xx_control_hwmod_class = {
  	.name		= "control",
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
489
490
491
492
  static struct omap_hwmod am33xx_control_hwmod = {
  	.name		= "control",
  	.class		= &am33xx_control_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
39fb20bb9   Rajendra Nayak   ARM: OMAP2+: hwmo...
493
  	.flags		= HWMOD_INIT_NO_IDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
494
495
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'cpgmac' class
   * cpsw/cpgmac sub system
   */
  static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x8,
  	.syss_offs	= 0x4,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  			   SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  			   MSTANDBY_NO),
  	.sysc_fields	= &omap_hwmod_sysc_type3,
  };
  
  static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
  	.name		= "cpgmac0",
  	.sysc		= &am33xx_cpgmac_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
520
521
522
523
  static struct omap_hwmod am33xx_cpgmac0_hwmod = {
  	.name		= "cpgmac0",
  	.class		= &am33xx_cpgmac0_hwmod_class,
  	.clkdm_name	= "cpsw_125mhz_clkdm",
223c8a2bb   Dave Gerlach   ARM: OMAP: omap_h...
524
525
  	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  			   HWMOD_FORCE_MSTANDBY_REPEATED),
50c2a3a15   Afzal Mohammed   ARM: OMAP2+: hwmo...
526
  	.mpu_rt_idx	= 1,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
527
528
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
529
530
531
532
533
534
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
70384a6af   Mugunthan V N   ARM: OMAP3+: hwmo...
535
536
537
538
539
540
541
542
543
544
   * mdio class
   */
  static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
  	.name		= "davinci_mdio",
  };
  
  static struct omap_hwmod am33xx_mdio_hwmod = {
  	.name		= "davinci_mdio",
  	.class		= &am33xx_mdio_hwmod_class,
  	.clkdm_name	= "cpsw_125mhz_clkdm",
70384a6af   Mugunthan V N   ARM: OMAP3+: hwmo...
545
546
547
  };
  
  /*
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
548
549
550
551
552
553
554
   * dcan class
   */
  static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
  	.name = "d_can",
  };
  
  /* dcan0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
555
556
557
558
  static struct omap_hwmod am33xx_dcan0_hwmod = {
  	.name		= "d_can0",
  	.class		= &am33xx_dcan_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
559
560
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
561
562
563
564
565
566
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* dcan1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
567
568
569
570
  static struct omap_hwmod am33xx_dcan1_hwmod = {
  	.name		= "d_can1",
  	.class		= &am33xx_dcan_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
571
572
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* elm */
  static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0010,
  	.syss_offs	= 0x0014,
  	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  			SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  			SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am33xx_elm_hwmod_class = {
  	.name		= "elm",
  	.sysc		= &am33xx_elm_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
594
595
596
597
  static struct omap_hwmod am33xx_elm_hwmod = {
  	.name		= "elm",
  	.class		= &am33xx_elm_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
598
599
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
600
601
602
603
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
604
  /* pwmss  */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
605
606
607
608
609
610
611
612
613
614
615
616
617
618
  static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x4,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  			MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
  	.name		= "epwmss",
  	.sysc		= &am33xx_epwmss_sysc,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
619
620
  static struct omap_hwmod_class am33xx_ecap_hwmod_class = {
  	.name		= "ecap",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
621
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
622
623
  static struct omap_hwmod_class am33xx_eqep_hwmod_class = {
  	.name		= "eqep",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
624
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
625
626
  static struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = {
  	.name		= "ehrpwm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
627
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
628
629
630
  /* epwmss0 */
  static struct omap_hwmod am33xx_epwmss0_hwmod = {
  	.name		= "epwmss0",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
631
632
  	.class		= &am33xx_epwmss_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
633
634
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
635
636
637
638
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
639
  /* ecap0 */
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
640
641
642
  static struct omap_hwmod am33xx_ecap0_hwmod = {
  	.name		= "ecap0",
  	.class		= &am33xx_ecap_hwmod_class,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
643
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
644
  };
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
645
  /* eqep0 */
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
646
647
  static struct omap_hwmod am33xx_eqep0_hwmod = {
  	.name		= "eqep0",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
648
  	.class		= &am33xx_eqep_hwmod_class,
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
649
  	.clkdm_name	= "l4ls_clkdm",
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
650
  	.main_clk	= "l4ls_gclk",
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
651
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
652
  /* ehrpwm0 */
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
653
654
655
656
  static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
  	.name		= "ehrpwm0",
  	.class		= &am33xx_ehrpwm_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
657
658
659
660
661
  };
  
  /* epwmss1 */
  static struct omap_hwmod am33xx_epwmss1_hwmod = {
  	.name		= "epwmss1",
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
662
663
  	.class		= &am33xx_epwmss_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
664
665
  	.prcm		= {
  		.omap4	= {
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
666
667
668
669
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
670
  /* ecap1 */
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
671
672
673
  static struct omap_hwmod am33xx_ecap1_hwmod = {
  	.name		= "ecap1",
  	.class		= &am33xx_ecap_hwmod_class,
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
674
  	.clkdm_name	= "l4ls_clkdm",
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
675
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
676
  /* eqep1 */
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
677
678
679
  static struct omap_hwmod am33xx_eqep1_hwmod = {
  	.name		= "eqep1",
  	.class		= &am33xx_eqep_hwmod_class,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
680
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
681
  	.main_clk	= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
682
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
683
  /* ehrpwm1 */
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
684
685
686
687
  static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
  	.name		= "ehrpwm1",
  	.class		= &am33xx_ehrpwm_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
688
689
690
691
692
  };
  
  /* epwmss2 */
  static struct omap_hwmod am33xx_epwmss2_hwmod = {
  	.name		= "epwmss2",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
693
694
  	.class		= &am33xx_epwmss_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
695
696
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
697
698
699
700
701
702
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* ecap2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
703
704
  static struct omap_hwmod am33xx_ecap2_hwmod = {
  	.name		= "ecap2",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
705
706
  	.class		= &am33xx_ecap_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
707
708
709
  };
  
  /* eqep2 */
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
710
711
712
  static struct omap_hwmod am33xx_eqep2_hwmod = {
  	.name		= "eqep2",
  	.class		= &am33xx_eqep_hwmod_class,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
713
  	.clkdm_name	= "l4ls_clkdm",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
714
715
716
717
  	.main_clk	= "l4ls_gclk",
  };
  
  /* ehrpwm2 */
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
718
719
720
721
  static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
  	.name		= "ehrpwm2",
  	.class		= &am33xx_ehrpwm_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
  };
  
  /*
   * 'gpio' class: for gpio 0,1,2,3
   */
  static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0010,
  	.syss_offs	= 0x0114,
  	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  			  SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  			  SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			  SIDLE_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
  	.name		= "gpio",
  	.sysc		= &am33xx_gpio_sysc,
  	.rev		= 2,
  };
  
  static struct omap_gpio_dev_attr gpio_dev_attr = {
  	.bank_width	= 32,
  	.dbck_flag	= true,
  };
  
  /* gpio0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
751

a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
752
753
754
755
756
  static struct omap_hwmod am33xx_gpio0_hwmod = {
  	.name		= "gpio1",
  	.class		= &am33xx_gpio_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
  	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
757
758
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
759
760
761
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
762
763
764
765
  	.dev_attr	= &gpio_dev_attr,
  };
  
  /* gpio1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
766
767
768
769
770
771
  
  static struct omap_hwmod am33xx_gpio1_hwmod = {
  	.name		= "gpio2",
  	.class		= &am33xx_gpio_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
772
773
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
774
775
776
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
777
778
779
780
  	.dev_attr	= &gpio_dev_attr,
  };
  
  /* gpio2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
781
782
783
784
785
786
  
  static struct omap_hwmod am33xx_gpio2_hwmod = {
  	.name		= "gpio3",
  	.class		= &am33xx_gpio_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
787
788
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
789
790
791
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
792
793
794
795
  	.dev_attr	= &gpio_dev_attr,
  };
  
  /* gpio3 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
796
797
798
799
800
801
  
  static struct omap_hwmod am33xx_gpio3_hwmod = {
  	.name		= "gpio4",
  	.class		= &am33xx_gpio_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
802
803
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
804
805
806
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
  	.dev_attr	= &gpio_dev_attr,
  };
  
  /* gpmc */
  static struct omap_hwmod_class_sysconfig gpmc_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x10,
  	.syss_offs	= 0x14,
  	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  			SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
  	.name		= "gpmc",
  	.sysc		= &gpmc_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
825
826
827
828
  static struct omap_hwmod am33xx_gpmc_hwmod = {
  	.name		= "gpmc",
  	.class		= &am33xx_gpmc_hwmod_class,
  	.clkdm_name	= "l3s_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
829
830
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* 'i2c' class */
  static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
  	.sysc_offs	= 0x0010,
  	.syss_offs	= 0x0090,
  	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  			  SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  			  SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			  SIDLE_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class i2c_class = {
  	.name		= "i2c",
  	.sysc		= &am33xx_i2c_sysc,
  	.rev		= OMAP_I2C_IP_VERSION_2,
  	.reset		= &omap_i2c_reset,
  };
  
  static struct omap_i2c_dev_attr i2c_dev_attr = {
972deb4f4   Shubhrajyoti D   i2c: omap: Remove...
856
  	.flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
857
858
859
  };
  
  /* i2c1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
860
861
862
863
  static struct omap_hwmod am33xx_i2c1_hwmod = {
  	.name		= "i2c1",
  	.class		= &i2c_class,
  	.clkdm_name	= "l4_wkup_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
864
  	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
865
866
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
867
868
869
870
871
872
873
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &i2c_dev_attr,
  };
  
  /* i2c1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
874
875
876
877
  static struct omap_hwmod am33xx_i2c2_hwmod = {
  	.name		= "i2c2",
  	.class		= &i2c_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
878
  	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
879
880
  	.prcm		= {
  		.omap4 = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
881
882
883
884
885
886
887
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &i2c_dev_attr,
  };
  
  /* i2c3 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
888
889
890
891
  static struct omap_hwmod am33xx_i2c3_hwmod = {
  	.name		= "i2c3",
  	.class		= &i2c_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
892
  	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
893
894
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &i2c_dev_attr,
  };
  
  
  /* lcdc */
  static struct omap_hwmod_class_sysconfig lcdc_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x54,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
  	.name		= "lcdc",
  	.sysc		= &lcdc_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
915
916
917
918
  static struct omap_hwmod am33xx_lcdc_hwmod = {
  	.name		= "lcdc",
  	.class		= &am33xx_lcdc_hwmod_class,
  	.clkdm_name	= "lcdc_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
  	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  	.main_clk	= "lcd_gclk",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'mailbox' class
   * mailbox module allowing communication between the on-chip processors using a
   * queued mailbox-interrupt mechanism.
   */
  static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0010,
  	.sysc_flags	= (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  			  SYSC_HAS_SOFTRESET),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
  	.name	= "mailbox",
  	.sysc	= &am33xx_mailbox_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
947
948
949
950
  static struct omap_hwmod am33xx_mailbox_hwmod = {
  	.name		= "mailbox",
  	.class		= &am33xx_mailbox_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
951
952
  	.prcm = {
  		.omap4 = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'mcasp' class
   */
  static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x4,
  	.sysc_flags	= SYSC_HAS_SIDLEMODE,
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type3,
  };
  
  static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
  	.name		= "mcasp",
  	.sysc		= &am33xx_mcasp_sysc,
  };
  
  /* mcasp0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
975
976
977
978
  static struct omap_hwmod am33xx_mcasp0_hwmod = {
  	.name		= "mcasp0",
  	.class		= &am33xx_mcasp_hwmod_class,
  	.clkdm_name	= "l3s_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
979
980
981
  	.main_clk	= "mcasp0_fck",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
982
983
984
985
986
987
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* mcasp1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
988
989
990
991
  static struct omap_hwmod am33xx_mcasp1_hwmod = {
  	.name		= "mcasp1",
  	.class		= &am33xx_mcasp_hwmod_class,
  	.clkdm_name	= "l3s_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
992
993
994
  	.main_clk	= "mcasp1_fck",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* 'mmc' class */
  static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
  	.rev_offs	= 0x1fc,
  	.sysc_offs	= 0x10,
  	.syss_offs	= 0x14,
  	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  			  SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  			  SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
  	.name		= "mmc",
  	.sysc		= &am33xx_mmc_sysc,
  };
  
  /* mmc0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1018
1019
1020
1021
1022
1023
1024
1025
  static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
  	.flags		= OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  };
  
  static struct omap_hwmod am33xx_mmc0_hwmod = {
  	.name		= "mmc1",
  	.class		= &am33xx_mmc_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1026
1027
1028
  	.main_clk	= "mmc_clk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1029
1030
1031
1032
1033
1034
1035
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &am33xx_mmc0_dev_attr,
  };
  
  /* mmc1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1036
1037
1038
1039
1040
1041
1042
1043
  static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
  	.flags		= OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  };
  
  static struct omap_hwmod am33xx_mmc1_hwmod = {
  	.name		= "mmc2",
  	.class		= &am33xx_mmc_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1044
1045
1046
  	.main_clk	= "mmc_clk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1047
1048
1049
1050
1051
1052
1053
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &am33xx_mmc1_dev_attr,
  };
  
  /* mmc2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1054
1055
1056
1057
1058
1059
1060
  static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
  	.flags		= OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  };
  static struct omap_hwmod am33xx_mmc2_hwmod = {
  	.name		= "mmc3",
  	.class		= &am33xx_mmc_hwmod_class,
  	.clkdm_name	= "l3s_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1061
1062
1063
  	.main_clk	= "mmc_clk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &am33xx_mmc2_dev_attr,
  };
  
  /*
   * 'rtc' class
   * rtc subsystem
   */
  static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
  	.rev_offs	= 0x0074,
  	.sysc_offs	= 0x0078,
  	.sysc_flags	= SYSC_HAS_SIDLEMODE,
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO |
  			  SIDLE_SMART | SIDLE_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type3,
  };
  
  static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
  	.name		= "rtc",
  	.sysc		= &am33xx_rtc_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1087
1088
1089
1090
  static struct omap_hwmod am33xx_rtc_hwmod = {
  	.name		= "rtc",
  	.class		= &am33xx_rtc_hwmod_class,
  	.clkdm_name	= "l4_rtc_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1091
1092
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* 'spi' class */
  static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0110,
  	.syss_offs	= 0x0114,
  	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  			  SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  			  SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am33xx_spi_hwmod_class = {
  	.name		= "mcspi",
  	.sysc		= &am33xx_mcspi_sysc,
  	.rev		= OMAP4_MCSPI_REV,
  };
  
  /* spi0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1117
1118
1119
1120
1121
1122
1123
  static struct omap2_mcspi_dev_attr mcspi_attrib = {
  	.num_chipselect	= 2,
  };
  static struct omap_hwmod am33xx_spi0_hwmod = {
  	.name		= "spi0",
  	.class		= &am33xx_spi_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1124
1125
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1126
1127
1128
1129
1130
1131
1132
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &mcspi_attrib,
  };
  
  /* spi1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1133
1134
1135
1136
  static struct omap_hwmod am33xx_spi1_hwmod = {
  	.name		= "spi1",
  	.class		= &am33xx_spi_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1137
1138
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &mcspi_attrib,
  };
  
  /*
   * 'spinlock' class
   * spinlock provides hardware assistance for synchronizing the
   * processes running on multiple processors
   */
49659c2aa   Suman Anna   ARM: AM33xx: hwmo...
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
  
  static struct omap_hwmod_class_sysconfig am33xx_spinlock_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0010,
  	.syss_offs	= 0x0014,
  	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1161
1162
  static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
  	.name		= "spinlock",
49659c2aa   Suman Anna   ARM: AM33xx: hwmo...
1163
  	.sysc		= &am33xx_spinlock_sysc,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1164
1165
1166
1167
1168
1169
  };
  
  static struct omap_hwmod am33xx_spinlock_hwmod = {
  	.name		= "spinlock",
  	.class		= &am33xx_spinlock_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1170
1171
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1172
1173
1174
1175
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
0509b66f2   Sourav Poddar   arm: omap2: am43x...
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
  static struct omap_hwmod_class_sysconfig am43xx_qspi_sysc = {
  	.sysc_offs      = 0x0010,
  	.sysc_flags     = SYSC_HAS_SIDLEMODE,
  	.idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  				SIDLE_SMART_WKUP),
  	.sysc_fields    = &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am43xx_qspi_hwmod_class = {
  	.name   = "qspi",
  	.sysc   = &am43xx_qspi_sysc,
  };
  
  static struct omap_hwmod am43xx_qspi_hwmod = {
  	.name           = "qspi",
  	.class          = &am43xx_qspi_hwmod_class,
  	.clkdm_name     = "l3s_clkdm",
  	.main_clk       = "l3s_gclk",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_QSPI_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
001e80c47   Sourav Poddar   arm: hwmod: am437...
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
  static struct omap_hwmod_class_sysconfig am43xx_hdq1w_sysc = {
  	.rev_offs       = 0x0000,
  	.sysc_offs      = 0x0014,
  	.syss_offs      = 0x0018,
  	.sysc_flags     = (SYSC_HAS_SOFTRESET),
  	.sysc_fields    = &omap_hwmod_sysc_type4,
  };
  
  static struct omap_hwmod_class am43xx_hdq1w_hwmod_class = {
  	.name   = "hdq1w",
  	.sysc   = &am43xx_hdq1w_sysc,
  	.reset	= &omap_hdq1w_reset,
  };
  
  static struct omap_hwmod am43xx_hdq1w_hwmod = {
  	.name           = "hdq1w",
  	.class          = &am43xx_hdq1w_hwmod_class,
  	.clkdm_name     = "l4ls_clkdm",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
b54a4541a   George Cherian   arm: omap_hwmod: ...
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
  /* 'ocp2scp' class
   *
   */
  
  
  static struct omap_hwmod_class am43xx_ocp2scp_hwmod_class = {
  	.name	= "ocp2scp",
  };
  
  /* ocp2scp0 */
  static struct omap_hwmod am43xx_ocp2scp0_hwmod = {
  	.name		= "ocp2scp0",
  	.class		= &am43xx_ocp2scp_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.main_clk	= "l4ls_gclk",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* ocp2scp1 */
  static struct omap_hwmod am43xx_ocp2scp1_hwmod = {
  	.name		= "ocp2scp1",
  	.class		= &am43xx_ocp2scp_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.main_clk	= "l4ls_gclk",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* 'usb_otg_ss' class */
  static struct omap_hwmod_class_sysconfig am43xx_usb_otg_ss_sysc = {
  	.rev_offs       = 0x0000,
  	.sysc_offs      = 0x0010,
  	.sysc_flags     = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
  			   SYSC_HAS_SIDLEMODE),
  	.idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			   SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  			   MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  	.sysc_fields    = &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am43xx_usb_otg_ss_hwmod_class = {
  	.name   = "usb_otg_ss",
  	.sysc   = &am43xx_usb_otg_ss_sysc,
  };
  
  /* usb_otg_ss0 */
  static struct omap_hwmod am43xx_usb_otg_ss0_hwmod = {
  	.name           = "usb_otg_ss0",
  	.class          = &am43xx_usb_otg_ss_hwmod_class,
  	.clkdm_name     = "l3s_clkdm",
  	.main_clk       = "l3s_gclk",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_USB_OTG_SS0_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* usb_otg_ss1 */
  static struct omap_hwmod am43xx_usb_otg_ss1_hwmod = {
  	.name           = "usb_otg_ss1",
  	.class          = &am43xx_usb_otg_ss_hwmod_class,
  	.clkdm_name     = "l3s_clkdm",
  	.main_clk       = "l3s_gclk",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
  /* 'timer 2-7' class */
  static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0010,
  	.syss_offs	= 0x0014,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			  SIDLE_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am33xx_timer_hwmod_class = {
  	.name		= "timer",
  	.sysc		= &am33xx_timer_sysc,
  };
  
  /* timer1 1ms */
  static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0010,
  	.syss_offs	= 0x0014,
  	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  			SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  			SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
  	.name		= "timer",
  	.sysc		= &am33xx_timer1ms_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1339
1340
1341
1342
  static struct omap_hwmod am33xx_timer1_hwmod = {
  	.name		= "timer1",
  	.class		= &am33xx_timer1ms_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1343
1344
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1345
1346
1347
1348
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1349
1350
1351
1352
  static struct omap_hwmod am33xx_timer2_hwmod = {
  	.name		= "timer2",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1353
1354
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1355
1356
1357
1358
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1359
1360
1361
1362
  static struct omap_hwmod am33xx_timer3_hwmod = {
  	.name		= "timer3",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1363
1364
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1365
1366
1367
1368
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1369
1370
1371
1372
  static struct omap_hwmod am33xx_timer4_hwmod = {
  	.name		= "timer4",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1373
1374
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1375
1376
1377
1378
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1379
1380
1381
1382
  static struct omap_hwmod am33xx_timer5_hwmod = {
  	.name		= "timer5",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1383
1384
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1385
1386
1387
1388
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1389
1390
1391
1392
  static struct omap_hwmod am33xx_timer6_hwmod = {
  	.name		= "timer6",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1393
1394
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1395
1396
1397
1398
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1399
1400
1401
1402
  static struct omap_hwmod am33xx_timer7_hwmod = {
  	.name		= "timer7",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1403
1404
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1405
1406
1407
1408
1409
1410
1411
1412
1413
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* tpcc */
  static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
  	.name		= "tpcc",
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1414
1415
1416
1417
  static struct omap_hwmod am33xx_tpcc_hwmod = {
  	.name		= "tpcc",
  	.class		= &am33xx_tpcc_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1418
1419
1420
  	.main_clk	= "l3_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x10,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  			  SYSC_HAS_MIDLEMODE),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  /* 'tptc' class */
  static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
  	.name		= "tptc",
  	.sysc		= &am33xx_tptc_sysc,
  };
  
  /* tptc0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1442
1443
1444
1445
  static struct omap_hwmod am33xx_tptc0_hwmod = {
  	.name		= "tptc0",
  	.class		= &am33xx_tptc_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
223c8a2bb   Dave Gerlach   ARM: OMAP: omap_h...
1446
1447
  	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  				  HWMOD_FORCE_MSTANDBY_REPEATED,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1448
1449
1450
  	.main_clk	= "l3_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1451
1452
1453
1454
1455
1456
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* tptc1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1457
1458
1459
1460
  static struct omap_hwmod am33xx_tptc1_hwmod = {
  	.name		= "tptc1",
  	.class		= &am33xx_tptc_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
223c8a2bb   Dave Gerlach   ARM: OMAP: omap_h...
1461
1462
  	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  				   HWMOD_FORCE_MSTANDBY_REPEATED),
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1463
1464
1465
  	.main_clk	= "l3_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1466
1467
1468
1469
1470
1471
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* tptc2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1472
1473
1474
1475
  static struct omap_hwmod am33xx_tptc2_hwmod = {
  	.name		= "tptc2",
  	.class		= &am33xx_tptc_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
223c8a2bb   Dave Gerlach   ARM: OMAP: omap_h...
1476
1477
  	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  				   HWMOD_FORCE_MSTANDBY_REPEATED),
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1478
1479
1480
  	.main_clk	= "l3_gclk",
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* 'uart' class */
  static struct omap_hwmod_class_sysconfig uart_sysc = {
  	.rev_offs	= 0x50,
  	.sysc_offs	= 0x54,
  	.syss_offs	= 0x58,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  			  SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			  SIDLE_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class uart_class = {
  	.name		= "uart",
  	.sysc		= &uart_sysc,
  };
  
  /* uart1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1504
1505
1506
1507
  static struct omap_hwmod am33xx_uart1_hwmod = {
  	.name		= "uart1",
  	.class		= &uart_class,
  	.clkdm_name	= "l4_wkup_clkdm",
7dedd3469   Rajendra Nayak   ARM: OMAP2+: hwmo...
1508
  	.flags		= DEBUG_AM33XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1509
1510
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1511
1512
1513
1514
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1515
1516
1517
1518
  static struct omap_hwmod am33xx_uart2_hwmod = {
  	.name		= "uart2",
  	.class		= &uart_class,
  	.clkdm_name	= "l4ls_clkdm",
66dde54e9   Santosh Shilimkar   ARM: OMAP2+: hwmo...
1519
  	.flags		= HWMOD_SWSUP_SIDLE_ACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1520
1521
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1522
1523
1524
1525
1526
1527
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* uart3 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1528
1529
1530
1531
  static struct omap_hwmod am33xx_uart3_hwmod = {
  	.name		= "uart3",
  	.class		= &uart_class,
  	.clkdm_name	= "l4ls_clkdm",
66dde54e9   Santosh Shilimkar   ARM: OMAP2+: hwmo...
1532
  	.flags		= HWMOD_SWSUP_SIDLE_ACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1533
1534
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1535
1536
1537
1538
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1539
1540
1541
1542
  static struct omap_hwmod am33xx_uart4_hwmod = {
  	.name		= "uart4",
  	.class		= &uart_class,
  	.clkdm_name	= "l4ls_clkdm",
66dde54e9   Santosh Shilimkar   ARM: OMAP2+: hwmo...
1543
  	.flags		= HWMOD_SWSUP_SIDLE_ACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1544
1545
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1546
1547
1548
1549
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1550
1551
1552
1553
  static struct omap_hwmod am33xx_uart5_hwmod = {
  	.name		= "uart5",
  	.class		= &uart_class,
  	.clkdm_name	= "l4ls_clkdm",
66dde54e9   Santosh Shilimkar   ARM: OMAP2+: hwmo...
1554
  	.flags		= HWMOD_SWSUP_SIDLE_ACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1555
1556
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1557
1558
1559
1560
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1561
1562
1563
1564
  static struct omap_hwmod am33xx_uart6_hwmod = {
  	.name		= "uart6",
  	.class		= &uart_class,
  	.clkdm_name	= "l4ls_clkdm",
66dde54e9   Santosh Shilimkar   ARM: OMAP2+: hwmo...
1565
  	.flags		= HWMOD_SWSUP_SIDLE_ACT,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1566
1567
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1568
1569
1570
1571
1572
1573
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /* 'wd_timer' class */
05cf03b6e   Vaibhav Hiremath   ARM: OMAP2+: AM33...
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
  static struct omap_hwmod_class_sysconfig wdt_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x10,
  	.syss_offs	= 0x14,
  	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  			SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			SIDLE_SMART_WKUP),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1584
1585
  static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
  	.name		= "wd_timer",
05cf03b6e   Vaibhav Hiremath   ARM: OMAP2+: AM33...
1586
1587
  	.sysc		= &wdt_sysc,
  	.pre_shutdown	= &omap2_wd_timer_disable,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
  };
  
  /*
   * XXX: device.c file uses hardcoded name for watchdog timer
   * driver "wd_timer2, so we are also using same name as of now...
   */
  static struct omap_hwmod am33xx_wd_timer1_hwmod = {
  	.name		= "wd_timer2",
  	.class		= &am33xx_wd_timer_hwmod_class,
  	.clkdm_name	= "l4_wkup_clkdm",
05cf03b6e   Vaibhav Hiremath   ARM: OMAP2+: AM33...
1598
  	.flags		= HWMOD_SWSUP_SIDLE,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1599
1600
  	.prcm		= {
  		.omap4	= {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  /*
   * 'usb_otg' class
   * high-speed on-the-go universal serial bus (usb_otg) controller
   */
  static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x10,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			  MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am33xx_usbotg_class = {
  	.name		= "usbotg",
  	.sysc		= &am33xx_usbhsotg_sysc,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1623
1624
1625
1626
  static struct omap_hwmod am33xx_usbss_hwmod = {
  	.name		= "usb_otg_hs",
  	.class		= &am33xx_usbotg_class,
  	.clkdm_name	= "l3s_clkdm",
223c8a2bb   Dave Gerlach   ARM: OMAP: omap_h...
1627
1628
  	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  				  HWMOD_FORCE_MSTANDBY_REPEATED,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1629
1630
1631
1632
1633
1634
1635
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
487f390ff   Afzal Mohammed   ARM: OMAP2+: hwmo...
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
  static struct omap_hwmod_class_sysconfig am43xx_synctimer_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x4,
  	.sysc_flags	= SYSC_HAS_SIDLEMODE,
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am43xx_synctimer_hwmod_class = {
  	.name	= "synctimer",
  	.sysc	= &am43xx_synctimer_sysc,
  };
  
  static struct omap_hwmod am43xx_synctimer_hwmod = {
  	.name		= "counter_32k",
  	.class		= &am43xx_synctimer_hwmod_class,
  	.clkdm_name	= "l4_wkup_aon_clkdm",
  	.flags		= HWMOD_SWSUP_SIDLE,
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_timer8_hwmod = {
  	.name		= "timer8",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM43XX_CM_PER_TIMER8_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_timer9_hwmod = {
  	.name		= "timer9",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM43XX_CM_PER_TIMER9_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_timer10_hwmod = {
  	.name		= "timer10",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM43XX_CM_PER_TIMER10_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_timer11_hwmod = {
  	.name		= "timer11",
  	.class		= &am33xx_timer_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM43XX_CM_PER_TIMER11_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_epwmss3_hwmod = {
  	.name		= "epwmss3",
  	.class		= &am33xx_epwmss_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_EPWMSS3_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_ehrpwm3_hwmod = {
  	.name		= "ehrpwm3",
  	.class		= &am33xx_ehrpwm_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  };
  
  static struct omap_hwmod am43xx_epwmss4_hwmod = {
  	.name		= "epwmss4",
  	.class		= &am33xx_epwmss_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_EPWMSS4_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_ehrpwm4_hwmod = {
  	.name		= "ehrpwm4",
  	.class		= &am33xx_ehrpwm_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  };
  
  static struct omap_hwmod am43xx_epwmss5_hwmod = {
  	.name		= "epwmss5",
  	.class		= &am33xx_epwmss_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_EPWMSS5_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod am43xx_ehrpwm5_hwmod = {
  	.name		= "ehrpwm5",
  	.class		= &am33xx_ehrpwm_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  };
  
  static struct omap_hwmod am43xx_spi2_hwmod = {
  	.name		= "spi2",
  	.class		= &am33xx_spi_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_SPI2_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &mcspi_attrib,
  };
  
  static struct omap_hwmod am43xx_spi3_hwmod = {
  	.name		= "spi3",
  	.class		= &am33xx_spi_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_SPI3_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &mcspi_attrib,
  };
  
  static struct omap_hwmod am43xx_spi4_hwmod = {
  	.name		= "spi4",
  	.class		= &am33xx_spi_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_SPI4_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &mcspi_attrib,
  };
  
  static struct omap_hwmod am43xx_gpio4_hwmod = {
  	.name		= "gpio5",
  	.class		= &am33xx_gpio_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_GPIO4_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &gpio_dev_attr,
  };
  
  static struct omap_hwmod am43xx_gpio5_hwmod = {
  	.name		= "gpio6",
  	.class		= &am33xx_gpio_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs = AM43XX_CM_PER_GPIO5_CLKCTRL_OFFSET,
  			.modulemode   = MODULEMODE_SWCTRL,
  		},
  	},
  	.dev_attr	= &gpio_dev_attr,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1830

ea8c2409a   Sathya Prakash M R   ARM: OMAP2+: AM43...
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
  /* Display sub system - DSS */
  
  static struct omap_hwmod_dma_info am43xx_dss_sdma_chs[] = {
  	{ .name = "dispc", .dma_req = 5 },
  	{ .dma_req = -1 },
  };
  
  struct omap_dss_dispc_dev_attr am43xx_dss_dispc_dev_attr = {
  	.manager_count		= 1,
  	.has_framedonetv_irq	= 0
  };
  
  
  static struct omap_hwmod_class_sysconfig am43xx_dispc_sysc = {
  	.rev_offs	= 0x0000,
  	.sysc_offs	= 0x0010,
  	.syss_offs	= 0x0014,
  	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am43xx_dispc_hwmod_class = {
  	.name	= "dispc",
  	.sysc	= &am43xx_dispc_sysc,
  };
  
  
  
  static struct omap_hwmod am43xx_dss_core_hwmod = {
  	.name		= "dss_core",
  	.class		= &omap2_dss_hwmod_class,
  	.clkdm_name	= "dss_clkdm",
  	.main_clk	= "disp_clk",
  	.sdma_reqs	= am43xx_dss_sdma_chs,
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
534096586   Dave Gerlach   ARM: OMAP2+: am43...
1869
  			.context_offs = AM43XX_PRM_RM_PER_DSS_CONTEXT,
ea8c2409a   Sathya Prakash M R   ARM: OMAP2+: AM43...
1870
  			.modulemode   = MODULEMODE_SWCTRL,
534096586   Dave Gerlach   ARM: OMAP2+: am43...
1871
  			.flags = HWMOD_AM437X_HAS_CONTEXT_LOSS_BIT,
ea8c2409a   Sathya Prakash M R   ARM: OMAP2+: AM43...
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
  		},
  	},
  };
  
  /* display controller -dispc*/
  
  static struct omap_hwmod am43xx_dss_dispc_hwmod = {
  	.name		= "dss_dispc",
  	.class		= &am43xx_dispc_hwmod_class,
  	.clkdm_name	= "dss_clkdm",
  	.main_clk	= "disp_clk",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
  		},
  	},
  	.dev_attr	= &am43xx_dss_dispc_dev_attr,
  };
  
  /*RFBI*/
  
  static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
  	.name		= "dss_rfbi",
  	.class		= &omap2_rfbi_hwmod_class,
  	.clkdm_name	= "dss_clkdm",
  	.main_clk	= "disp_clk",
  	.prcm = {
  		.omap4 = {
  			.clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
  		},
  	},
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1904
1905
1906
  /*
   * Interfaces
   */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
  static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
  	{
  		.pa_start	= 0x4c000000,
  		.pa_end		= 0x4c000fff,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  /* l3 main -> emif */
  static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_emif_hwmod,
  	.clk		= "dpll_core_m4_ck",
  	.addr		= am33xx_emif_addrs,
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* mpu -> l3 main */
  static struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
  	.master		= &am33xx_mpu_hwmod,
  	.slave		= &am33xx_l3_main_hwmod,
  	.clk		= "dpll_mpu_m2_ck",
  	.user		= OCP_USER_MPU,
  };
  
  /* l3 main -> l4 hs */
  static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_l4_hs_hwmod,
  	.clk		= "l3s_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l3 main -> l3 s */
  static struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_l3_s_hwmod,
  	.clk		= "l3s_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l3 s -> l4 per/ls */
  static struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
  	.master		= &am33xx_l3_s_hwmod,
  	.slave		= &am33xx_l4_ls_hwmod,
  	.clk		= "l3s_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l3 s -> l4 wkup */
  static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
  	.master		= &am33xx_l3_s_hwmod,
  	.slave		= &am33xx_l4_wkup_hwmod,
  	.clk		= "l3s_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
  /* l3 main -> l3 instr */
  static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_l3_instr_hwmod,
  	.clk		= "l3s_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* mpu -> prcm */
  static struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
  	.master		= &am33xx_mpu_hwmod,
  	.slave		= &am33xx_prcm_hwmod,
  	.clk		= "dpll_mpu_m2_ck",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l3 s -> l3 main*/
  static struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
  	.master		= &am33xx_l3_s_hwmod,
  	.slave		= &am33xx_l3_main_hwmod,
  	.clk		= "l3s_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* pru-icss -> l3 main */
  static struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
  	.master		= &am33xx_pruss_hwmod,
  	.slave		= &am33xx_l3_main_hwmod,
  	.clk		= "l3_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* wkup m3 -> l4 wkup */
  static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
  	.master		= &am33xx_wkup_m3_hwmod,
  	.slave		= &am33xx_l4_wkup_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* gfx -> l3 main */
  static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
  	.master		= &am33xx_gfx_hwmod,
  	.slave		= &am33xx_l3_main_hwmod,
  	.clk		= "dpll_core_m4_ck",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l4 wkup -> wkup m3 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2011
2012
2013
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_wkup_m3_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2014
2015
2016
2017
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l4 hs -> pru-icss */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2018
2019
2020
2021
  static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
  	.master		= &am33xx_l4_hs_hwmod,
  	.slave		= &am33xx_pruss_hwmod,
  	.clk		= "dpll_core_m4_ck",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2022
2023
2024
2025
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l3 main -> gfx */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2026
2027
2028
2029
  static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_gfx_hwmod,
  	.clk		= "dpll_core_m4_ck",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2030
2031
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
1721c7023   Vaibhav Hiremath   ARM: OMAP: AM33XX...
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
  /* l3_main -> debugss */
  static struct omap_hwmod_addr_space am33xx_debugss_addrs[] = {
  	{
  		.pa_start	= 0x4b000000,
  		.pa_end		= 0x4b000000 + SZ_16M - 1,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_main__debugss = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_debugss_hwmod,
  	.clk		= "dpll_core_m4_ck",
  	.addr		= am33xx_debugss_addrs,
  	.user		= OCP_USER_MPU,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2049
  /* l4 wkup -> smartreflex0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2050
2051
2052
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_smartreflex0_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2053
2054
2055
2056
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 wkup -> smartreflex1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2057
2058
2059
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_smartreflex1_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2060
2061
2062
2063
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 wkup -> control */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2064
2065
2066
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_control_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2067
2068
2069
2070
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 wkup -> rtc */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2071
2072
2073
2074
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_rtc_hwmod,
  	.clk		= "clkdiv32k_ick",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2075
2076
2077
2078
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 per/ls -> DCAN0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2079
2080
2081
2082
  static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_dcan0_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2083
2084
2085
2086
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l4 per/ls -> DCAN1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2087
2088
2089
2090
  static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_dcan1_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2091
2092
2093
2094
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l4 per/ls -> GPIO2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2095
2096
2097
2098
  static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_gpio1_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2099
2100
2101
2102
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l4 per/ls -> gpio3 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2103
2104
2105
2106
  static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_gpio2_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2107
2108
2109
2110
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l4 per/ls -> gpio4 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2111
2112
2113
2114
  static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_gpio3_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2115
2116
2117
2118
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* L4 WKUP -> I2C1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2119
2120
2121
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_i2c1_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2122
2123
2124
2125
  	.user		= OCP_USER_MPU,
  };
  
  /* L4 WKUP -> GPIO1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2126
2127
2128
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_gpio0_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* L4 WKUP -> ADC_TSC */
  static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
  	{
  		.pa_start	= 0x44E0D000,
  		.pa_end		= 0x44E0D000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_adc_tsc_hwmod,
  	.clk		= "dpll_core_m4_div2_ck",
  	.addr		= am33xx_adc_tsc_addrs,
  	.user		= OCP_USER_MPU,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2149
2150
2151
2152
  static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
  	.master		= &am33xx_l4_hs_hwmod,
  	.slave		= &am33xx_cpgmac0_hwmod,
  	.clk		= "cpsw_125mhz_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2153
2154
  	.user		= OCP_USER_MPU,
  };
9816aa80b   Paul Walmsley   ARM: OMAP AM33xx:...
2155
  static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
70384a6af   Mugunthan V N   ARM: OMAP3+: hwmo...
2156
2157
  	.master		= &am33xx_cpgmac0_hwmod,
  	.slave		= &am33xx_mdio_hwmod,
70384a6af   Mugunthan V N   ARM: OMAP3+: hwmo...
2158
2159
  	.user		= OCP_USER_MPU,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
  static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
  	{
  		.pa_start	= 0x48080000,
  		.pa_end		= 0x48080000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_elm_hwmod,
  	.clk		= "l4ls_gclk",
  	.addr		= am33xx_elm_addr_space,
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2176
  static struct omap_hwmod_addr_space am33xx_epwmss0_addr_space[] = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2177
2178
2179
2180
2181
  	{
  		.pa_start	= 0x48300000,
  		.pa_end		= 0x48300000 + SZ_16 - 1,
  		.flags		= ADDR_TYPE_RT
  	},
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2182
2183
  	{ }
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2184
  static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2185
  	.master		= &am33xx_l4_ls_hwmod,
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2186
  	.slave		= &am33xx_epwmss0_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2187
  	.clk		= "l4ls_gclk",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2188
  	.addr		= am33xx_epwmss0_addr_space,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2189
2190
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2191
2192
2193
  static struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
  	.master		= &am33xx_epwmss0_hwmod,
  	.slave		= &am33xx_ecap0_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2194
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2195
2196
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2197
2198
2199
2200
  static struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
  	.master		= &am33xx_epwmss0_hwmod,
  	.slave		= &am33xx_eqep0_hwmod,
  	.clk		= "l4ls_gclk",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2201
2202
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2203
2204
2205
  static struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
  	.master		= &am33xx_epwmss0_hwmod,
  	.slave		= &am33xx_ehrpwm0_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2206
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2207
2208
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2209
2210
  
  static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = {
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2211
  	{
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2212
2213
  		.pa_start	= 0x48302000,
  		.pa_end		= 0x48302000 + SZ_16 - 1,
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2214
2215
  		.flags		= ADDR_TYPE_RT
  	},
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2216
2217
  	{ }
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2218
  static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2219
  	.master		= &am33xx_l4_ls_hwmod,
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2220
  	.slave		= &am33xx_epwmss1_hwmod,
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2221
  	.clk		= "l4ls_gclk",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2222
  	.addr		= am33xx_epwmss1_addr_space,
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2223
2224
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2225
2226
2227
2228
  static struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
  	.master		= &am33xx_epwmss1_hwmod,
  	.slave		= &am33xx_ecap1_hwmod,
  	.clk		= "l4ls_gclk",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2229
2230
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2231
2232
  static struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
  	.master		= &am33xx_epwmss1_hwmod,
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2233
2234
  	.slave		= &am33xx_eqep1_hwmod,
  	.clk		= "l4ls_gclk",
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2235
2236
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2237
2238
2239
  static struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
  	.master		= &am33xx_epwmss1_hwmod,
  	.slave		= &am33xx_ehrpwm1_hwmod,
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2240
  	.clk		= "l4ls_gclk",
bee76659e   Philip Avinash   ARM: OMAP: AM33xx...
2241
2242
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2243
  static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2244
  	{
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2245
2246
  		.pa_start	= 0x48304000,
  		.pa_end		= 0x48304000 + SZ_16 - 1,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2247
2248
  		.flags		= ADDR_TYPE_RT
  	},
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2249
2250
  	{ }
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2251
  static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2252
  	.master		= &am33xx_l4_ls_hwmod,
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2253
  	.slave		= &am33xx_epwmss2_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2254
  	.clk		= "l4ls_gclk",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2255
  	.addr		= am33xx_epwmss2_addr_space,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2256
2257
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2258
2259
2260
  static struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
  	.master		= &am33xx_epwmss2_hwmod,
  	.slave		= &am33xx_ecap2_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2261
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2262
2263
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2264
2265
2266
2267
  static struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
  	.master		= &am33xx_epwmss2_hwmod,
  	.slave		= &am33xx_eqep2_hwmod,
  	.clk		= "l4ls_gclk",
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2268
2269
  	.user		= OCP_USER_MPU,
  };
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
2270
2271
2272
  static struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
  	.master		= &am33xx_epwmss2_hwmod,
  	.slave		= &am33xx_ehrpwm2_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2273
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
  	.user		= OCP_USER_MPU,
  };
  
  /* l3s cfg -> gpmc */
  static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
  	{
  		.pa_start	= 0x50000000,
  		.pa_end		= 0x50000000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
  	.master		= &am33xx_l3_s_hwmod,
  	.slave		= &am33xx_gpmc_hwmod,
  	.clk		= "l3s_gclk",
  	.addr		= am33xx_gpmc_addr_space,
  	.user		= OCP_USER_MPU,
  };
  
  /* i2c2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2296
2297
2298
2299
  static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_i2c2_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2300
2301
  	.user		= OCP_USER_MPU,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2302
2303
2304
2305
  static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_i2c3_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_addr_space am33xx_lcdc_addr_space[] = {
  	{
  		.pa_start	= 0x4830E000,
  		.pa_end		= 0x4830E000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_lcdc_hwmod,
  	.clk		= "dpll_core_m4_ck",
  	.addr		= am33xx_lcdc_addr_space,
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
  	{
  		.pa_start	= 0x480C8000,
  		.pa_end		= 0x480C8000 + (SZ_4K - 1),
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  /* l4 ls -> mailbox */
  static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_mailbox_hwmod,
  	.clk		= "l4ls_gclk",
  	.addr		= am33xx_mailbox_addrs,
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> spinlock */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2345
2346
2347
2348
  static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_spinlock_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> mcasp0 */
  static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
  	{
  		.pa_start	= 0x48038000,
  		.pa_end		= 0x48038000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_mcasp0_hwmod,
  	.clk		= "l4ls_gclk",
  	.addr		= am33xx_mcasp0_addr_space,
  	.user		= OCP_USER_MPU,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
  /* l4 ls -> mcasp1 */
  static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
  	{
  		.pa_start	= 0x4803C000,
  		.pa_end		= 0x4803C000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_mcasp1_hwmod,
  	.clk		= "l4ls_gclk",
  	.addr		= am33xx_mcasp1_addr_space,
  	.user		= OCP_USER_MPU,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
  /* l4 ls -> mmc0 */
  static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
  	{
  		.pa_start	= 0x48060100,
  		.pa_end		= 0x48060100 + SZ_4K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_mmc0_hwmod,
  	.clk		= "l4ls_gclk",
  	.addr		= am33xx_mmc0_addr_space,
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> mmc1 */
  static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
  	{
  		.pa_start	= 0x481d8100,
  		.pa_end		= 0x481d8100 + SZ_4K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_mmc1_hwmod,
  	.clk		= "l4ls_gclk",
  	.addr		= am33xx_mmc1_addr_space,
  	.user		= OCP_USER_MPU,
  };
  
  /* l3 s -> mmc2 */
  static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
  	{
  		.pa_start	= 0x47810100,
  		.pa_end		= 0x47810100 + SZ_64K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
  	.master		= &am33xx_l3_s_hwmod,
  	.slave		= &am33xx_mmc2_hwmod,
  	.clk		= "l3s_gclk",
  	.addr		= am33xx_mmc2_addr_space,
  	.user		= OCP_USER_MPU,
  };
c2cb8e52e   Sourav Poddar   arm: omap_hwmod: ...
2439
  static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = {
0509b66f2   Sourav Poddar   arm: omap2: am43x...
2440
2441
2442
2443
2444
  	.master         = &am33xx_l3_s_hwmod,
  	.slave          = &am43xx_qspi_hwmod,
  	.clk            = "l3s_gclk",
  	.user           = OCP_USER_MPU | OCP_USER_SDMA,
  };
001e80c47   Sourav Poddar   arm: hwmod: am437...
2445
2446
2447
2448
2449
2450
2451
  /* l4_per -> hdq1w */
  static struct omap_hwmod_ocp_if am43xx_l4_ls__hdq1w = {
  	.master         = &am33xx_l4_ls_hwmod,
  	.slave          = &am43xx_hdq1w_hwmod,
  	.clk            = "l4ls_gclk",
  	.user           = OCP_USER_MPU | OCP_USER_SDMA,
  };
b54a4541a   George Cherian   arm: omap_hwmod: ...
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
  /* l3_main_1 -> usb_otg_ss0 */
  static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss0 = {
  	.master         = &am33xx_l3_s_hwmod,
  	.slave          = &am43xx_usb_otg_ss0_hwmod,
  	.clk            = "l3s_gclk",
  	.user           = OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l3_main_1 -> usb_otg_ss1 */
  static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss1 = {
  	.master         = &am33xx_l3_s_hwmod,
  	.slave          = &am43xx_usb_otg_ss1_hwmod,
  	.clk            = "l3s_gclk",
  	.user           = OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* l4 ls -> ocp2scp0 */
  static struct omap_hwmod_ocp_if am33xx_l4_ls__ocp2scp0 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_ocp2scp0_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> ocp2scp0 */
  static struct omap_hwmod_ocp_if am33xx_l4_ls__ocp2scp1 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_ocp2scp1_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2483
  /* l4 ls -> mcspi0 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2484
2485
2486
2487
  static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_spi0_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2488
2489
2490
2491
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> mcspi1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2492
2493
2494
2495
  static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_spi1_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2496
2497
2498
2499
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 wkup -> timer1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2500
2501
2502
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_timer1_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2503
2504
2505
2506
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 per -> timer2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2507
2508
2509
2510
  static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_timer2_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2511
2512
2513
2514
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 per -> timer3 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2515
2516
2517
2518
  static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_timer3_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2519
2520
2521
2522
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 per -> timer4 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2523
2524
2525
2526
  static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_timer4_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2527
2528
2529
2530
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 per -> timer5 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2531
2532
2533
2534
  static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_timer5_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2535
2536
2537
2538
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 per -> timer6 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2539
2540
2541
2542
  static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_timer6_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2543
2544
2545
2546
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 per -> timer7 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2547
2548
2549
2550
  static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_timer7_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2551
2552
2553
2554
  	.user		= OCP_USER_MPU,
  };
  
  /* l3 main -> tpcc */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2555
2556
2557
2558
  static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_tpcc_hwmod,
  	.clk		= "l3_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
  	.user		= OCP_USER_MPU,
  };
  
  /* l3 main -> tpcc0 */
  static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
  	{
  		.pa_start	= 0x49800000,
  		.pa_end		= 0x49800000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_tptc0_hwmod,
  	.clk		= "l3_gclk",
  	.addr		= am33xx_tptc0_addr_space,
  	.user		= OCP_USER_MPU,
  };
  
  /* l3 main -> tpcc1 */
  static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
  	{
  		.pa_start	= 0x49900000,
  		.pa_end		= 0x49900000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_tptc1_hwmod,
  	.clk		= "l3_gclk",
  	.addr		= am33xx_tptc1_addr_space,
  	.user		= OCP_USER_MPU,
  };
  
  /* l3 main -> tpcc2 */
  static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
  	{
  		.pa_start	= 0x49a00000,
  		.pa_end		= 0x49a00000 + SZ_8K - 1,
  		.flags		= ADDR_TYPE_RT,
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_tptc2_hwmod,
  	.clk		= "l3_gclk",
  	.addr		= am33xx_tptc2_addr_space,
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 wkup -> uart1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2617
2618
2619
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_uart1_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2620
2621
2622
2623
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> uart2 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2624
2625
2626
2627
  static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_uart2_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2628
2629
2630
2631
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> uart3 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2632
2633
2634
2635
  static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_uart3_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2636
2637
2638
2639
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> uart4 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2640
2641
2642
2643
  static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_uart4_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2644
2645
2646
2647
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> uart5 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2648
2649
2650
2651
  static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_uart5_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2652
2653
2654
2655
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 ls -> uart6 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2656
2657
2658
2659
  static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_uart6_hwmod,
  	.clk		= "l4ls_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2660
2661
2662
2663
  	.user		= OCP_USER_MPU,
  };
  
  /* l4 wkup -> wd_timer1 */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2664
2665
2666
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am33xx_wd_timer1_hwmod,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2667
2668
2669
2670
2671
  	.user		= OCP_USER_MPU,
  };
  
  /* usbss */
  /* l3 s -> USBSS interface */
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2672
2673
2674
2675
  static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
  	.master		= &am33xx_l3_s_hwmod,
  	.slave		= &am33xx_usbss_hwmod,
  	.clk		= "l3s_gclk",
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
2676
2677
2678
  	.user		= OCP_USER_MPU,
  	.flags		= OCPIF_SWSUP_IDLE,
  };
ca903b6f9   Vaibhav Bedia   ARM: OMAP2+: AM33...
2679
2680
2681
2682
2683
2684
  /* l3 main -> ocmc */
  static struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_ocmcram_hwmod,
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
aec94bf5b   Mark A. Greer   ARM: AM33XX: hwmo...
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
  /* l3 main -> sha0 HIB2 */
  static struct omap_hwmod_addr_space am33xx_sha0_addrs[] = {
  	{
  		.pa_start	= 0x53100000,
  		.pa_end		= 0x53100000 + SZ_512 - 1,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_sha0_hwmod,
  	.clk		= "sha0_fck",
  	.addr		= am33xx_sha0_addrs,
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
1cb804b93   Mark A. Greer   ARM: AM33XX: hwmo...
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
  /* l3 main -> AES0 HIB2 */
  static struct omap_hwmod_addr_space am33xx_aes0_addrs[] = {
  	{
  		.pa_start	= 0x53500000,
  		.pa_end		= 0x53500000 + SZ_1M - 1,
  		.flags		= ADDR_TYPE_RT
  	},
  	{ }
  };
  
  static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_aes0_hwmod,
  	.clk		= "aes0_fck",
  	.addr		= am33xx_aes0_addrs,
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
487f390ff   Afzal Mohammed   ARM: OMAP2+: hwmo...
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
  static struct omap_hwmod_ocp_if am33xx_l4_wkup__synctimer = {
  	.master		= &am33xx_l4_wkup_hwmod,
  	.slave		= &am43xx_synctimer_hwmod,
  	.clk		= "sys_clkin_ck",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__timer8 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_timer8_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__timer9 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_timer9_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__timer10 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_timer10_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__timer11 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_timer11_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss3 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_epwmss3_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_epwmss3__ehrpwm3 = {
  	.master		= &am43xx_epwmss3_hwmod,
  	.slave		= &am43xx_ehrpwm3_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss4 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_epwmss4_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_epwmss4__ehrpwm4 = {
  	.master		= &am43xx_epwmss4_hwmod,
  	.slave		= &am43xx_ehrpwm4_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss5 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_epwmss5_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_epwmss5__ehrpwm5 = {
  	.master		= &am43xx_epwmss5_hwmod,
  	.slave		= &am43xx_ehrpwm5_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi2 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_spi2_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi3 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_spi3_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi4 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_spi4_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__gpio4 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_gpio4_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l4_ls__gpio5 = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_gpio5_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  static struct omap_hwmod_ocp_if am43xx_l3_main__pruss = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am33xx_pruss_hwmod,
  	.clk		= "dpll_core_m4_ck",
  	.user		= OCP_USER_MPU,
  };
e1ed5419b   Lokesh Vutla   ARM: AMx3xx: hwmo...
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
  /* rng */
  static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
  	.rev_offs	= 0x1fe0,
  	.sysc_offs	= 0x1fe4,
  	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
  	.idlemodes	= SIDLE_FORCE | SIDLE_NO,
  	.sysc_fields	= &omap_hwmod_sysc_type1,
  };
  
  static struct omap_hwmod_class am33xx_rng_hwmod_class = {
  	.name		= "rng",
  	.sysc		= &am33xx_rng_sysc,
  };
  
  static struct omap_hwmod am33xx_rng_hwmod = {
  	.name		= "rng",
  	.class		= &am33xx_rng_hwmod_class,
  	.clkdm_name	= "l4ls_clkdm",
  	.flags		= HWMOD_SWSUP_SIDLE,
  	.prcm		= {
  		.omap4	= {
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am33xx_rng_hwmod,
  	.clk		= "rng_fck",
  	.user		= OCP_USER_MPU,
  };
ce19b8660   Lokesh Vutla   ARM: AM43xx: hwmo...
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
  static struct omap_hwmod_class_sysconfig am43xx_des_sysc = {
  	.rev_offs	= 0x30,
  	.sysc_offs	= 0x34,
  	.syss_offs	= 0x38,
  	.sysc_flags	= SYSS_HAS_RESET_STATUS,
  };
  
  static struct omap_hwmod_class am43xx_des_hwmod_class = {
  	.name		= "des",
  	.sysc		= &am43xx_des_sysc,
  };
  
  static struct omap_hwmod am43xx_des_hwmod = {
  	.name		= "des",
  	.class		= &am43xx_des_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.clkctrl_offs	= AM43XX_CM_PER_DES_CLKCTRL_OFFSET,
  			.modulemode	= MODULEMODE_SWCTRL,
  		},
  	},
  };
  
  static struct omap_hwmod_ocp_if am43xx_l3_main__des = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am43xx_des_hwmod,
  	.clk		= "l3_gclk",
  	.user		= OCP_USER_MPU,
  };
ea8c2409a   Sathya Prakash M R   ARM: OMAP2+: AM43...
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
  /* DSS -> L3 Main */
  static struct omap_hwmod_ocp_if am43xx_dss__l3_main = {
  	.master		= &am43xx_dss_core_hwmod,
  	.slave		= &am33xx_l3_main_hwmod,
  	.clk		= "disp_clk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* L4-ls -> DSS */
  static struct omap_hwmod_ocp_if am43xx_l4_ls__dss = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_dss_core_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* L4_ls -> dss_dispc */
  static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_dispc = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_dss_dispc_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
  
  /* L4_ls -> dss_rfbi */
  static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
  	.master		= &am33xx_l4_ls_hwmod,
  	.slave		= &am43xx_dss_rfbi_hwmod,
  	.clk		= "l4ls_gclk",
  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
  };
e8efd2554   Benoit Parrot   ARM: AM437x: hwmo...
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
  static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = {
  	.rev_offs	= 0x0,
  	.sysc_offs	= 0x104,
  	.sysc_flags	= SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE,
  	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  			  MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO),
  	.sysc_fields	= &omap_hwmod_sysc_type2,
  };
  
  static struct omap_hwmod_class am43xx_vpfe_hwmod_class = {
  	.name		= "vpfe",
  	.sysc		= &am43xx_vpfe_sysc,
  };
  
  static struct omap_hwmod am43xx_vpfe0_hwmod = {
  	.name		= "vpfe0",
  	.class		= &am43xx_vpfe_hwmod_class,
  	.clkdm_name	= "l3s_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.modulemode	= MODULEMODE_SWCTRL,
  			.clkctrl_offs	= AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET,
  		},
  	},
  };
  
  static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am43xx_vpfe0_hwmod,
  	.clk		= "vpfe0_fck",
  	.flags		= OCPIF_SWSUP_IDLE,
  	.user		= OCP_USER_MPU,
  };
  
  static struct omap_hwmod am43xx_vpfe1_hwmod = {
  	.name		= "vpfe1",
  	.class		= &am43xx_vpfe_hwmod_class,
  	.clkdm_name	= "l3s_clkdm",
  	.prcm		= {
  		.omap4	= {
  			.modulemode	= MODULEMODE_SWCTRL,
  			.clkctrl_offs	= AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET,
  		},
  	},
  };
  
  static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = {
  	.master		= &am33xx_l3_main_hwmod,
  	.slave		= &am43xx_vpfe1_hwmod,
  	.clk		= "vpfe1_fck",
  	.flags		= OCPIF_SWSUP_IDLE,
  	.user		= OCP_USER_MPU,
  };
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
2983
  #define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
  static void am43xx_hwmod_clkctrl(void)
  {
  	CLKCTRL(am33xx_uart2_hwmod, AM43XX_CM_PER_UART1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart3_hwmod, AM43XX_CM_PER_UART2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart4_hwmod, AM43XX_CM_PER_UART3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart5_hwmod, AM43XX_CM_PER_UART4_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart6_hwmod, AM43XX_CM_PER_UART5_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_dcan0_hwmod, AM43XX_CM_PER_DCAN0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_dcan1_hwmod, AM43XX_CM_PER_DCAN1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_elm_hwmod, AM43XX_CM_PER_ELM_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_epwmss0_hwmod, AM43XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_epwmss1_hwmod, AM43XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_epwmss2_hwmod, AM43XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio1_hwmod, AM43XX_CM_PER_GPIO1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio2_hwmod, AM43XX_CM_PER_GPIO2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio3_hwmod, AM43XX_CM_PER_GPIO3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_i2c2_hwmod, AM43XX_CM_PER_I2C1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_i2c3_hwmod, AM43XX_CM_PER_I2C2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mailbox_hwmod, AM43XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mmc0_hwmod, AM43XX_CM_PER_MMC0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mmc1_hwmod, AM43XX_CM_PER_MMC1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_spi0_hwmod, AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_spi1_hwmod, AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_spinlock_hwmod, AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer2_hwmod, AM43XX_CM_PER_TIMER2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer3_hwmod, AM43XX_CM_PER_TIMER3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer4_hwmod, AM43XX_CM_PER_TIMER4_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer5_hwmod, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer6_hwmod, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer7_hwmod, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_wkup_m3_hwmod, AM43XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_control_hwmod, AM43XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_smartreflex0_hwmod,
  		AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_smartreflex1_hwmod,
  		AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart1_hwmod, AM43XX_CM_WKUP_UART0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer1_hwmod, AM43XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_i2c1_hwmod, AM43XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio0_hwmod, AM43XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_adc_tsc_hwmod, AM43XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_wd_timer1_hwmod, AM43XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l4_wkup_hwmod, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_rtc_hwmod, AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mmc2_hwmod, AM43XX_CM_PER_MMC2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpmc_hwmod, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mcasp0_hwmod, AM43XX_CM_PER_MCASP0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mcasp1_hwmod, AM43XX_CM_PER_MCASP1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l4_ls_hwmod, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET);
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
  	CLKCTRL(am33xx_tpcc_hwmod, AM43XX_CM_PER_TPCC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_tptc0_hwmod, AM43XX_CM_PER_TPTC0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_tptc1_hwmod, AM43XX_CM_PER_TPTC1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_tptc2_hwmod, AM43XX_CM_PER_TPTC2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_cpgmac0_hwmod, AM43XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_pruss_hwmod, AM43XX_CM_PER_PRUSS_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gfx_hwmod, AM43XX_CM_GFX_GFX_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l4_hs_hwmod, AM43XX_CM_PER_L4HS_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mpu_hwmod , AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l3_instr_hwmod , AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_ocmcram_hwmod , AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_sha0_hwmod , AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_aes0_hwmod , AM43XX_CM_PER_AES0_CLKCTRL_OFFSET);
e1ed5419b   Lokesh Vutla   ARM: AMx3xx: hwmo...
3046
  	CLKCTRL(am33xx_rng_hwmod , AM43XX_CM_PER_RNG_CLKCTRL_OFFSET);
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
3047
  }
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
  static void am33xx_hwmod_clkctrl(void)
  {
  	CLKCTRL(am33xx_uart2_hwmod, AM33XX_CM_PER_UART1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart3_hwmod, AM33XX_CM_PER_UART2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart4_hwmod, AM33XX_CM_PER_UART3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart5_hwmod, AM33XX_CM_PER_UART4_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart6_hwmod, AM33XX_CM_PER_UART5_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_dcan0_hwmod, AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_dcan1_hwmod, AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_elm_hwmod, AM33XX_CM_PER_ELM_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_epwmss0_hwmod, AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_epwmss1_hwmod, AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_epwmss2_hwmod, AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio1_hwmod, AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio2_hwmod, AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio3_hwmod, AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_i2c2_hwmod, AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_i2c3_hwmod, AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mailbox_hwmod, AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mcasp0_hwmod, AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mcasp1_hwmod, AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mmc0_hwmod, AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mmc1_hwmod, AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_spi0_hwmod, AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_spi1_hwmod, AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_spinlock_hwmod, AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer2_hwmod, AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer3_hwmod, AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer4_hwmod, AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer5_hwmod, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer6_hwmod, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer7_hwmod, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_wkup_m3_hwmod, AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_control_hwmod, AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_smartreflex0_hwmod,
  		AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_smartreflex1_hwmod,
  		AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_uart1_hwmod, AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_timer1_hwmod, AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_i2c1_hwmod, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpio0_hwmod, AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_adc_tsc_hwmod, AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_wd_timer1_hwmod, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mmc2_hwmod, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l4_wkup_hwmod, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l3_main_hwmod, AM33XX_CM_PER_L3_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_tpcc_hwmod, AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_tptc0_hwmod, AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_tptc1_hwmod, AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_tptc2_hwmod, AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_gfx_hwmod, AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l4_hs_hwmod, AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_cpgmac0_hwmod, AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_pruss_hwmod, AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_mpu_hwmod , AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_l3_instr_hwmod , AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_ocmcram_hwmod , AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_sha0_hwmod , AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET);
  	CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET);
e1ed5419b   Lokesh Vutla   ARM: AMx3xx: hwmo...
3111
  	CLKCTRL(am33xx_rng_hwmod, AM33XX_CM_PER_RNG_CLKCTRL_OFFSET);
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3112
3113
3114
  }
  
  #define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
3115
3116
3117
3118
3119
3120
  static void am43xx_hwmod_rstctrl(void)
  {
  	RSTCTRL(am33xx_pruss_hwmod, AM43XX_RM_PER_RSTCTRL_OFFSET);
  	RSTCTRL(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTCTRL_OFFSET);
  	RSTCTRL(am33xx_wkup_m3_hwmod, AM43XX_RM_WKUP_RSTCTRL_OFFSET);
  }
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3121
3122
3123
3124
3125
3126
3127
3128
  static void am33xx_hwmod_rstctrl(void)
  {
  	RSTCTRL(am33xx_pruss_hwmod, AM33XX_RM_PER_RSTCTRL_OFFSET);
  	RSTCTRL(am33xx_gfx_hwmod, AM33XX_RM_GFX_RSTCTRL_OFFSET);
  	RSTCTRL(am33xx_wkup_m3_hwmod, AM33XX_RM_WKUP_RSTCTRL_OFFSET);
  }
  
  #define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
3129
3130
3131
3132
3133
  static void am43xx_hwmod_rstst(void)
  {
  	RSTST(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTST_OFFSET);
  	RSTST(am33xx_wkup_m3_hwmod, AM43XX_RM_WKUP_RSTST_OFFSET);
  }
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3134
3135
3136
3137
3138
  static void am33xx_hwmod_rstst(void)
  {
  	RSTST(am33xx_gfx_hwmod, AM33XX_RM_GFX_RSTST_OFFSET);
  	RSTST(am33xx_wkup_m3_hwmod, AM33XX_RM_WKUP_RSTST_OFFSET);
  }
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
3139
3140
3141
3142
3143
  static void am43xx_hwmod_clockdomain(void)
  {
  	am33xx_l4_hs_hwmod.clkdm_name = "l3_clkdm";
  	am33xx_adc_tsc_hwmod.clkdm_name = "l3s_tsc_clkdm";
  }
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3144
3145
3146
3147
3148
  static void am33xx_hwmod_clockdomain(void)
  {
  	am33xx_l4_hs_hwmod.clkdm_name = "l4hs_clkdm";
  	am33xx_adc_tsc_hwmod.clkdm_name = "l4_wkup_clkdm";
  }
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
  #define AM43XX_L4_WKUP_OCPIF_CLK "sys_clkin_ck"
  
  static void am43xx_hwmod_ocpif_clk(void)
  {
  	am33xx_l4_wkup__wkup_m3.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__control.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__smartreflex0.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__smartreflex1.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__uart1.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__timer1.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__i2c1.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__gpio0.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__wd_timer1.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_wkup_m3__l4_wkup.clk = AM43XX_L4_WKUP_OCPIF_CLK;
  	am33xx_control_hwmod.main_clk = AM43XX_L4_WKUP_OCPIF_CLK;
  }
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
  #define AM33XX_L4_WKUP_OCPIF_CLK "dpll_core_m4_div2_ck"
  
  static void am33xx_hwmod_ocpif_clk(void)
  {
  	am33xx_l4_wkup__wkup_m3.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__control.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__smartreflex0.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__smartreflex1.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__uart1.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__timer1.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__i2c1.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__gpio0.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_l4_wkup__wd_timer1.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_wkup_m3__l4_wkup.clk = AM33XX_L4_WKUP_OCPIF_CLK;
  	am33xx_control_hwmod.main_clk = AM33XX_L4_WKUP_OCPIF_CLK;
  }
487f390ff   Afzal Mohammed   ARM: OMAP2+: hwmo...
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
  static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
  	&am33xx_l4_wkup__synctimer,
  	&am43xx_l4_ls__timer8,
  	&am43xx_l4_ls__timer9,
  	&am43xx_l4_ls__timer10,
  	&am43xx_l4_ls__timer11,
  	&am43xx_l4_ls__epwmss3,
  	&am43xx_epwmss3__ehrpwm3,
  	&am43xx_l4_ls__epwmss4,
  	&am43xx_epwmss4__ehrpwm4,
  	&am43xx_l4_ls__epwmss5,
  	&am43xx_epwmss5__ehrpwm5,
  	&am43xx_l4_ls__mcspi2,
  	&am43xx_l4_ls__mcspi3,
  	&am43xx_l4_ls__mcspi4,
  	&am43xx_l4_ls__gpio4,
  	&am43xx_l4_ls__gpio5,
  	&am43xx_l3_main__pruss,
ce19b8660   Lokesh Vutla   ARM: AM43xx: hwmo...
3199
  	&am43xx_l3_main__des,
c2cb8e52e   Sourav Poddar   arm: omap_hwmod: ...
3200
  	&am43xx_l3_s__qspi,
b54a4541a   George Cherian   arm: omap_hwmod: ...
3201
3202
3203
3204
  	&am43xx_l3_s__usbotgss0,
  	&am43xx_l3_s__usbotgss1,
  	&am33xx_l4_ls__ocp2scp0,
  	&am33xx_l4_ls__ocp2scp1,
ea8c2409a   Sathya Prakash M R   ARM: OMAP2+: AM43...
3205
3206
3207
3208
  	&am43xx_dss__l3_main,
  	&am43xx_l4_ls__dss,
  	&am43xx_l4_ls__dss_dispc,
  	&am43xx_l4_ls__dss_rfbi,
e8efd2554   Benoit Parrot   ARM: AM437x: hwmo...
3209
3210
  	&am43xx_l3__vpfe0,
  	&am43xx_l3__vpfe1,
001e80c47   Sourav Poddar   arm: hwmod: am437...
3211
  	&am43xx_l4_ls__hdq1w,
487f390ff   Afzal Mohammed   ARM: OMAP2+: hwmo...
3212
3213
  	NULL,
  };
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3214
  static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3215
  	&am33xx_l3_main__emif,
bfa2fc658   Afzal Mohammed   ARM: OMAP2+: hwmo...
3216
3217
3218
3219
  	&am33xx_l3_main__debugss,
  	&am33xx_l4_hs__pruss,
  	&am33xx_l3_main__lcdc,
  	&am33xx_l3_s__usbss,
8e1020dae   Lokesh Vutla   ARM: AM4372: hwmo...
3220
  	&am33xx_l4_wkup__rtc,
bfa2fc658   Afzal Mohammed   ARM: OMAP2+: hwmo...
3221
3222
3223
3224
  	NULL,
  };
  
  static struct omap_hwmod_ocp_if *amx3xx_hwmod_ocp_ifs[] __initdata = {
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3225
3226
3227
3228
  	&am33xx_mpu__l3_main,
  	&am33xx_mpu__prcm,
  	&am33xx_l3_s__l4_ls,
  	&am33xx_l3_s__l4_wkup,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
  	&am33xx_l3_main__l4_hs,
  	&am33xx_l3_main__l3_s,
  	&am33xx_l3_main__l3_instr,
  	&am33xx_l3_main__gfx,
  	&am33xx_l3_s__l3_main,
  	&am33xx_pruss__l3_main,
  	&am33xx_wkup_m3__l4_wkup,
  	&am33xx_gfx__l3_main,
  	&am33xx_l4_wkup__wkup_m3,
  	&am33xx_l4_wkup__control,
  	&am33xx_l4_wkup__smartreflex0,
  	&am33xx_l4_wkup__smartreflex1,
  	&am33xx_l4_wkup__uart1,
  	&am33xx_l4_wkup__timer1,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3243
3244
3245
3246
  	&am33xx_l4_wkup__i2c1,
  	&am33xx_l4_wkup__gpio0,
  	&am33xx_l4_wkup__adc_tsc,
  	&am33xx_l4_wkup__wd_timer1,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3247
3248
3249
3250
3251
3252
3253
3254
3255
  	&am33xx_l4_per__dcan0,
  	&am33xx_l4_per__dcan1,
  	&am33xx_l4_per__gpio1,
  	&am33xx_l4_per__gpio2,
  	&am33xx_l4_per__gpio3,
  	&am33xx_l4_per__i2c2,
  	&am33xx_l4_per__i2c3,
  	&am33xx_l4_per__mailbox,
  	&am33xx_l4_ls__mcasp0,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3256
  	&am33xx_l4_ls__mcasp1,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
  	&am33xx_l4_ls__mmc0,
  	&am33xx_l4_ls__mmc1,
  	&am33xx_l3_s__mmc2,
  	&am33xx_l4_ls__timer2,
  	&am33xx_l4_ls__timer3,
  	&am33xx_l4_ls__timer4,
  	&am33xx_l4_ls__timer5,
  	&am33xx_l4_ls__timer6,
  	&am33xx_l4_ls__timer7,
  	&am33xx_l3_main__tpcc,
  	&am33xx_l4_ls__uart2,
  	&am33xx_l4_ls__uart3,
  	&am33xx_l4_ls__uart4,
  	&am33xx_l4_ls__uart5,
  	&am33xx_l4_ls__uart6,
  	&am33xx_l4_ls__spinlock,
  	&am33xx_l4_ls__elm,
9652d19af   Philip Avinash   ARM: OMAP: AM33xx...
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
  	&am33xx_l4_ls__epwmss0,
  	&am33xx_epwmss0__ecap0,
  	&am33xx_epwmss0__eqep0,
  	&am33xx_epwmss0__ehrpwm0,
  	&am33xx_l4_ls__epwmss1,
  	&am33xx_epwmss1__ecap1,
  	&am33xx_epwmss1__eqep1,
  	&am33xx_epwmss1__ehrpwm1,
  	&am33xx_l4_ls__epwmss2,
  	&am33xx_epwmss2__ecap2,
  	&am33xx_epwmss2__eqep2,
  	&am33xx_epwmss2__ehrpwm2,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3286
  	&am33xx_l3_s__gpmc,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3287
3288
3289
3290
3291
  	&am33xx_l4_ls__mcspi0,
  	&am33xx_l4_ls__mcspi1,
  	&am33xx_l3_main__tptc0,
  	&am33xx_l3_main__tptc1,
  	&am33xx_l3_main__tptc2,
ca903b6f9   Vaibhav Bedia   ARM: OMAP2+: AM33...
3292
  	&am33xx_l3_main__ocmc,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3293
  	&am33xx_l4_hs__cpgmac0,
70384a6af   Mugunthan V N   ARM: OMAP3+: hwmo...
3294
  	&am33xx_cpgmac0__mdio,
aec94bf5b   Mark A. Greer   ARM: AM33XX: hwmo...
3295
  	&am33xx_l3_main__sha0,
1cb804b93   Mark A. Greer   ARM: AM33XX: hwmo...
3296
  	&am33xx_l3_main__aes0,
e1ed5419b   Lokesh Vutla   ARM: AMx3xx: hwmo...
3297
  	&am33xx_l4_per__rng,
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3298
3299
3300
3301
3302
  	NULL,
  };
  
  int __init am33xx_hwmod_init(void)
  {
bfa2fc658   Afzal Mohammed   ARM: OMAP2+: hwmo...
3303
  	int ret;
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3304
  	omap_hwmod_init();
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3305
3306
3307
3308
3309
3310
3311
  
  	if (soc_is_am33xx()) {
  		am33xx_hwmod_clkctrl();
  		am33xx_hwmod_rstctrl();
  		am33xx_hwmod_rstst();
  		am33xx_hwmod_clockdomain();
  		am33xx_hwmod_ocpif_clk();
b312a716b   Afzal Mohammed   ARM: OMAP2+: hwmo...
3312
3313
3314
3315
3316
3317
  	} else {
  		am43xx_hwmod_clkctrl();
  		am43xx_hwmod_rstctrl();
  		am43xx_hwmod_rstst();
  		am43xx_hwmod_clockdomain();
  		am43xx_hwmod_ocpif_clk();
ab843e812   Afzal Mohammed   ARM: OMAP2+: hwmo...
3318
  	}
bfa2fc658   Afzal Mohammed   ARM: OMAP2+: hwmo...
3319
3320
3321
3322
3323
3324
  	ret = omap_hwmod_register_links(amx3xx_hwmod_ocp_ifs);
  	if (ret < 0)
  		return ret;
  
  	if (soc_is_am33xx())
  		return omap_hwmod_register_links(am33xx_hwmod_ocp_ifs);
487f390ff   Afzal Mohammed   ARM: OMAP2+: hwmo...
3325
3326
  	else
  		return omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
a2cfc509b   Vaibhav Hiremath   ARM: OMAP3+: hwmo...
3327
  }