Merge tag 'linux-kselftest-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / arch / arm / mach-omap2 / omap_hwmod_7xx_data.c
1 /*
2  * Hardware modules present on the DRA7xx chips
3  *
4  * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5  *
6  * Paul Walmsley
7  * Benoit Cousson
8  *
9  * This file is automatically generated from the OMAP hardware databases.
10  * We respectfully ask that any modifications to this file be coordinated
11  * with the public linux-omap@vger.kernel.org mailing list and the
12  * authors above to ensure that the autogeneration scripts are kept
13  * up-to-date with the file contents.
14  *
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License version 2 as
17  * published by the Free Software Foundation.
18  */
19
20 #include <linux/io.h>
21 #include <linux/platform_data/gpio-omap.h>
22 #include <linux/platform_data/hsmmc-omap.h>
23 #include <linux/power/smartreflex.h>
24 #include <linux/i2c-omap.h>
25
26 #include <linux/omap-dma.h>
27 #include <linux/platform_data/spi-omap2-mcspi.h>
28 #include <linux/platform_data/asoc-ti-mcbsp.h>
29 #include <plat/dmtimer.h>
30
31 #include "omap_hwmod.h"
32 #include "omap_hwmod_common_data.h"
33 #include "cm1_7xx.h"
34 #include "cm2_7xx.h"
35 #include "prm7xx.h"
36 #include "i2c.h"
37 #include "wd_timer.h"
38 #include "soc.h"
39
40 /* Base offset for all DRA7XX interrupts external to MPUSS */
41 #define DRA7XX_IRQ_GIC_START    32
42
43 /* Base offset for all DRA7XX dma requests */
44 #define DRA7XX_DMA_REQ_START    1
45
46
47 /*
48  * IP blocks
49  */
50
51 /*
52  * 'dmm' class
53  * instance(s): dmm
54  */
55 static struct omap_hwmod_class dra7xx_dmm_hwmod_class = {
56         .name   = "dmm",
57 };
58
59 /* dmm */
60 static struct omap_hwmod dra7xx_dmm_hwmod = {
61         .name           = "dmm",
62         .class          = &dra7xx_dmm_hwmod_class,
63         .clkdm_name     = "emif_clkdm",
64         .prcm = {
65                 .omap4 = {
66                         .clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
67                         .context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET,
68                 },
69         },
70 };
71
72 /*
73  * 'l3' class
74  * instance(s): l3_instr, l3_main_1, l3_main_2
75  */
76 static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
77         .name   = "l3",
78 };
79
80 /* l3_instr */
81 static struct omap_hwmod dra7xx_l3_instr_hwmod = {
82         .name           = "l3_instr",
83         .class          = &dra7xx_l3_hwmod_class,
84         .clkdm_name     = "l3instr_clkdm",
85         .prcm = {
86                 .omap4 = {
87                         .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
88                         .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
89                         .modulemode   = MODULEMODE_HWCTRL,
90                 },
91         },
92 };
93
94 /* l3_main_1 */
95 static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
96         .name           = "l3_main_1",
97         .class          = &dra7xx_l3_hwmod_class,
98         .clkdm_name     = "l3main1_clkdm",
99         .prcm = {
100                 .omap4 = {
101                         .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
102                         .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
103                 },
104         },
105 };
106
107 /* l3_main_2 */
108 static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
109         .name           = "l3_main_2",
110         .class          = &dra7xx_l3_hwmod_class,
111         .clkdm_name     = "l3instr_clkdm",
112         .prcm = {
113                 .omap4 = {
114                         .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
115                         .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
116                         .modulemode   = MODULEMODE_HWCTRL,
117                 },
118         },
119 };
120
121 /*
122  * 'l4' class
123  * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
124  */
125 static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
126         .name   = "l4",
127 };
128
129 /* l4_cfg */
130 static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
131         .name           = "l4_cfg",
132         .class          = &dra7xx_l4_hwmod_class,
133         .clkdm_name     = "l4cfg_clkdm",
134         .prcm = {
135                 .omap4 = {
136                         .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
137                         .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
138                 },
139         },
140 };
141
142 /* l4_per1 */
143 static struct omap_hwmod dra7xx_l4_per1_hwmod = {
144         .name           = "l4_per1",
145         .class          = &dra7xx_l4_hwmod_class,
146         .clkdm_name     = "l4per_clkdm",
147         .prcm = {
148                 .omap4 = {
149                         .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
150                         .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
151                 },
152         },
153 };
154
155 /* l4_per2 */
156 static struct omap_hwmod dra7xx_l4_per2_hwmod = {
157         .name           = "l4_per2",
158         .class          = &dra7xx_l4_hwmod_class,
159         .clkdm_name     = "l4per2_clkdm",
160         .prcm = {
161                 .omap4 = {
162                         .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
163                         .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
164                 },
165         },
166 };
167
168 /* l4_per3 */
169 static struct omap_hwmod dra7xx_l4_per3_hwmod = {
170         .name           = "l4_per3",
171         .class          = &dra7xx_l4_hwmod_class,
172         .clkdm_name     = "l4per3_clkdm",
173         .prcm = {
174                 .omap4 = {
175                         .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
176                         .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
177                 },
178         },
179 };
180
181 /* l4_wkup */
182 static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
183         .name           = "l4_wkup",
184         .class          = &dra7xx_l4_hwmod_class,
185         .clkdm_name     = "wkupaon_clkdm",
186         .prcm = {
187                 .omap4 = {
188                         .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
189                         .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
190                 },
191         },
192 };
193
194 /*
195  * 'atl' class
196  *
197  */
198
199 static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
200         .name   = "atl",
201 };
202
203 /* atl */
204 static struct omap_hwmod dra7xx_atl_hwmod = {
205         .name           = "atl",
206         .class          = &dra7xx_atl_hwmod_class,
207         .clkdm_name     = "atl_clkdm",
208         .main_clk       = "atl_gfclk_mux",
209         .prcm = {
210                 .omap4 = {
211                         .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
212                         .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
213                         .modulemode   = MODULEMODE_SWCTRL,
214                 },
215         },
216 };
217
218 /*
219  * 'bb2d' class
220  *
221  */
222
223 static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
224         .name   = "bb2d",
225 };
226
227 /* bb2d */
228 static struct omap_hwmod dra7xx_bb2d_hwmod = {
229         .name           = "bb2d",
230         .class          = &dra7xx_bb2d_hwmod_class,
231         .clkdm_name     = "dss_clkdm",
232         .main_clk       = "dpll_core_h24x2_ck",
233         .prcm = {
234                 .omap4 = {
235                         .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
236                         .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
237                         .modulemode   = MODULEMODE_SWCTRL,
238                 },
239         },
240 };
241
242 /*
243  * 'counter' class
244  *
245  */
246
247 static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
248         .rev_offs       = 0x0000,
249         .sysc_offs      = 0x0010,
250         .sysc_flags     = SYSC_HAS_SIDLEMODE,
251         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
252                            SIDLE_SMART_WKUP),
253         .sysc_fields    = &omap_hwmod_sysc_type1,
254 };
255
256 static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
257         .name   = "counter",
258         .sysc   = &dra7xx_counter_sysc,
259 };
260
261 /* counter_32k */
262 static struct omap_hwmod dra7xx_counter_32k_hwmod = {
263         .name           = "counter_32k",
264         .class          = &dra7xx_counter_hwmod_class,
265         .clkdm_name     = "wkupaon_clkdm",
266         .flags          = HWMOD_SWSUP_SIDLE,
267         .main_clk       = "wkupaon_iclk_mux",
268         .prcm = {
269                 .omap4 = {
270                         .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
271                         .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
272                 },
273         },
274 };
275
276 /*
277  * 'ctrl_module' class
278  *
279  */
280
281 static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
282         .name   = "ctrl_module",
283 };
284
285 /* ctrl_module_wkup */
286 static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
287         .name           = "ctrl_module_wkup",
288         .class          = &dra7xx_ctrl_module_hwmod_class,
289         .clkdm_name     = "wkupaon_clkdm",
290         .prcm = {
291                 .omap4 = {
292                         .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
293                 },
294         },
295 };
296
297 /*
298  * 'gmac' class
299  * cpsw/gmac sub system
300  */
301 static struct omap_hwmod_class_sysconfig dra7xx_gmac_sysc = {
302         .rev_offs       = 0x0,
303         .sysc_offs      = 0x8,
304         .syss_offs      = 0x4,
305         .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
306                            SYSS_HAS_RESET_STATUS),
307         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
308                            MSTANDBY_NO),
309         .sysc_fields    = &omap_hwmod_sysc_type3,
310 };
311
312 static struct omap_hwmod_class dra7xx_gmac_hwmod_class = {
313         .name           = "gmac",
314         .sysc           = &dra7xx_gmac_sysc,
315 };
316
317 static struct omap_hwmod dra7xx_gmac_hwmod = {
318         .name           = "gmac",
319         .class          = &dra7xx_gmac_hwmod_class,
320         .clkdm_name     = "gmac_clkdm",
321         .flags          = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
322         .main_clk       = "dpll_gmac_ck",
323         .mpu_rt_idx     = 1,
324         .prcm           = {
325                 .omap4  = {
326                         .clkctrl_offs   = DRA7XX_CM_GMAC_GMAC_CLKCTRL_OFFSET,
327                         .context_offs   = DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET,
328                         .modulemode     = MODULEMODE_SWCTRL,
329                 },
330         },
331 };
332
333 /*
334  * 'mdio' class
335  */
336 static struct omap_hwmod_class dra7xx_mdio_hwmod_class = {
337         .name           = "davinci_mdio",
338 };
339
340 static struct omap_hwmod dra7xx_mdio_hwmod = {
341         .name           = "davinci_mdio",
342         .class          = &dra7xx_mdio_hwmod_class,
343         .clkdm_name     = "gmac_clkdm",
344         .main_clk       = "dpll_gmac_ck",
345 };
346
347 /*
348  * 'dcan' class
349  *
350  */
351
352 static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
353         .name   = "dcan",
354 };
355
356 /* dcan1 */
357 static struct omap_hwmod dra7xx_dcan1_hwmod = {
358         .name           = "dcan1",
359         .class          = &dra7xx_dcan_hwmod_class,
360         .clkdm_name     = "wkupaon_clkdm",
361         .main_clk       = "dcan1_sys_clk_mux",
362         .flags          = HWMOD_CLKDM_NOAUTO,
363         .prcm = {
364                 .omap4 = {
365                         .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
366                         .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
367                         .modulemode   = MODULEMODE_SWCTRL,
368                 },
369         },
370 };
371
372 /* dcan2 */
373 static struct omap_hwmod dra7xx_dcan2_hwmod = {
374         .name           = "dcan2",
375         .class          = &dra7xx_dcan_hwmod_class,
376         .clkdm_name     = "l4per2_clkdm",
377         .main_clk       = "sys_clkin1",
378         .flags          = HWMOD_CLKDM_NOAUTO,
379         .prcm = {
380                 .omap4 = {
381                         .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
382                         .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
383                         .modulemode   = MODULEMODE_SWCTRL,
384                 },
385         },
386 };
387
388 /* pwmss  */
389 static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
390         .rev_offs       = 0x0,
391         .sysc_offs      = 0x4,
392         .sysc_flags     = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
393         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
394         .sysc_fields    = &omap_hwmod_sysc_type2,
395 };
396
397 /*
398  * epwmss class
399  */
400 static struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
401         .name           = "epwmss",
402         .sysc           = &dra7xx_epwmss_sysc,
403 };
404
405 /* epwmss0 */
406 static struct omap_hwmod dra7xx_epwmss0_hwmod = {
407         .name           = "epwmss0",
408         .class          = &dra7xx_epwmss_hwmod_class,
409         .clkdm_name     = "l4per2_clkdm",
410         .main_clk       = "l4_root_clk_div",
411         .prcm           = {
412                 .omap4  = {
413                         .modulemode     = MODULEMODE_SWCTRL,
414                         .clkctrl_offs   = DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
415                         .context_offs   = DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
416                 },
417         },
418 };
419
420 /* epwmss1 */
421 static struct omap_hwmod dra7xx_epwmss1_hwmod = {
422         .name           = "epwmss1",
423         .class          = &dra7xx_epwmss_hwmod_class,
424         .clkdm_name     = "l4per2_clkdm",
425         .main_clk       = "l4_root_clk_div",
426         .prcm           = {
427                 .omap4  = {
428                         .modulemode     = MODULEMODE_SWCTRL,
429                         .clkctrl_offs   = DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
430                         .context_offs   = DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
431                 },
432         },
433 };
434
435 /* epwmss2 */
436 static struct omap_hwmod dra7xx_epwmss2_hwmod = {
437         .name           = "epwmss2",
438         .class          = &dra7xx_epwmss_hwmod_class,
439         .clkdm_name     = "l4per2_clkdm",
440         .main_clk       = "l4_root_clk_div",
441         .prcm           = {
442                 .omap4  = {
443                         .modulemode     = MODULEMODE_SWCTRL,
444                         .clkctrl_offs   = DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
445                         .context_offs   = DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
446                 },
447         },
448 };
449
450 /*
451  * 'dma' class
452  *
453  */
454
455 static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
456         .rev_offs       = 0x0000,
457         .sysc_offs      = 0x002c,
458         .syss_offs      = 0x0028,
459         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
460                            SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
461                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
462                            SYSS_HAS_RESET_STATUS),
463         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
464                            SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
465                            MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
466         .sysc_fields    = &omap_hwmod_sysc_type1,
467 };
468
469 static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
470         .name   = "dma",
471         .sysc   = &dra7xx_dma_sysc,
472 };
473
474 /* dma dev_attr */
475 static struct omap_dma_dev_attr dma_dev_attr = {
476         .dev_caps       = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
477                           IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
478         .lch_count      = 32,
479 };
480
481 /* dma_system */
482 static struct omap_hwmod dra7xx_dma_system_hwmod = {
483         .name           = "dma_system",
484         .class          = &dra7xx_dma_hwmod_class,
485         .clkdm_name     = "dma_clkdm",
486         .main_clk       = "l3_iclk_div",
487         .prcm = {
488                 .omap4 = {
489                         .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
490                         .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
491                 },
492         },
493         .dev_attr       = &dma_dev_attr,
494 };
495
496 /*
497  * 'tpcc' class
498  *
499  */
500 static struct omap_hwmod_class dra7xx_tpcc_hwmod_class = {
501         .name           = "tpcc",
502 };
503
504 static struct omap_hwmod dra7xx_tpcc_hwmod = {
505         .name           = "tpcc",
506         .class          = &dra7xx_tpcc_hwmod_class,
507         .clkdm_name     = "l3main1_clkdm",
508         .main_clk       = "l3_iclk_div",
509         .prcm           = {
510                 .omap4  = {
511                         .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET,
512                         .context_offs = DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET,
513                 },
514         },
515 };
516
517 /*
518  * 'tptc' class
519  *
520  */
521 static struct omap_hwmod_class dra7xx_tptc_hwmod_class = {
522         .name           = "tptc",
523 };
524
525 /* tptc0 */
526 static struct omap_hwmod dra7xx_tptc0_hwmod = {
527         .name           = "tptc0",
528         .class          = &dra7xx_tptc_hwmod_class,
529         .clkdm_name     = "l3main1_clkdm",
530         .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
531         .main_clk       = "l3_iclk_div",
532         .prcm           = {
533                 .omap4  = {
534                         .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET,
535                         .context_offs = DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET,
536                         .modulemode   = MODULEMODE_HWCTRL,
537                 },
538         },
539 };
540
541 /* tptc1 */
542 static struct omap_hwmod dra7xx_tptc1_hwmod = {
543         .name           = "tptc1",
544         .class          = &dra7xx_tptc_hwmod_class,
545         .clkdm_name     = "l3main1_clkdm",
546         .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
547         .main_clk       = "l3_iclk_div",
548         .prcm           = {
549                 .omap4  = {
550                         .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET,
551                         .context_offs = DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET,
552                         .modulemode   = MODULEMODE_HWCTRL,
553                 },
554         },
555 };
556
557 /*
558  * 'dss' class
559  *
560  */
561
562 static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
563         .rev_offs       = 0x0000,
564         .syss_offs      = 0x0014,
565         .sysc_flags     = SYSS_HAS_RESET_STATUS,
566 };
567
568 static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
569         .name   = "dss",
570         .sysc   = &dra7xx_dss_sysc,
571         .reset  = omap_dss_reset,
572 };
573
574 /* dss */
575 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
576         { .role = "dss_clk", .clk = "dss_dss_clk" },
577         { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
578         { .role = "32khz_clk", .clk = "dss_32khz_clk" },
579         { .role = "video2_clk", .clk = "dss_video2_clk" },
580         { .role = "video1_clk", .clk = "dss_video1_clk" },
581         { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
582         { .role = "hdcp_clk", .clk = "dss_deshdcp_clk" },
583 };
584
585 static struct omap_hwmod dra7xx_dss_hwmod = {
586         .name           = "dss_core",
587         .class          = &dra7xx_dss_hwmod_class,
588         .clkdm_name     = "dss_clkdm",
589         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
590         .main_clk       = "dss_dss_clk",
591         .prcm = {
592                 .omap4 = {
593                         .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
594                         .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
595                         .modulemode   = MODULEMODE_SWCTRL,
596                 },
597         },
598         .opt_clks       = dss_opt_clks,
599         .opt_clks_cnt   = ARRAY_SIZE(dss_opt_clks),
600 };
601
602 /*
603  * 'dispc' class
604  * display controller
605  */
606
607 static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
608         .rev_offs       = 0x0000,
609         .sysc_offs      = 0x0010,
610         .syss_offs      = 0x0014,
611         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
612                            SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
613                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
614                            SYSS_HAS_RESET_STATUS),
615         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
616                            MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
617         .sysc_fields    = &omap_hwmod_sysc_type1,
618 };
619
620 static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
621         .name   = "dispc",
622         .sysc   = &dra7xx_dispc_sysc,
623 };
624
625 /* dss_dispc */
626 /* dss_dispc dev_attr */
627 static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
628         .has_framedonetv_irq    = 1,
629         .manager_count          = 4,
630 };
631
632 static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
633         .name           = "dss_dispc",
634         .class          = &dra7xx_dispc_hwmod_class,
635         .clkdm_name     = "dss_clkdm",
636         .main_clk       = "dss_dss_clk",
637         .prcm = {
638                 .omap4 = {
639                         .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
640                         .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
641                 },
642         },
643         .dev_attr       = &dss_dispc_dev_attr,
644         .parent_hwmod   = &dra7xx_dss_hwmod,
645 };
646
647 /*
648  * 'hdmi' class
649  * hdmi controller
650  */
651
652 static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
653         .rev_offs       = 0x0000,
654         .sysc_offs      = 0x0010,
655         .sysc_flags     = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
656                            SYSC_HAS_SOFTRESET),
657         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
658                            SIDLE_SMART_WKUP),
659         .sysc_fields    = &omap_hwmod_sysc_type2,
660 };
661
662 static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
663         .name   = "hdmi",
664         .sysc   = &dra7xx_hdmi_sysc,
665 };
666
667 /* dss_hdmi */
668
669 static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
670         { .role = "sys_clk", .clk = "dss_hdmi_clk" },
671 };
672
673 static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
674         .name           = "dss_hdmi",
675         .class          = &dra7xx_hdmi_hwmod_class,
676         .clkdm_name     = "dss_clkdm",
677         .main_clk       = "dss_48mhz_clk",
678         .prcm = {
679                 .omap4 = {
680                         .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
681                         .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
682                 },
683         },
684         .opt_clks       = dss_hdmi_opt_clks,
685         .opt_clks_cnt   = ARRAY_SIZE(dss_hdmi_opt_clks),
686         .parent_hwmod   = &dra7xx_dss_hwmod,
687 };
688
689 /* AES (the 'P' (public) device) */
690 static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
691         .rev_offs       = 0x0080,
692         .sysc_offs      = 0x0084,
693         .syss_offs      = 0x0088,
694         .sysc_flags     = SYSS_HAS_RESET_STATUS,
695 };
696
697 static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
698         .name   = "aes",
699         .sysc   = &dra7xx_aes_sysc,
700         .rev    = 2,
701 };
702
703 /* AES1 */
704 static struct omap_hwmod dra7xx_aes1_hwmod = {
705         .name           = "aes1",
706         .class          = &dra7xx_aes_hwmod_class,
707         .clkdm_name     = "l4sec_clkdm",
708         .main_clk       = "l3_iclk_div",
709         .prcm = {
710                 .omap4 = {
711                         .clkctrl_offs = DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET,
712                         .context_offs = DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET,
713                         .modulemode   = MODULEMODE_HWCTRL,
714                 },
715         },
716 };
717
718 /* AES2 */
719 static struct omap_hwmod dra7xx_aes2_hwmod = {
720         .name           = "aes2",
721         .class          = &dra7xx_aes_hwmod_class,
722         .clkdm_name     = "l4sec_clkdm",
723         .main_clk       = "l3_iclk_div",
724         .prcm = {
725                 .omap4 = {
726                         .clkctrl_offs = DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET,
727                         .context_offs = DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET,
728                         .modulemode   = MODULEMODE_HWCTRL,
729                 },
730         },
731 };
732
733 /* sha0 HIB2 (the 'P' (public) device) */
734 static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
735         .rev_offs       = 0x100,
736         .sysc_offs      = 0x110,
737         .syss_offs      = 0x114,
738         .sysc_flags     = SYSS_HAS_RESET_STATUS,
739 };
740
741 static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
742         .name           = "sham",
743         .sysc           = &dra7xx_sha0_sysc,
744         .rev            = 2,
745 };
746
747 struct omap_hwmod dra7xx_sha0_hwmod = {
748         .name           = "sham",
749         .class          = &dra7xx_sha0_hwmod_class,
750         .clkdm_name     = "l4sec_clkdm",
751         .main_clk       = "l3_iclk_div",
752         .prcm           = {
753                 .omap4 = {
754                         .clkctrl_offs = DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
755                         .context_offs = DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
756                         .modulemode   = MODULEMODE_HWCTRL,
757                 },
758         },
759 };
760
761 /*
762  * 'elm' class
763  *
764  */
765
766 static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
767         .rev_offs       = 0x0000,
768         .sysc_offs      = 0x0010,
769         .syss_offs      = 0x0014,
770         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
771                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
772                            SYSS_HAS_RESET_STATUS),
773         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
774                            SIDLE_SMART_WKUP),
775         .sysc_fields    = &omap_hwmod_sysc_type1,
776 };
777
778 static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
779         .name   = "elm",
780         .sysc   = &dra7xx_elm_sysc,
781 };
782
783 /* elm */
784
785 static struct omap_hwmod dra7xx_elm_hwmod = {
786         .name           = "elm",
787         .class          = &dra7xx_elm_hwmod_class,
788         .clkdm_name     = "l4per_clkdm",
789         .main_clk       = "l3_iclk_div",
790         .prcm = {
791                 .omap4 = {
792                         .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
793                         .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
794                 },
795         },
796 };
797
798 /*
799  * 'gpio' class
800  *
801  */
802
803 static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
804         .rev_offs       = 0x0000,
805         .sysc_offs      = 0x0010,
806         .syss_offs      = 0x0114,
807         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
808                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
809                            SYSS_HAS_RESET_STATUS),
810         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
811                            SIDLE_SMART_WKUP),
812         .sysc_fields    = &omap_hwmod_sysc_type1,
813 };
814
815 static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
816         .name   = "gpio",
817         .sysc   = &dra7xx_gpio_sysc,
818         .rev    = 2,
819 };
820
821 /* gpio dev_attr */
822 static struct omap_gpio_dev_attr gpio_dev_attr = {
823         .bank_width     = 32,
824         .dbck_flag      = true,
825 };
826
827 /* gpio1 */
828 static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
829         { .role = "dbclk", .clk = "gpio1_dbclk" },
830 };
831
832 static struct omap_hwmod dra7xx_gpio1_hwmod = {
833         .name           = "gpio1",
834         .class          = &dra7xx_gpio_hwmod_class,
835         .clkdm_name     = "wkupaon_clkdm",
836         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
837         .main_clk       = "wkupaon_iclk_mux",
838         .prcm = {
839                 .omap4 = {
840                         .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
841                         .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
842                         .modulemode   = MODULEMODE_HWCTRL,
843                 },
844         },
845         .opt_clks       = gpio1_opt_clks,
846         .opt_clks_cnt   = ARRAY_SIZE(gpio1_opt_clks),
847         .dev_attr       = &gpio_dev_attr,
848 };
849
850 /* gpio2 */
851 static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
852         { .role = "dbclk", .clk = "gpio2_dbclk" },
853 };
854
855 static struct omap_hwmod dra7xx_gpio2_hwmod = {
856         .name           = "gpio2",
857         .class          = &dra7xx_gpio_hwmod_class,
858         .clkdm_name     = "l4per_clkdm",
859         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
860         .main_clk       = "l3_iclk_div",
861         .prcm = {
862                 .omap4 = {
863                         .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
864                         .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
865                         .modulemode   = MODULEMODE_HWCTRL,
866                 },
867         },
868         .opt_clks       = gpio2_opt_clks,
869         .opt_clks_cnt   = ARRAY_SIZE(gpio2_opt_clks),
870         .dev_attr       = &gpio_dev_attr,
871 };
872
873 /* gpio3 */
874 static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
875         { .role = "dbclk", .clk = "gpio3_dbclk" },
876 };
877
878 static struct omap_hwmod dra7xx_gpio3_hwmod = {
879         .name           = "gpio3",
880         .class          = &dra7xx_gpio_hwmod_class,
881         .clkdm_name     = "l4per_clkdm",
882         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
883         .main_clk       = "l3_iclk_div",
884         .prcm = {
885                 .omap4 = {
886                         .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
887                         .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
888                         .modulemode   = MODULEMODE_HWCTRL,
889                 },
890         },
891         .opt_clks       = gpio3_opt_clks,
892         .opt_clks_cnt   = ARRAY_SIZE(gpio3_opt_clks),
893         .dev_attr       = &gpio_dev_attr,
894 };
895
896 /* gpio4 */
897 static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
898         { .role = "dbclk", .clk = "gpio4_dbclk" },
899 };
900
901 static struct omap_hwmod dra7xx_gpio4_hwmod = {
902         .name           = "gpio4",
903         .class          = &dra7xx_gpio_hwmod_class,
904         .clkdm_name     = "l4per_clkdm",
905         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
906         .main_clk       = "l3_iclk_div",
907         .prcm = {
908                 .omap4 = {
909                         .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
910                         .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
911                         .modulemode   = MODULEMODE_HWCTRL,
912                 },
913         },
914         .opt_clks       = gpio4_opt_clks,
915         .opt_clks_cnt   = ARRAY_SIZE(gpio4_opt_clks),
916         .dev_attr       = &gpio_dev_attr,
917 };
918
919 /* gpio5 */
920 static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
921         { .role = "dbclk", .clk = "gpio5_dbclk" },
922 };
923
924 static struct omap_hwmod dra7xx_gpio5_hwmod = {
925         .name           = "gpio5",
926         .class          = &dra7xx_gpio_hwmod_class,
927         .clkdm_name     = "l4per_clkdm",
928         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
929         .main_clk       = "l3_iclk_div",
930         .prcm = {
931                 .omap4 = {
932                         .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
933                         .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
934                         .modulemode   = MODULEMODE_HWCTRL,
935                 },
936         },
937         .opt_clks       = gpio5_opt_clks,
938         .opt_clks_cnt   = ARRAY_SIZE(gpio5_opt_clks),
939         .dev_attr       = &gpio_dev_attr,
940 };
941
942 /* gpio6 */
943 static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
944         { .role = "dbclk", .clk = "gpio6_dbclk" },
945 };
946
947 static struct omap_hwmod dra7xx_gpio6_hwmod = {
948         .name           = "gpio6",
949         .class          = &dra7xx_gpio_hwmod_class,
950         .clkdm_name     = "l4per_clkdm",
951         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
952         .main_clk       = "l3_iclk_div",
953         .prcm = {
954                 .omap4 = {
955                         .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
956                         .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
957                         .modulemode   = MODULEMODE_HWCTRL,
958                 },
959         },
960         .opt_clks       = gpio6_opt_clks,
961         .opt_clks_cnt   = ARRAY_SIZE(gpio6_opt_clks),
962         .dev_attr       = &gpio_dev_attr,
963 };
964
965 /* gpio7 */
966 static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
967         { .role = "dbclk", .clk = "gpio7_dbclk" },
968 };
969
970 static struct omap_hwmod dra7xx_gpio7_hwmod = {
971         .name           = "gpio7",
972         .class          = &dra7xx_gpio_hwmod_class,
973         .clkdm_name     = "l4per_clkdm",
974         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
975         .main_clk       = "l3_iclk_div",
976         .prcm = {
977                 .omap4 = {
978                         .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
979                         .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
980                         .modulemode   = MODULEMODE_HWCTRL,
981                 },
982         },
983         .opt_clks       = gpio7_opt_clks,
984         .opt_clks_cnt   = ARRAY_SIZE(gpio7_opt_clks),
985         .dev_attr       = &gpio_dev_attr,
986 };
987
988 /* gpio8 */
989 static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
990         { .role = "dbclk", .clk = "gpio8_dbclk" },
991 };
992
993 static struct omap_hwmod dra7xx_gpio8_hwmod = {
994         .name           = "gpio8",
995         .class          = &dra7xx_gpio_hwmod_class,
996         .clkdm_name     = "l4per_clkdm",
997         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
998         .main_clk       = "l3_iclk_div",
999         .prcm = {
1000                 .omap4 = {
1001                         .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
1002                         .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
1003                         .modulemode   = MODULEMODE_HWCTRL,
1004                 },
1005         },
1006         .opt_clks       = gpio8_opt_clks,
1007         .opt_clks_cnt   = ARRAY_SIZE(gpio8_opt_clks),
1008         .dev_attr       = &gpio_dev_attr,
1009 };
1010
1011 /*
1012  * 'gpmc' class
1013  *
1014  */
1015
1016 static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
1017         .rev_offs       = 0x0000,
1018         .sysc_offs      = 0x0010,
1019         .syss_offs      = 0x0014,
1020         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1021                            SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1022         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1023         .sysc_fields    = &omap_hwmod_sysc_type1,
1024 };
1025
1026 static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
1027         .name   = "gpmc",
1028         .sysc   = &dra7xx_gpmc_sysc,
1029 };
1030
1031 /* gpmc */
1032
1033 static struct omap_hwmod dra7xx_gpmc_hwmod = {
1034         .name           = "gpmc",
1035         .class          = &dra7xx_gpmc_hwmod_class,
1036         .clkdm_name     = "l3main1_clkdm",
1037         /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1038         .flags          = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
1039         .main_clk       = "l3_iclk_div",
1040         .prcm = {
1041                 .omap4 = {
1042                         .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
1043                         .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
1044                         .modulemode   = MODULEMODE_HWCTRL,
1045                 },
1046         },
1047 };
1048
1049 /*
1050  * 'hdq1w' class
1051  *
1052  */
1053
1054 static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
1055         .rev_offs       = 0x0000,
1056         .sysc_offs      = 0x0014,
1057         .syss_offs      = 0x0018,
1058         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
1059                            SYSS_HAS_RESET_STATUS),
1060         .sysc_fields    = &omap_hwmod_sysc_type1,
1061 };
1062
1063 static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
1064         .name   = "hdq1w",
1065         .sysc   = &dra7xx_hdq1w_sysc,
1066 };
1067
1068 /* hdq1w */
1069
1070 static struct omap_hwmod dra7xx_hdq1w_hwmod = {
1071         .name           = "hdq1w",
1072         .class          = &dra7xx_hdq1w_hwmod_class,
1073         .clkdm_name     = "l4per_clkdm",
1074         .flags          = HWMOD_INIT_NO_RESET,
1075         .main_clk       = "func_12m_fclk",
1076         .prcm = {
1077                 .omap4 = {
1078                         .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
1079                         .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
1080                         .modulemode   = MODULEMODE_SWCTRL,
1081                 },
1082         },
1083 };
1084
1085 /*
1086  * 'i2c' class
1087  *
1088  */
1089
1090 static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
1091         .sysc_offs      = 0x0010,
1092         .syss_offs      = 0x0090,
1093         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1094                            SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1095                            SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1096         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1097                            SIDLE_SMART_WKUP),
1098         .sysc_fields    = &omap_hwmod_sysc_type1,
1099 };
1100
1101 static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
1102         .name   = "i2c",
1103         .sysc   = &dra7xx_i2c_sysc,
1104         .reset  = &omap_i2c_reset,
1105         .rev    = OMAP_I2C_IP_VERSION_2,
1106 };
1107
1108 /* i2c dev_attr */
1109 static struct omap_i2c_dev_attr i2c_dev_attr = {
1110         .flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
1111 };
1112
1113 /* i2c1 */
1114 static struct omap_hwmod dra7xx_i2c1_hwmod = {
1115         .name           = "i2c1",
1116         .class          = &dra7xx_i2c_hwmod_class,
1117         .clkdm_name     = "l4per_clkdm",
1118         .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1119         .main_clk       = "func_96m_fclk",
1120         .prcm = {
1121                 .omap4 = {
1122                         .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
1123                         .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
1124                         .modulemode   = MODULEMODE_SWCTRL,
1125                 },
1126         },
1127         .dev_attr       = &i2c_dev_attr,
1128 };
1129
1130 /* i2c2 */
1131 static struct omap_hwmod dra7xx_i2c2_hwmod = {
1132         .name           = "i2c2",
1133         .class          = &dra7xx_i2c_hwmod_class,
1134         .clkdm_name     = "l4per_clkdm",
1135         .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1136         .main_clk       = "func_96m_fclk",
1137         .prcm = {
1138                 .omap4 = {
1139                         .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
1140                         .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
1141                         .modulemode   = MODULEMODE_SWCTRL,
1142                 },
1143         },
1144         .dev_attr       = &i2c_dev_attr,
1145 };
1146
1147 /* i2c3 */
1148 static struct omap_hwmod dra7xx_i2c3_hwmod = {
1149         .name           = "i2c3",
1150         .class          = &dra7xx_i2c_hwmod_class,
1151         .clkdm_name     = "l4per_clkdm",
1152         .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1153         .main_clk       = "func_96m_fclk",
1154         .prcm = {
1155                 .omap4 = {
1156                         .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
1157                         .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
1158                         .modulemode   = MODULEMODE_SWCTRL,
1159                 },
1160         },
1161         .dev_attr       = &i2c_dev_attr,
1162 };
1163
1164 /* i2c4 */
1165 static struct omap_hwmod dra7xx_i2c4_hwmod = {
1166         .name           = "i2c4",
1167         .class          = &dra7xx_i2c_hwmod_class,
1168         .clkdm_name     = "l4per_clkdm",
1169         .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1170         .main_clk       = "func_96m_fclk",
1171         .prcm = {
1172                 .omap4 = {
1173                         .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
1174                         .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
1175                         .modulemode   = MODULEMODE_SWCTRL,
1176                 },
1177         },
1178         .dev_attr       = &i2c_dev_attr,
1179 };
1180
1181 /* i2c5 */
1182 static struct omap_hwmod dra7xx_i2c5_hwmod = {
1183         .name           = "i2c5",
1184         .class          = &dra7xx_i2c_hwmod_class,
1185         .clkdm_name     = "ipu_clkdm",
1186         .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1187         .main_clk       = "func_96m_fclk",
1188         .prcm = {
1189                 .omap4 = {
1190                         .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
1191                         .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
1192                         .modulemode   = MODULEMODE_SWCTRL,
1193                 },
1194         },
1195         .dev_attr       = &i2c_dev_attr,
1196 };
1197
1198 /*
1199  * 'mailbox' class
1200  *
1201  */
1202
1203 static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
1204         .rev_offs       = 0x0000,
1205         .sysc_offs      = 0x0010,
1206         .sysc_flags     = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1207                            SYSC_HAS_SOFTRESET),
1208         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1209         .sysc_fields    = &omap_hwmod_sysc_type2,
1210 };
1211
1212 static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
1213         .name   = "mailbox",
1214         .sysc   = &dra7xx_mailbox_sysc,
1215 };
1216
1217 /* mailbox1 */
1218 static struct omap_hwmod dra7xx_mailbox1_hwmod = {
1219         .name           = "mailbox1",
1220         .class          = &dra7xx_mailbox_hwmod_class,
1221         .clkdm_name     = "l4cfg_clkdm",
1222         .prcm = {
1223                 .omap4 = {
1224                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
1225                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
1226                 },
1227         },
1228 };
1229
1230 /* mailbox2 */
1231 static struct omap_hwmod dra7xx_mailbox2_hwmod = {
1232         .name           = "mailbox2",
1233         .class          = &dra7xx_mailbox_hwmod_class,
1234         .clkdm_name     = "l4cfg_clkdm",
1235         .prcm = {
1236                 .omap4 = {
1237                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
1238                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
1239                 },
1240         },
1241 };
1242
1243 /* mailbox3 */
1244 static struct omap_hwmod dra7xx_mailbox3_hwmod = {
1245         .name           = "mailbox3",
1246         .class          = &dra7xx_mailbox_hwmod_class,
1247         .clkdm_name     = "l4cfg_clkdm",
1248         .prcm = {
1249                 .omap4 = {
1250                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
1251                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
1252                 },
1253         },
1254 };
1255
1256 /* mailbox4 */
1257 static struct omap_hwmod dra7xx_mailbox4_hwmod = {
1258         .name           = "mailbox4",
1259         .class          = &dra7xx_mailbox_hwmod_class,
1260         .clkdm_name     = "l4cfg_clkdm",
1261         .prcm = {
1262                 .omap4 = {
1263                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
1264                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
1265                 },
1266         },
1267 };
1268
1269 /* mailbox5 */
1270 static struct omap_hwmod dra7xx_mailbox5_hwmod = {
1271         .name           = "mailbox5",
1272         .class          = &dra7xx_mailbox_hwmod_class,
1273         .clkdm_name     = "l4cfg_clkdm",
1274         .prcm = {
1275                 .omap4 = {
1276                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
1277                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
1278                 },
1279         },
1280 };
1281
1282 /* mailbox6 */
1283 static struct omap_hwmod dra7xx_mailbox6_hwmod = {
1284         .name           = "mailbox6",
1285         .class          = &dra7xx_mailbox_hwmod_class,
1286         .clkdm_name     = "l4cfg_clkdm",
1287         .prcm = {
1288                 .omap4 = {
1289                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
1290                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
1291                 },
1292         },
1293 };
1294
1295 /* mailbox7 */
1296 static struct omap_hwmod dra7xx_mailbox7_hwmod = {
1297         .name           = "mailbox7",
1298         .class          = &dra7xx_mailbox_hwmod_class,
1299         .clkdm_name     = "l4cfg_clkdm",
1300         .prcm = {
1301                 .omap4 = {
1302                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
1303                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
1304                 },
1305         },
1306 };
1307
1308 /* mailbox8 */
1309 static struct omap_hwmod dra7xx_mailbox8_hwmod = {
1310         .name           = "mailbox8",
1311         .class          = &dra7xx_mailbox_hwmod_class,
1312         .clkdm_name     = "l4cfg_clkdm",
1313         .prcm = {
1314                 .omap4 = {
1315                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
1316                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
1317                 },
1318         },
1319 };
1320
1321 /* mailbox9 */
1322 static struct omap_hwmod dra7xx_mailbox9_hwmod = {
1323         .name           = "mailbox9",
1324         .class          = &dra7xx_mailbox_hwmod_class,
1325         .clkdm_name     = "l4cfg_clkdm",
1326         .prcm = {
1327                 .omap4 = {
1328                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
1329                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
1330                 },
1331         },
1332 };
1333
1334 /* mailbox10 */
1335 static struct omap_hwmod dra7xx_mailbox10_hwmod = {
1336         .name           = "mailbox10",
1337         .class          = &dra7xx_mailbox_hwmod_class,
1338         .clkdm_name     = "l4cfg_clkdm",
1339         .prcm = {
1340                 .omap4 = {
1341                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
1342                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
1343                 },
1344         },
1345 };
1346
1347 /* mailbox11 */
1348 static struct omap_hwmod dra7xx_mailbox11_hwmod = {
1349         .name           = "mailbox11",
1350         .class          = &dra7xx_mailbox_hwmod_class,
1351         .clkdm_name     = "l4cfg_clkdm",
1352         .prcm = {
1353                 .omap4 = {
1354                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
1355                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
1356                 },
1357         },
1358 };
1359
1360 /* mailbox12 */
1361 static struct omap_hwmod dra7xx_mailbox12_hwmod = {
1362         .name           = "mailbox12",
1363         .class          = &dra7xx_mailbox_hwmod_class,
1364         .clkdm_name     = "l4cfg_clkdm",
1365         .prcm = {
1366                 .omap4 = {
1367                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
1368                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
1369                 },
1370         },
1371 };
1372
1373 /* mailbox13 */
1374 static struct omap_hwmod dra7xx_mailbox13_hwmod = {
1375         .name           = "mailbox13",
1376         .class          = &dra7xx_mailbox_hwmod_class,
1377         .clkdm_name     = "l4cfg_clkdm",
1378         .prcm = {
1379                 .omap4 = {
1380                         .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
1381                         .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
1382                 },
1383         },
1384 };
1385
1386 /*
1387  * 'mcspi' class
1388  *
1389  */
1390
1391 static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
1392         .rev_offs       = 0x0000,
1393         .sysc_offs      = 0x0010,
1394         .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1395                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1396         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1397                            SIDLE_SMART_WKUP),
1398         .sysc_fields    = &omap_hwmod_sysc_type2,
1399 };
1400
1401 static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
1402         .name   = "mcspi",
1403         .sysc   = &dra7xx_mcspi_sysc,
1404         .rev    = OMAP4_MCSPI_REV,
1405 };
1406
1407 /* mcspi1 */
1408 /* mcspi1 dev_attr */
1409 static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
1410         .num_chipselect = 4,
1411 };
1412
1413 static struct omap_hwmod dra7xx_mcspi1_hwmod = {
1414         .name           = "mcspi1",
1415         .class          = &dra7xx_mcspi_hwmod_class,
1416         .clkdm_name     = "l4per_clkdm",
1417         .main_clk       = "func_48m_fclk",
1418         .prcm = {
1419                 .omap4 = {
1420                         .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
1421                         .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
1422                         .modulemode   = MODULEMODE_SWCTRL,
1423                 },
1424         },
1425         .dev_attr       = &mcspi1_dev_attr,
1426 };
1427
1428 /* mcspi2 */
1429 /* mcspi2 dev_attr */
1430 static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
1431         .num_chipselect = 2,
1432 };
1433
1434 static struct omap_hwmod dra7xx_mcspi2_hwmod = {
1435         .name           = "mcspi2",
1436         .class          = &dra7xx_mcspi_hwmod_class,
1437         .clkdm_name     = "l4per_clkdm",
1438         .main_clk       = "func_48m_fclk",
1439         .prcm = {
1440                 .omap4 = {
1441                         .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
1442                         .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
1443                         .modulemode   = MODULEMODE_SWCTRL,
1444                 },
1445         },
1446         .dev_attr       = &mcspi2_dev_attr,
1447 };
1448
1449 /* mcspi3 */
1450 /* mcspi3 dev_attr */
1451 static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
1452         .num_chipselect = 2,
1453 };
1454
1455 static struct omap_hwmod dra7xx_mcspi3_hwmod = {
1456         .name           = "mcspi3",
1457         .class          = &dra7xx_mcspi_hwmod_class,
1458         .clkdm_name     = "l4per_clkdm",
1459         .main_clk       = "func_48m_fclk",
1460         .prcm = {
1461                 .omap4 = {
1462                         .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
1463                         .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
1464                         .modulemode   = MODULEMODE_SWCTRL,
1465                 },
1466         },
1467         .dev_attr       = &mcspi3_dev_attr,
1468 };
1469
1470 /* mcspi4 */
1471 /* mcspi4 dev_attr */
1472 static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
1473         .num_chipselect = 1,
1474 };
1475
1476 static struct omap_hwmod dra7xx_mcspi4_hwmod = {
1477         .name           = "mcspi4",
1478         .class          = &dra7xx_mcspi_hwmod_class,
1479         .clkdm_name     = "l4per_clkdm",
1480         .main_clk       = "func_48m_fclk",
1481         .prcm = {
1482                 .omap4 = {
1483                         .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
1484                         .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
1485                         .modulemode   = MODULEMODE_SWCTRL,
1486                 },
1487         },
1488         .dev_attr       = &mcspi4_dev_attr,
1489 };
1490
1491 /*
1492  * 'mcasp' class
1493  *
1494  */
1495 static struct omap_hwmod_class_sysconfig dra7xx_mcasp_sysc = {
1496         .sysc_offs      = 0x0004,
1497         .sysc_flags     = SYSC_HAS_SIDLEMODE,
1498         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1499         .sysc_fields    = &omap_hwmod_sysc_type3,
1500 };
1501
1502 static struct omap_hwmod_class dra7xx_mcasp_hwmod_class = {
1503         .name   = "mcasp",
1504         .sysc   = &dra7xx_mcasp_sysc,
1505 };
1506
1507 /* mcasp1 */
1508 static struct omap_hwmod_opt_clk mcasp1_opt_clks[] = {
1509         { .role = "ahclkx", .clk = "mcasp1_ahclkx_mux" },
1510         { .role = "ahclkr", .clk = "mcasp1_ahclkr_mux" },
1511 };
1512
1513 static struct omap_hwmod dra7xx_mcasp1_hwmod = {
1514         .name           = "mcasp1",
1515         .class          = &dra7xx_mcasp_hwmod_class,
1516         .clkdm_name     = "ipu_clkdm",
1517         .main_clk       = "mcasp1_aux_gfclk_mux",
1518         .flags          = HWMOD_OPT_CLKS_NEEDED,
1519         .prcm = {
1520                 .omap4 = {
1521                         .clkctrl_offs = DRA7XX_CM_IPU_MCASP1_CLKCTRL_OFFSET,
1522                         .context_offs = DRA7XX_RM_IPU_MCASP1_CONTEXT_OFFSET,
1523                         .modulemode   = MODULEMODE_SWCTRL,
1524                 },
1525         },
1526         .opt_clks       = mcasp1_opt_clks,
1527         .opt_clks_cnt   = ARRAY_SIZE(mcasp1_opt_clks),
1528 };
1529
1530 /* mcasp2 */
1531 static struct omap_hwmod_opt_clk mcasp2_opt_clks[] = {
1532         { .role = "ahclkx", .clk = "mcasp2_ahclkx_mux" },
1533         { .role = "ahclkr", .clk = "mcasp2_ahclkr_mux" },
1534 };
1535
1536 static struct omap_hwmod dra7xx_mcasp2_hwmod = {
1537         .name           = "mcasp2",
1538         .class          = &dra7xx_mcasp_hwmod_class,
1539         .clkdm_name     = "l4per2_clkdm",
1540         .main_clk       = "mcasp2_aux_gfclk_mux",
1541         .flags          = HWMOD_OPT_CLKS_NEEDED,
1542         .prcm = {
1543                 .omap4 = {
1544                         .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP2_CLKCTRL_OFFSET,
1545                         .context_offs = DRA7XX_RM_L4PER2_MCASP2_CONTEXT_OFFSET,
1546                         .modulemode   = MODULEMODE_SWCTRL,
1547                 },
1548         },
1549         .opt_clks       = mcasp2_opt_clks,
1550         .opt_clks_cnt   = ARRAY_SIZE(mcasp2_opt_clks),
1551 };
1552
1553 /* mcasp3 */
1554 static struct omap_hwmod_opt_clk mcasp3_opt_clks[] = {
1555         { .role = "ahclkx", .clk = "mcasp3_ahclkx_mux" },
1556 };
1557
1558 static struct omap_hwmod dra7xx_mcasp3_hwmod = {
1559         .name           = "mcasp3",
1560         .class          = &dra7xx_mcasp_hwmod_class,
1561         .clkdm_name     = "l4per2_clkdm",
1562         .main_clk       = "mcasp3_aux_gfclk_mux",
1563         .flags          = HWMOD_OPT_CLKS_NEEDED,
1564         .prcm = {
1565                 .omap4 = {
1566                         .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET,
1567                         .context_offs = DRA7XX_RM_L4PER2_MCASP3_CONTEXT_OFFSET,
1568                         .modulemode   = MODULEMODE_SWCTRL,
1569                 },
1570         },
1571         .opt_clks       = mcasp3_opt_clks,
1572         .opt_clks_cnt   = ARRAY_SIZE(mcasp3_opt_clks),
1573 };
1574
1575 /* mcasp4 */
1576 static struct omap_hwmod_opt_clk mcasp4_opt_clks[] = {
1577         { .role = "ahclkx", .clk = "mcasp4_ahclkx_mux" },
1578 };
1579
1580 static struct omap_hwmod dra7xx_mcasp4_hwmod = {
1581         .name           = "mcasp4",
1582         .class          = &dra7xx_mcasp_hwmod_class,
1583         .clkdm_name     = "l4per2_clkdm",
1584         .main_clk       = "mcasp4_aux_gfclk_mux",
1585         .flags          = HWMOD_OPT_CLKS_NEEDED,
1586         .prcm = {
1587                 .omap4 = {
1588                         .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP4_CLKCTRL_OFFSET,
1589                         .context_offs = DRA7XX_RM_L4PER2_MCASP4_CONTEXT_OFFSET,
1590                         .modulemode   = MODULEMODE_SWCTRL,
1591                 },
1592         },
1593         .opt_clks       = mcasp4_opt_clks,
1594         .opt_clks_cnt   = ARRAY_SIZE(mcasp4_opt_clks),
1595 };
1596
1597 /* mcasp5 */
1598 static struct omap_hwmod_opt_clk mcasp5_opt_clks[] = {
1599         { .role = "ahclkx", .clk = "mcasp5_ahclkx_mux" },
1600 };
1601
1602 static struct omap_hwmod dra7xx_mcasp5_hwmod = {
1603         .name           = "mcasp5",
1604         .class          = &dra7xx_mcasp_hwmod_class,
1605         .clkdm_name     = "l4per2_clkdm",
1606         .main_clk       = "mcasp5_aux_gfclk_mux",
1607         .flags          = HWMOD_OPT_CLKS_NEEDED,
1608         .prcm = {
1609                 .omap4 = {
1610                         .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP5_CLKCTRL_OFFSET,
1611                         .context_offs = DRA7XX_RM_L4PER2_MCASP5_CONTEXT_OFFSET,
1612                         .modulemode   = MODULEMODE_SWCTRL,
1613                 },
1614         },
1615         .opt_clks       = mcasp5_opt_clks,
1616         .opt_clks_cnt   = ARRAY_SIZE(mcasp5_opt_clks),
1617 };
1618
1619 /* mcasp6 */
1620 static struct omap_hwmod_opt_clk mcasp6_opt_clks[] = {
1621         { .role = "ahclkx", .clk = "mcasp6_ahclkx_mux" },
1622 };
1623
1624 static struct omap_hwmod dra7xx_mcasp6_hwmod = {
1625         .name           = "mcasp6",
1626         .class          = &dra7xx_mcasp_hwmod_class,
1627         .clkdm_name     = "l4per2_clkdm",
1628         .main_clk       = "mcasp6_aux_gfclk_mux",
1629         .flags          = HWMOD_OPT_CLKS_NEEDED,
1630         .prcm = {
1631                 .omap4 = {
1632                         .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP6_CLKCTRL_OFFSET,
1633                         .context_offs = DRA7XX_RM_L4PER2_MCASP6_CONTEXT_OFFSET,
1634                         .modulemode   = MODULEMODE_SWCTRL,
1635                 },
1636         },
1637         .opt_clks       = mcasp6_opt_clks,
1638         .opt_clks_cnt   = ARRAY_SIZE(mcasp6_opt_clks),
1639 };
1640
1641 /* mcasp7 */
1642 static struct omap_hwmod_opt_clk mcasp7_opt_clks[] = {
1643         { .role = "ahclkx", .clk = "mcasp7_ahclkx_mux" },
1644 };
1645
1646 static struct omap_hwmod dra7xx_mcasp7_hwmod = {
1647         .name           = "mcasp7",
1648         .class          = &dra7xx_mcasp_hwmod_class,
1649         .clkdm_name     = "l4per2_clkdm",
1650         .main_clk       = "mcasp7_aux_gfclk_mux",
1651         .flags          = HWMOD_OPT_CLKS_NEEDED,
1652         .prcm = {
1653                 .omap4 = {
1654                         .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP7_CLKCTRL_OFFSET,
1655                         .context_offs = DRA7XX_RM_L4PER2_MCASP7_CONTEXT_OFFSET,
1656                         .modulemode   = MODULEMODE_SWCTRL,
1657                 },
1658         },
1659         .opt_clks       = mcasp7_opt_clks,
1660         .opt_clks_cnt   = ARRAY_SIZE(mcasp7_opt_clks),
1661 };
1662
1663 /* mcasp8 */
1664 static struct omap_hwmod_opt_clk mcasp8_opt_clks[] = {
1665         { .role = "ahclkx", .clk = "mcasp8_ahclkx_mux" },
1666 };
1667
1668 static struct omap_hwmod dra7xx_mcasp8_hwmod = {
1669         .name           = "mcasp8",
1670         .class          = &dra7xx_mcasp_hwmod_class,
1671         .clkdm_name     = "l4per2_clkdm",
1672         .main_clk       = "mcasp8_aux_gfclk_mux",
1673         .flags          = HWMOD_OPT_CLKS_NEEDED,
1674         .prcm = {
1675                 .omap4 = {
1676                         .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP8_CLKCTRL_OFFSET,
1677                         .context_offs = DRA7XX_RM_L4PER2_MCASP8_CONTEXT_OFFSET,
1678                         .modulemode   = MODULEMODE_SWCTRL,
1679                 },
1680         },
1681         .opt_clks       = mcasp8_opt_clks,
1682         .opt_clks_cnt   = ARRAY_SIZE(mcasp8_opt_clks),
1683 };
1684
1685 /*
1686  * 'mmc' class
1687  *
1688  */
1689
1690 static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
1691         .rev_offs       = 0x0000,
1692         .sysc_offs      = 0x0010,
1693         .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
1694                            SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1695                            SYSC_HAS_SOFTRESET),
1696         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1697                            SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1698                            MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1699         .sysc_fields    = &omap_hwmod_sysc_type2,
1700 };
1701
1702 static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
1703         .name   = "mmc",
1704         .sysc   = &dra7xx_mmc_sysc,
1705 };
1706
1707 /* mmc1 */
1708 static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
1709         { .role = "clk32k", .clk = "mmc1_clk32k" },
1710 };
1711
1712 /* mmc1 dev_attr */
1713 static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
1714         .flags  = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1715 };
1716
1717 static struct omap_hwmod dra7xx_mmc1_hwmod = {
1718         .name           = "mmc1",
1719         .class          = &dra7xx_mmc_hwmod_class,
1720         .clkdm_name     = "l3init_clkdm",
1721         .main_clk       = "mmc1_fclk_div",
1722         .prcm = {
1723                 .omap4 = {
1724                         .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
1725                         .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
1726                         .modulemode   = MODULEMODE_SWCTRL,
1727                 },
1728         },
1729         .opt_clks       = mmc1_opt_clks,
1730         .opt_clks_cnt   = ARRAY_SIZE(mmc1_opt_clks),
1731         .dev_attr       = &mmc1_dev_attr,
1732 };
1733
1734 /* mmc2 */
1735 static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
1736         { .role = "clk32k", .clk = "mmc2_clk32k" },
1737 };
1738
1739 static struct omap_hwmod dra7xx_mmc2_hwmod = {
1740         .name           = "mmc2",
1741         .class          = &dra7xx_mmc_hwmod_class,
1742         .clkdm_name     = "l3init_clkdm",
1743         .main_clk       = "mmc2_fclk_div",
1744         .prcm = {
1745                 .omap4 = {
1746                         .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
1747                         .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
1748                         .modulemode   = MODULEMODE_SWCTRL,
1749                 },
1750         },
1751         .opt_clks       = mmc2_opt_clks,
1752         .opt_clks_cnt   = ARRAY_SIZE(mmc2_opt_clks),
1753 };
1754
1755 /* mmc3 */
1756 static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
1757         { .role = "clk32k", .clk = "mmc3_clk32k" },
1758 };
1759
1760 static struct omap_hwmod dra7xx_mmc3_hwmod = {
1761         .name           = "mmc3",
1762         .class          = &dra7xx_mmc_hwmod_class,
1763         .clkdm_name     = "l4per_clkdm",
1764         .main_clk       = "mmc3_gfclk_div",
1765         .prcm = {
1766                 .omap4 = {
1767                         .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
1768                         .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
1769                         .modulemode   = MODULEMODE_SWCTRL,
1770                 },
1771         },
1772         .opt_clks       = mmc3_opt_clks,
1773         .opt_clks_cnt   = ARRAY_SIZE(mmc3_opt_clks),
1774 };
1775
1776 /* mmc4 */
1777 static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
1778         { .role = "clk32k", .clk = "mmc4_clk32k" },
1779 };
1780
1781 static struct omap_hwmod dra7xx_mmc4_hwmod = {
1782         .name           = "mmc4",
1783         .class          = &dra7xx_mmc_hwmod_class,
1784         .clkdm_name     = "l4per_clkdm",
1785         .main_clk       = "mmc4_gfclk_div",
1786         .prcm = {
1787                 .omap4 = {
1788                         .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
1789                         .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
1790                         .modulemode   = MODULEMODE_SWCTRL,
1791                 },
1792         },
1793         .opt_clks       = mmc4_opt_clks,
1794         .opt_clks_cnt   = ARRAY_SIZE(mmc4_opt_clks),
1795 };
1796
1797 /*
1798  * 'mpu' class
1799  *
1800  */
1801
1802 static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
1803         .name   = "mpu",
1804 };
1805
1806 /* mpu */
1807 static struct omap_hwmod dra7xx_mpu_hwmod = {
1808         .name           = "mpu",
1809         .class          = &dra7xx_mpu_hwmod_class,
1810         .clkdm_name     = "mpu_clkdm",
1811         .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1812         .main_clk       = "dpll_mpu_m2_ck",
1813         .prcm = {
1814                 .omap4 = {
1815                         .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
1816                         .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
1817                 },
1818         },
1819 };
1820
1821 /*
1822  * 'ocp2scp' class
1823  *
1824  */
1825
1826 static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
1827         .rev_offs       = 0x0000,
1828         .sysc_offs      = 0x0010,
1829         .syss_offs      = 0x0014,
1830         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1831                            SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1832         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1833         .sysc_fields    = &omap_hwmod_sysc_type1,
1834 };
1835
1836 static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
1837         .name   = "ocp2scp",
1838         .sysc   = &dra7xx_ocp2scp_sysc,
1839 };
1840
1841 /* ocp2scp1 */
1842 static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
1843         .name           = "ocp2scp1",
1844         .class          = &dra7xx_ocp2scp_hwmod_class,
1845         .clkdm_name     = "l3init_clkdm",
1846         .main_clk       = "l4_root_clk_div",
1847         .prcm = {
1848                 .omap4 = {
1849                         .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
1850                         .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
1851                         .modulemode   = MODULEMODE_HWCTRL,
1852                 },
1853         },
1854 };
1855
1856 /* ocp2scp3 */
1857 static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
1858         .name           = "ocp2scp3",
1859         .class          = &dra7xx_ocp2scp_hwmod_class,
1860         .clkdm_name     = "l3init_clkdm",
1861         .main_clk       = "l4_root_clk_div",
1862         .prcm = {
1863                 .omap4 = {
1864                         .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
1865                         .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
1866                         .modulemode   = MODULEMODE_HWCTRL,
1867                 },
1868         },
1869 };
1870
1871 /*
1872  * 'PCIE' class
1873  *
1874  */
1875
1876 /*
1877  * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
1878  * functionality of OMAP HWMOD layer does not deassert the hardreset lines
1879  * associated with an IP automatically leaving the driver to handle that
1880  * by itself. This does not work for PCIeSS which needs the reset lines
1881  * deasserted for the driver to start accessing registers.
1882  *
1883  * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
1884  * lines after asserting them.
1885  */
1886 static int dra7xx_pciess_reset(struct omap_hwmod *oh)
1887 {
1888         int i;
1889
1890         for (i = 0; i < oh->rst_lines_cnt; i++) {
1891                 omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
1892                 omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
1893         }
1894
1895         return 0;
1896 }
1897
1898 static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
1899         .name   = "pcie",
1900         .reset  = dra7xx_pciess_reset,
1901 };
1902
1903 /* pcie1 */
1904 static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
1905         { .name = "pcie", .rst_shift = 0 },
1906 };
1907
1908 static struct omap_hwmod dra7xx_pciess1_hwmod = {
1909         .name           = "pcie1",
1910         .class          = &dra7xx_pciess_hwmod_class,
1911         .clkdm_name     = "pcie_clkdm",
1912         .rst_lines      = dra7xx_pciess1_resets,
1913         .rst_lines_cnt  = ARRAY_SIZE(dra7xx_pciess1_resets),
1914         .main_clk       = "l4_root_clk_div",
1915         .prcm = {
1916                 .omap4 = {
1917                         .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
1918                         .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
1919                         .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
1920                         .modulemode   = MODULEMODE_SWCTRL,
1921                 },
1922         },
1923 };
1924
1925 /* pcie2 */
1926 static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
1927         { .name = "pcie", .rst_shift = 1 },
1928 };
1929
1930 /* pcie2 */
1931 static struct omap_hwmod dra7xx_pciess2_hwmod = {
1932         .name           = "pcie2",
1933         .class          = &dra7xx_pciess_hwmod_class,
1934         .clkdm_name     = "pcie_clkdm",
1935         .rst_lines      = dra7xx_pciess2_resets,
1936         .rst_lines_cnt  = ARRAY_SIZE(dra7xx_pciess2_resets),
1937         .main_clk       = "l4_root_clk_div",
1938         .prcm = {
1939                 .omap4 = {
1940                         .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
1941                         .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
1942                         .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
1943                         .modulemode   = MODULEMODE_SWCTRL,
1944                 },
1945         },
1946 };
1947
1948 /*
1949  * 'qspi' class
1950  *
1951  */
1952
1953 static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
1954         .sysc_offs      = 0x0010,
1955         .sysc_flags     = SYSC_HAS_SIDLEMODE,
1956         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1957                            SIDLE_SMART_WKUP),
1958         .sysc_fields    = &omap_hwmod_sysc_type2,
1959 };
1960
1961 static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
1962         .name   = "qspi",
1963         .sysc   = &dra7xx_qspi_sysc,
1964 };
1965
1966 /* qspi */
1967 static struct omap_hwmod dra7xx_qspi_hwmod = {
1968         .name           = "qspi",
1969         .class          = &dra7xx_qspi_hwmod_class,
1970         .clkdm_name     = "l4per2_clkdm",
1971         .main_clk       = "qspi_gfclk_div",
1972         .prcm = {
1973                 .omap4 = {
1974                         .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
1975                         .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
1976                         .modulemode   = MODULEMODE_SWCTRL,
1977                 },
1978         },
1979 };
1980
1981 /*
1982  * 'rtcss' class
1983  *
1984  */
1985 static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
1986         .sysc_offs      = 0x0078,
1987         .sysc_flags     = SYSC_HAS_SIDLEMODE,
1988         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1989                            SIDLE_SMART_WKUP),
1990         .sysc_fields    = &omap_hwmod_sysc_type3,
1991 };
1992
1993 static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
1994         .name   = "rtcss",
1995         .sysc   = &dra7xx_rtcss_sysc,
1996         .unlock = &omap_hwmod_rtc_unlock,
1997         .lock   = &omap_hwmod_rtc_lock,
1998 };
1999
2000 /* rtcss */
2001 static struct omap_hwmod dra7xx_rtcss_hwmod = {
2002         .name           = "rtcss",
2003         .class          = &dra7xx_rtcss_hwmod_class,
2004         .clkdm_name     = "rtc_clkdm",
2005         .main_clk       = "sys_32k_ck",
2006         .prcm = {
2007                 .omap4 = {
2008                         .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
2009                         .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
2010                         .modulemode   = MODULEMODE_SWCTRL,
2011                 },
2012         },
2013 };
2014
2015 /*
2016  * 'sata' class
2017  *
2018  */
2019
2020 static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
2021         .sysc_offs      = 0x0000,
2022         .sysc_flags     = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
2023         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2024                            SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2025                            MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2026         .sysc_fields    = &omap_hwmod_sysc_type2,
2027 };
2028
2029 static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
2030         .name   = "sata",
2031         .sysc   = &dra7xx_sata_sysc,
2032 };
2033
2034 /* sata */
2035
2036 static struct omap_hwmod dra7xx_sata_hwmod = {
2037         .name           = "sata",
2038         .class          = &dra7xx_sata_hwmod_class,
2039         .clkdm_name     = "l3init_clkdm",
2040         .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
2041         .main_clk       = "func_48m_fclk",
2042         .mpu_rt_idx     = 1,
2043         .prcm = {
2044                 .omap4 = {
2045                         .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
2046                         .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
2047                         .modulemode   = MODULEMODE_SWCTRL,
2048                 },
2049         },
2050 };
2051
2052 /*
2053  * 'smartreflex' class
2054  *
2055  */
2056
2057 /* The IP is not compliant to type1 / type2 scheme */
2058 static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
2059         .sidle_shift    = 24,
2060         .enwkup_shift   = 26,
2061 };
2062
2063 static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
2064         .sysc_offs      = 0x0038,
2065         .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
2066         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2067                            SIDLE_SMART_WKUP),
2068         .sysc_fields    = &omap_hwmod_sysc_type_smartreflex,
2069 };
2070
2071 static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
2072         .name   = "smartreflex",
2073         .sysc   = &dra7xx_smartreflex_sysc,
2074         .rev    = 2,
2075 };
2076
2077 /* smartreflex_core */
2078 /* smartreflex_core dev_attr */
2079 static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
2080         .sensor_voltdm_name     = "core",
2081 };
2082
2083 static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
2084         .name           = "smartreflex_core",
2085         .class          = &dra7xx_smartreflex_hwmod_class,
2086         .clkdm_name     = "coreaon_clkdm",
2087         .main_clk       = "wkupaon_iclk_mux",
2088         .prcm = {
2089                 .omap4 = {
2090                         .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
2091                         .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
2092                         .modulemode   = MODULEMODE_SWCTRL,
2093                 },
2094         },
2095         .dev_attr       = &smartreflex_core_dev_attr,
2096 };
2097
2098 /* smartreflex_mpu */
2099 /* smartreflex_mpu dev_attr */
2100 static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
2101         .sensor_voltdm_name     = "mpu",
2102 };
2103
2104 static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
2105         .name           = "smartreflex_mpu",
2106         .class          = &dra7xx_smartreflex_hwmod_class,
2107         .clkdm_name     = "coreaon_clkdm",
2108         .main_clk       = "wkupaon_iclk_mux",
2109         .prcm = {
2110                 .omap4 = {
2111                         .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
2112                         .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
2113                         .modulemode   = MODULEMODE_SWCTRL,
2114                 },
2115         },
2116         .dev_attr       = &smartreflex_mpu_dev_attr,
2117 };
2118
2119 /*
2120  * 'spinlock' class
2121  *
2122  */
2123
2124 static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
2125         .rev_offs       = 0x0000,
2126         .sysc_offs      = 0x0010,
2127         .syss_offs      = 0x0014,
2128         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
2129                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2130                            SYSS_HAS_RESET_STATUS),
2131         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2132         .sysc_fields    = &omap_hwmod_sysc_type1,
2133 };
2134
2135 static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
2136         .name   = "spinlock",
2137         .sysc   = &dra7xx_spinlock_sysc,
2138 };
2139
2140 /* spinlock */
2141 static struct omap_hwmod dra7xx_spinlock_hwmod = {
2142         .name           = "spinlock",
2143         .class          = &dra7xx_spinlock_hwmod_class,
2144         .clkdm_name     = "l4cfg_clkdm",
2145         .main_clk       = "l3_iclk_div",
2146         .prcm = {
2147                 .omap4 = {
2148                         .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
2149                         .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
2150                 },
2151         },
2152 };
2153
2154 /*
2155  * 'timer' class
2156  *
2157  * This class contains several variants: ['timer_1ms', 'timer_secure',
2158  * 'timer']
2159  */
2160
2161 static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
2162         .rev_offs       = 0x0000,
2163         .sysc_offs      = 0x0010,
2164         .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
2165                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2166         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2167                            SIDLE_SMART_WKUP),
2168         .sysc_fields    = &omap_hwmod_sysc_type2,
2169 };
2170
2171 static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
2172         .name   = "timer",
2173         .sysc   = &dra7xx_timer_1ms_sysc,
2174 };
2175
2176 static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
2177         .rev_offs       = 0x0000,
2178         .sysc_offs      = 0x0010,
2179         .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
2180                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2181         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2182                            SIDLE_SMART_WKUP),
2183         .sysc_fields    = &omap_hwmod_sysc_type2,
2184 };
2185
2186 static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
2187         .name   = "timer",
2188         .sysc   = &dra7xx_timer_sysc,
2189 };
2190
2191 /* timer1 */
2192 static struct omap_hwmod dra7xx_timer1_hwmod = {
2193         .name           = "timer1",
2194         .class          = &dra7xx_timer_1ms_hwmod_class,
2195         .clkdm_name     = "wkupaon_clkdm",
2196         .main_clk       = "timer1_gfclk_mux",
2197         .prcm = {
2198                 .omap4 = {
2199                         .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
2200                         .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
2201                         .modulemode   = MODULEMODE_SWCTRL,
2202                 },
2203         },
2204 };
2205
2206 /* timer2 */
2207 static struct omap_hwmod dra7xx_timer2_hwmod = {
2208         .name           = "timer2",
2209         .class          = &dra7xx_timer_1ms_hwmod_class,
2210         .clkdm_name     = "l4per_clkdm",
2211         .main_clk       = "timer2_gfclk_mux",
2212         .prcm = {
2213                 .omap4 = {
2214                         .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
2215                         .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
2216                         .modulemode   = MODULEMODE_SWCTRL,
2217                 },
2218         },
2219 };
2220
2221 /* timer3 */
2222 static struct omap_hwmod dra7xx_timer3_hwmod = {
2223         .name           = "timer3",
2224         .class          = &dra7xx_timer_hwmod_class,
2225         .clkdm_name     = "l4per_clkdm",
2226         .main_clk       = "timer3_gfclk_mux",
2227         .prcm = {
2228                 .omap4 = {
2229                         .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
2230                         .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
2231                         .modulemode   = MODULEMODE_SWCTRL,
2232                 },
2233         },
2234 };
2235
2236 /* timer4 */
2237 static struct omap_hwmod dra7xx_timer4_hwmod = {
2238         .name           = "timer4",
2239         .class          = &dra7xx_timer_hwmod_class,
2240         .clkdm_name     = "l4per_clkdm",
2241         .main_clk       = "timer4_gfclk_mux",
2242         .prcm = {
2243                 .omap4 = {
2244                         .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
2245                         .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
2246                         .modulemode   = MODULEMODE_SWCTRL,
2247                 },
2248         },
2249 };
2250
2251 /* timer5 */
2252 static struct omap_hwmod dra7xx_timer5_hwmod = {
2253         .name           = "timer5",
2254         .class          = &dra7xx_timer_hwmod_class,
2255         .clkdm_name     = "ipu_clkdm",
2256         .main_clk       = "timer5_gfclk_mux",
2257         .prcm = {
2258                 .omap4 = {
2259                         .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
2260                         .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
2261                         .modulemode   = MODULEMODE_SWCTRL,
2262                 },
2263         },
2264 };
2265
2266 /* timer6 */
2267 static struct omap_hwmod dra7xx_timer6_hwmod = {
2268         .name           = "timer6",
2269         .class          = &dra7xx_timer_hwmod_class,
2270         .clkdm_name     = "ipu_clkdm",
2271         .main_clk       = "timer6_gfclk_mux",
2272         .prcm = {
2273                 .omap4 = {
2274                         .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
2275                         .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
2276                         .modulemode   = MODULEMODE_SWCTRL,
2277                 },
2278         },
2279 };
2280
2281 /* timer7 */
2282 static struct omap_hwmod dra7xx_timer7_hwmod = {
2283         .name           = "timer7",
2284         .class          = &dra7xx_timer_hwmod_class,
2285         .clkdm_name     = "ipu_clkdm",
2286         .main_clk       = "timer7_gfclk_mux",
2287         .prcm = {
2288                 .omap4 = {
2289                         .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
2290                         .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
2291                         .modulemode   = MODULEMODE_SWCTRL,
2292                 },
2293         },
2294 };
2295
2296 /* timer8 */
2297 static struct omap_hwmod dra7xx_timer8_hwmod = {
2298         .name           = "timer8",
2299         .class          = &dra7xx_timer_hwmod_class,
2300         .clkdm_name     = "ipu_clkdm",
2301         .main_clk       = "timer8_gfclk_mux",
2302         .prcm = {
2303                 .omap4 = {
2304                         .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
2305                         .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
2306                         .modulemode   = MODULEMODE_SWCTRL,
2307                 },
2308         },
2309 };
2310
2311 /* timer9 */
2312 static struct omap_hwmod dra7xx_timer9_hwmod = {
2313         .name           = "timer9",
2314         .class          = &dra7xx_timer_hwmod_class,
2315         .clkdm_name     = "l4per_clkdm",
2316         .main_clk       = "timer9_gfclk_mux",
2317         .prcm = {
2318                 .omap4 = {
2319                         .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
2320                         .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
2321                         .modulemode   = MODULEMODE_SWCTRL,
2322                 },
2323         },
2324 };
2325
2326 /* timer10 */
2327 static struct omap_hwmod dra7xx_timer10_hwmod = {
2328         .name           = "timer10",
2329         .class          = &dra7xx_timer_1ms_hwmod_class,
2330         .clkdm_name     = "l4per_clkdm",
2331         .main_clk       = "timer10_gfclk_mux",
2332         .prcm = {
2333                 .omap4 = {
2334                         .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
2335                         .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
2336                         .modulemode   = MODULEMODE_SWCTRL,
2337                 },
2338         },
2339 };
2340
2341 /* timer11 */
2342 static struct omap_hwmod dra7xx_timer11_hwmod = {
2343         .name           = "timer11",
2344         .class          = &dra7xx_timer_hwmod_class,
2345         .clkdm_name     = "l4per_clkdm",
2346         .main_clk       = "timer11_gfclk_mux",
2347         .prcm = {
2348                 .omap4 = {
2349                         .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
2350                         .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
2351                         .modulemode   = MODULEMODE_SWCTRL,
2352                 },
2353         },
2354 };
2355
2356 /* timer12 */
2357 static struct omap_hwmod dra7xx_timer12_hwmod = {
2358         .name           = "timer12",
2359         .class          = &dra7xx_timer_hwmod_class,
2360         .clkdm_name     = "wkupaon_clkdm",
2361         .main_clk       = "secure_32k_clk_src_ck",
2362         .prcm = {
2363                 .omap4 = {
2364                         .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET,
2365                         .context_offs = DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET,
2366                 },
2367         },
2368 };
2369
2370 /* timer13 */
2371 static struct omap_hwmod dra7xx_timer13_hwmod = {
2372         .name           = "timer13",
2373         .class          = &dra7xx_timer_hwmod_class,
2374         .clkdm_name     = "l4per3_clkdm",
2375         .main_clk       = "timer13_gfclk_mux",
2376         .prcm = {
2377                 .omap4 = {
2378                         .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
2379                         .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
2380                         .modulemode   = MODULEMODE_SWCTRL,
2381                 },
2382         },
2383 };
2384
2385 /* timer14 */
2386 static struct omap_hwmod dra7xx_timer14_hwmod = {
2387         .name           = "timer14",
2388         .class          = &dra7xx_timer_hwmod_class,
2389         .clkdm_name     = "l4per3_clkdm",
2390         .main_clk       = "timer14_gfclk_mux",
2391         .prcm = {
2392                 .omap4 = {
2393                         .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
2394                         .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
2395                         .modulemode   = MODULEMODE_SWCTRL,
2396                 },
2397         },
2398 };
2399
2400 /* timer15 */
2401 static struct omap_hwmod dra7xx_timer15_hwmod = {
2402         .name           = "timer15",
2403         .class          = &dra7xx_timer_hwmod_class,
2404         .clkdm_name     = "l4per3_clkdm",
2405         .main_clk       = "timer15_gfclk_mux",
2406         .prcm = {
2407                 .omap4 = {
2408                         .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
2409                         .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
2410                         .modulemode   = MODULEMODE_SWCTRL,
2411                 },
2412         },
2413 };
2414
2415 /* timer16 */
2416 static struct omap_hwmod dra7xx_timer16_hwmod = {
2417         .name           = "timer16",
2418         .class          = &dra7xx_timer_hwmod_class,
2419         .clkdm_name     = "l4per3_clkdm",
2420         .main_clk       = "timer16_gfclk_mux",
2421         .prcm = {
2422                 .omap4 = {
2423                         .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
2424                         .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
2425                         .modulemode   = MODULEMODE_SWCTRL,
2426                 },
2427         },
2428 };
2429
2430 /*
2431  * 'uart' class
2432  *
2433  */
2434
2435 static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
2436         .rev_offs       = 0x0050,
2437         .sysc_offs      = 0x0054,
2438         .syss_offs      = 0x0058,
2439         .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
2440                            SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2441                            SYSS_HAS_RESET_STATUS),
2442         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2443                            SIDLE_SMART_WKUP),
2444         .sysc_fields    = &omap_hwmod_sysc_type1,
2445 };
2446
2447 static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
2448         .name   = "uart",
2449         .sysc   = &dra7xx_uart_sysc,
2450 };
2451
2452 /* uart1 */
2453 static struct omap_hwmod dra7xx_uart1_hwmod = {
2454         .name           = "uart1",
2455         .class          = &dra7xx_uart_hwmod_class,
2456         .clkdm_name     = "l4per_clkdm",
2457         .main_clk       = "uart1_gfclk_mux",
2458         .flags          = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
2459         .prcm = {
2460                 .omap4 = {
2461                         .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
2462                         .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
2463                         .modulemode   = MODULEMODE_SWCTRL,
2464                 },
2465         },
2466 };
2467
2468 /* uart2 */
2469 static struct omap_hwmod dra7xx_uart2_hwmod = {
2470         .name           = "uart2",
2471         .class          = &dra7xx_uart_hwmod_class,
2472         .clkdm_name     = "l4per_clkdm",
2473         .main_clk       = "uart2_gfclk_mux",
2474         .flags          = HWMOD_SWSUP_SIDLE_ACT,
2475         .prcm = {
2476                 .omap4 = {
2477                         .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
2478                         .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
2479                         .modulemode   = MODULEMODE_SWCTRL,
2480                 },
2481         },
2482 };
2483
2484 /* uart3 */
2485 static struct omap_hwmod dra7xx_uart3_hwmod = {
2486         .name           = "uart3",
2487         .class          = &dra7xx_uart_hwmod_class,
2488         .clkdm_name     = "l4per_clkdm",
2489         .main_clk       = "uart3_gfclk_mux",
2490         .flags          = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
2491         .prcm = {
2492                 .omap4 = {
2493                         .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
2494                         .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
2495                         .modulemode   = MODULEMODE_SWCTRL,
2496                 },
2497         },
2498 };
2499
2500 /* uart4 */
2501 static struct omap_hwmod dra7xx_uart4_hwmod = {
2502         .name           = "uart4",
2503         .class          = &dra7xx_uart_hwmod_class,
2504         .clkdm_name     = "l4per_clkdm",
2505         .main_clk       = "uart4_gfclk_mux",
2506         .flags          = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART4_FLAGS,
2507         .prcm = {
2508                 .omap4 = {
2509                         .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
2510                         .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
2511                         .modulemode   = MODULEMODE_SWCTRL,
2512                 },
2513         },
2514 };
2515
2516 /* uart5 */
2517 static struct omap_hwmod dra7xx_uart5_hwmod = {
2518         .name           = "uart5",
2519         .class          = &dra7xx_uart_hwmod_class,
2520         .clkdm_name     = "l4per_clkdm",
2521         .main_clk       = "uart5_gfclk_mux",
2522         .flags          = HWMOD_SWSUP_SIDLE_ACT,
2523         .prcm = {
2524                 .omap4 = {
2525                         .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
2526                         .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
2527                         .modulemode   = MODULEMODE_SWCTRL,
2528                 },
2529         },
2530 };
2531
2532 /* uart6 */
2533 static struct omap_hwmod dra7xx_uart6_hwmod = {
2534         .name           = "uart6",
2535         .class          = &dra7xx_uart_hwmod_class,
2536         .clkdm_name     = "ipu_clkdm",
2537         .main_clk       = "uart6_gfclk_mux",
2538         .flags          = HWMOD_SWSUP_SIDLE_ACT,
2539         .prcm = {
2540                 .omap4 = {
2541                         .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
2542                         .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
2543                         .modulemode   = MODULEMODE_SWCTRL,
2544                 },
2545         },
2546 };
2547
2548 /* uart7 */
2549 static struct omap_hwmod dra7xx_uart7_hwmod = {
2550         .name           = "uart7",
2551         .class          = &dra7xx_uart_hwmod_class,
2552         .clkdm_name     = "l4per2_clkdm",
2553         .main_clk       = "uart7_gfclk_mux",
2554         .flags          = HWMOD_SWSUP_SIDLE_ACT,
2555         .prcm = {
2556                 .omap4 = {
2557                         .clkctrl_offs = DRA7XX_CM_L4PER2_UART7_CLKCTRL_OFFSET,
2558                         .context_offs = DRA7XX_RM_L4PER2_UART7_CONTEXT_OFFSET,
2559                         .modulemode   = MODULEMODE_SWCTRL,
2560                 },
2561         },
2562 };
2563
2564 /* uart8 */
2565 static struct omap_hwmod dra7xx_uart8_hwmod = {
2566         .name           = "uart8",
2567         .class          = &dra7xx_uart_hwmod_class,
2568         .clkdm_name     = "l4per2_clkdm",
2569         .main_clk       = "uart8_gfclk_mux",
2570         .flags          = HWMOD_SWSUP_SIDLE_ACT,
2571         .prcm = {
2572                 .omap4 = {
2573                         .clkctrl_offs = DRA7XX_CM_L4PER2_UART8_CLKCTRL_OFFSET,
2574                         .context_offs = DRA7XX_RM_L4PER2_UART8_CONTEXT_OFFSET,
2575                         .modulemode   = MODULEMODE_SWCTRL,
2576                 },
2577         },
2578 };
2579
2580 /* uart9 */
2581 static struct omap_hwmod dra7xx_uart9_hwmod = {
2582         .name           = "uart9",
2583         .class          = &dra7xx_uart_hwmod_class,
2584         .clkdm_name     = "l4per2_clkdm",
2585         .main_clk       = "uart9_gfclk_mux",
2586         .flags          = HWMOD_SWSUP_SIDLE_ACT,
2587         .prcm = {
2588                 .omap4 = {
2589                         .clkctrl_offs = DRA7XX_CM_L4PER2_UART9_CLKCTRL_OFFSET,
2590                         .context_offs = DRA7XX_RM_L4PER2_UART9_CONTEXT_OFFSET,
2591                         .modulemode   = MODULEMODE_SWCTRL,
2592                 },
2593         },
2594 };
2595
2596 /* uart10 */
2597 static struct omap_hwmod dra7xx_uart10_hwmod = {
2598         .name           = "uart10",
2599         .class          = &dra7xx_uart_hwmod_class,
2600         .clkdm_name     = "wkupaon_clkdm",
2601         .main_clk       = "uart10_gfclk_mux",
2602         .flags          = HWMOD_SWSUP_SIDLE_ACT,
2603         .prcm = {
2604                 .omap4 = {
2605                         .clkctrl_offs = DRA7XX_CM_WKUPAON_UART10_CLKCTRL_OFFSET,
2606                         .context_offs = DRA7XX_RM_WKUPAON_UART10_CONTEXT_OFFSET,
2607                         .modulemode   = MODULEMODE_SWCTRL,
2608                 },
2609         },
2610 };
2611
2612 /* DES (the 'P' (public) device) */
2613 static struct omap_hwmod_class_sysconfig dra7xx_des_sysc = {
2614         .rev_offs       = 0x0030,
2615         .sysc_offs      = 0x0034,
2616         .syss_offs      = 0x0038,
2617         .sysc_flags     = SYSS_HAS_RESET_STATUS,
2618 };
2619
2620 static struct omap_hwmod_class dra7xx_des_hwmod_class = {
2621         .name   = "des",
2622         .sysc   = &dra7xx_des_sysc,
2623 };
2624
2625 /* DES */
2626 static struct omap_hwmod dra7xx_des_hwmod = {
2627         .name           = "des",
2628         .class          = &dra7xx_des_hwmod_class,
2629         .clkdm_name     = "l4sec_clkdm",
2630         .main_clk       = "l3_iclk_div",
2631         .prcm = {
2632                 .omap4 = {
2633                         .clkctrl_offs = DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET,
2634                         .context_offs = DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET,
2635                         .modulemode   = MODULEMODE_HWCTRL,
2636                 },
2637         },
2638 };
2639
2640 /* rng */
2641 static struct omap_hwmod_class_sysconfig dra7xx_rng_sysc = {
2642         .rev_offs       = 0x1fe0,
2643         .sysc_offs      = 0x1fe4,
2644         .sysc_flags     = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
2645         .idlemodes      = SIDLE_FORCE | SIDLE_NO,
2646         .sysc_fields    = &omap_hwmod_sysc_type1,
2647 };
2648
2649 static struct omap_hwmod_class dra7xx_rng_hwmod_class = {
2650         .name           = "rng",
2651         .sysc           = &dra7xx_rng_sysc,
2652 };
2653
2654 static struct omap_hwmod dra7xx_rng_hwmod = {
2655         .name           = "rng",
2656         .class          = &dra7xx_rng_hwmod_class,
2657         .flags          = HWMOD_SWSUP_SIDLE,
2658         .clkdm_name     = "l4sec_clkdm",
2659         .prcm = {
2660                 .omap4 = {
2661                         .clkctrl_offs = DRA7XX_CM_L4SEC_RNG_CLKCTRL_OFFSET,
2662                         .context_offs = DRA7XX_RM_L4SEC_RNG_CONTEXT_OFFSET,
2663                         .modulemode   = MODULEMODE_HWCTRL,
2664                 },
2665         },
2666 };
2667
2668 /*
2669  * 'usb_otg_ss' class
2670  *
2671  */
2672
2673 static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
2674         .rev_offs       = 0x0000,
2675         .sysc_offs      = 0x0010,
2676         .sysc_flags     = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
2677                            SYSC_HAS_SIDLEMODE),
2678         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2679                            SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2680                            MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2681         .sysc_fields    = &omap_hwmod_sysc_type2,
2682 };
2683
2684 static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
2685         .name   = "usb_otg_ss",
2686         .sysc   = &dra7xx_usb_otg_ss_sysc,
2687 };
2688
2689 /* usb_otg_ss1 */
2690 static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
2691         { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
2692 };
2693
2694 static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
2695         .name           = "usb_otg_ss1",
2696         .class          = &dra7xx_usb_otg_ss_hwmod_class,
2697         .clkdm_name     = "l3init_clkdm",
2698         .main_clk       = "dpll_core_h13x2_ck",
2699         .flags          = HWMOD_CLKDM_NOAUTO,
2700         .prcm = {
2701                 .omap4 = {
2702                         .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
2703                         .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
2704                         .modulemode   = MODULEMODE_HWCTRL,
2705                 },
2706         },
2707         .opt_clks       = usb_otg_ss1_opt_clks,
2708         .opt_clks_cnt   = ARRAY_SIZE(usb_otg_ss1_opt_clks),
2709 };
2710
2711 /* usb_otg_ss2 */
2712 static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
2713         { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
2714 };
2715
2716 static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
2717         .name           = "usb_otg_ss2",
2718         .class          = &dra7xx_usb_otg_ss_hwmod_class,
2719         .clkdm_name     = "l3init_clkdm",
2720         .main_clk       = "dpll_core_h13x2_ck",
2721         .flags          = HWMOD_CLKDM_NOAUTO,
2722         .prcm = {
2723                 .omap4 = {
2724                         .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
2725                         .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
2726                         .modulemode   = MODULEMODE_HWCTRL,
2727                 },
2728         },
2729         .opt_clks       = usb_otg_ss2_opt_clks,
2730         .opt_clks_cnt   = ARRAY_SIZE(usb_otg_ss2_opt_clks),
2731 };
2732
2733 /* usb_otg_ss3 */
2734 static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
2735         .name           = "usb_otg_ss3",
2736         .class          = &dra7xx_usb_otg_ss_hwmod_class,
2737         .clkdm_name     = "l3init_clkdm",
2738         .main_clk       = "dpll_core_h13x2_ck",
2739         .prcm = {
2740                 .omap4 = {
2741                         .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
2742                         .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
2743                         .modulemode   = MODULEMODE_HWCTRL,
2744                 },
2745         },
2746 };
2747
2748 /* usb_otg_ss4 */
2749 static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
2750         .name           = "usb_otg_ss4",
2751         .class          = &dra7xx_usb_otg_ss_hwmod_class,
2752         .clkdm_name     = "l3init_clkdm",
2753         .main_clk       = "dpll_core_h13x2_ck",
2754         .prcm = {
2755                 .omap4 = {
2756                         .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
2757                         .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
2758                         .modulemode   = MODULEMODE_HWCTRL,
2759                 },
2760         },
2761 };
2762
2763 /*
2764  * 'vcp' class
2765  *
2766  */
2767
2768 static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
2769         .name   = "vcp",
2770 };
2771
2772 /* vcp1 */
2773 static struct omap_hwmod dra7xx_vcp1_hwmod = {
2774         .name           = "vcp1",
2775         .class          = &dra7xx_vcp_hwmod_class,
2776         .clkdm_name     = "l3main1_clkdm",
2777         .main_clk       = "l3_iclk_div",
2778         .prcm = {
2779                 .omap4 = {
2780                         .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
2781                         .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
2782                 },
2783         },
2784 };
2785
2786 /* vcp2 */
2787 static struct omap_hwmod dra7xx_vcp2_hwmod = {
2788         .name           = "vcp2",
2789         .class          = &dra7xx_vcp_hwmod_class,
2790         .clkdm_name     = "l3main1_clkdm",
2791         .main_clk       = "l3_iclk_div",
2792         .prcm = {
2793                 .omap4 = {
2794                         .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
2795                         .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
2796                 },
2797         },
2798 };
2799
2800 /*
2801  * 'wd_timer' class
2802  *
2803  */
2804
2805 static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
2806         .rev_offs       = 0x0000,
2807         .sysc_offs      = 0x0010,
2808         .syss_offs      = 0x0014,
2809         .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
2810                            SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2811         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2812                            SIDLE_SMART_WKUP),
2813         .sysc_fields    = &omap_hwmod_sysc_type1,
2814 };
2815
2816 static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
2817         .name           = "wd_timer",
2818         .sysc           = &dra7xx_wd_timer_sysc,
2819         .pre_shutdown   = &omap2_wd_timer_disable,
2820         .reset          = &omap2_wd_timer_reset,
2821 };
2822
2823 /* wd_timer2 */
2824 static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
2825         .name           = "wd_timer2",
2826         .class          = &dra7xx_wd_timer_hwmod_class,
2827         .clkdm_name     = "wkupaon_clkdm",
2828         .main_clk       = "sys_32k_ck",
2829         .prcm = {
2830                 .omap4 = {
2831                         .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
2832                         .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
2833                         .modulemode   = MODULEMODE_SWCTRL,
2834                 },
2835         },
2836 };
2837
2838
2839 /*
2840  * Interfaces
2841  */
2842
2843 /* l3_main_1 -> dmm */
2844 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
2845         .master         = &dra7xx_l3_main_1_hwmod,
2846         .slave          = &dra7xx_dmm_hwmod,
2847         .clk            = "l3_iclk_div",
2848         .user           = OCP_USER_SDMA,
2849 };
2850
2851 /* l3_main_2 -> l3_instr */
2852 static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
2853         .master         = &dra7xx_l3_main_2_hwmod,
2854         .slave          = &dra7xx_l3_instr_hwmod,
2855         .clk            = "l3_iclk_div",
2856         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2857 };
2858
2859 /* l4_cfg -> l3_main_1 */
2860 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
2861         .master         = &dra7xx_l4_cfg_hwmod,
2862         .slave          = &dra7xx_l3_main_1_hwmod,
2863         .clk            = "l3_iclk_div",
2864         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2865 };
2866
2867 /* mpu -> l3_main_1 */
2868 static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
2869         .master         = &dra7xx_mpu_hwmod,
2870         .slave          = &dra7xx_l3_main_1_hwmod,
2871         .clk            = "l3_iclk_div",
2872         .user           = OCP_USER_MPU,
2873 };
2874
2875 /* l3_main_1 -> l3_main_2 */
2876 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
2877         .master         = &dra7xx_l3_main_1_hwmod,
2878         .slave          = &dra7xx_l3_main_2_hwmod,
2879         .clk            = "l3_iclk_div",
2880         .user           = OCP_USER_MPU,
2881 };
2882
2883 /* l4_cfg -> l3_main_2 */
2884 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
2885         .master         = &dra7xx_l4_cfg_hwmod,
2886         .slave          = &dra7xx_l3_main_2_hwmod,
2887         .clk            = "l3_iclk_div",
2888         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2889 };
2890
2891 /* l3_main_1 -> l4_cfg */
2892 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
2893         .master         = &dra7xx_l3_main_1_hwmod,
2894         .slave          = &dra7xx_l4_cfg_hwmod,
2895         .clk            = "l3_iclk_div",
2896         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2897 };
2898
2899 /* l3_main_1 -> l4_per1 */
2900 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
2901         .master         = &dra7xx_l3_main_1_hwmod,
2902         .slave          = &dra7xx_l4_per1_hwmod,
2903         .clk            = "l3_iclk_div",
2904         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2905 };
2906
2907 /* l3_main_1 -> l4_per2 */
2908 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
2909         .master         = &dra7xx_l3_main_1_hwmod,
2910         .slave          = &dra7xx_l4_per2_hwmod,
2911         .clk            = "l3_iclk_div",
2912         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2913 };
2914
2915 /* l3_main_1 -> l4_per3 */
2916 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
2917         .master         = &dra7xx_l3_main_1_hwmod,
2918         .slave          = &dra7xx_l4_per3_hwmod,
2919         .clk            = "l3_iclk_div",
2920         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2921 };
2922
2923 /* l3_main_1 -> l4_wkup */
2924 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
2925         .master         = &dra7xx_l3_main_1_hwmod,
2926         .slave          = &dra7xx_l4_wkup_hwmod,
2927         .clk            = "wkupaon_iclk_mux",
2928         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2929 };
2930
2931 /* l4_per2 -> atl */
2932 static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
2933         .master         = &dra7xx_l4_per2_hwmod,
2934         .slave          = &dra7xx_atl_hwmod,
2935         .clk            = "l3_iclk_div",
2936         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2937 };
2938
2939 /* l3_main_1 -> bb2d */
2940 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
2941         .master         = &dra7xx_l3_main_1_hwmod,
2942         .slave          = &dra7xx_bb2d_hwmod,
2943         .clk            = "l3_iclk_div",
2944         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2945 };
2946
2947 /* l4_wkup -> counter_32k */
2948 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
2949         .master         = &dra7xx_l4_wkup_hwmod,
2950         .slave          = &dra7xx_counter_32k_hwmod,
2951         .clk            = "wkupaon_iclk_mux",
2952         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2953 };
2954
2955 /* l4_wkup -> ctrl_module_wkup */
2956 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
2957         .master         = &dra7xx_l4_wkup_hwmod,
2958         .slave          = &dra7xx_ctrl_module_wkup_hwmod,
2959         .clk            = "wkupaon_iclk_mux",
2960         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2961 };
2962
2963 static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = {
2964         .master         = &dra7xx_l4_per2_hwmod,
2965         .slave          = &dra7xx_gmac_hwmod,
2966         .clk            = "dpll_gmac_ck",
2967         .user           = OCP_USER_MPU,
2968 };
2969
2970 static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = {
2971         .master         = &dra7xx_gmac_hwmod,
2972         .slave          = &dra7xx_mdio_hwmod,
2973         .user           = OCP_USER_MPU,
2974 };
2975
2976 /* l4_wkup -> dcan1 */
2977 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
2978         .master         = &dra7xx_l4_wkup_hwmod,
2979         .slave          = &dra7xx_dcan1_hwmod,
2980         .clk            = "wkupaon_iclk_mux",
2981         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2982 };
2983
2984 /* l4_per2 -> dcan2 */
2985 static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
2986         .master         = &dra7xx_l4_per2_hwmod,
2987         .slave          = &dra7xx_dcan2_hwmod,
2988         .clk            = "l3_iclk_div",
2989         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2990 };
2991
2992 /* l4_cfg -> dma_system */
2993 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
2994         .master         = &dra7xx_l4_cfg_hwmod,
2995         .slave          = &dra7xx_dma_system_hwmod,
2996         .clk            = "l3_iclk_div",
2997         .user           = OCP_USER_MPU | OCP_USER_SDMA,
2998 };
2999
3000 /* l3_main_1 -> tpcc */
3001 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
3002         .master         = &dra7xx_l3_main_1_hwmod,
3003         .slave          = &dra7xx_tpcc_hwmod,
3004         .clk            = "l3_iclk_div",
3005         .user           = OCP_USER_MPU,
3006 };
3007
3008 /* l3_main_1 -> tptc0 */
3009 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0 = {
3010         .master         = &dra7xx_l3_main_1_hwmod,
3011         .slave          = &dra7xx_tptc0_hwmod,
3012         .clk            = "l3_iclk_div",
3013         .user           = OCP_USER_MPU,
3014 };
3015
3016 /* l3_main_1 -> tptc1 */
3017 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1 = {
3018         .master         = &dra7xx_l3_main_1_hwmod,
3019         .slave          = &dra7xx_tptc1_hwmod,
3020         .clk            = "l3_iclk_div",
3021         .user           = OCP_USER_MPU,
3022 };
3023
3024 /* l3_main_1 -> dss */
3025 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
3026         .master         = &dra7xx_l3_main_1_hwmod,
3027         .slave          = &dra7xx_dss_hwmod,
3028         .clk            = "l3_iclk_div",
3029         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3030 };
3031
3032 /* l3_main_1 -> dispc */
3033 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
3034         .master         = &dra7xx_l3_main_1_hwmod,
3035         .slave          = &dra7xx_dss_dispc_hwmod,
3036         .clk            = "l3_iclk_div",
3037         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3038 };
3039
3040 /* l3_main_1 -> dispc */
3041 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
3042         .master         = &dra7xx_l3_main_1_hwmod,
3043         .slave          = &dra7xx_dss_hdmi_hwmod,
3044         .clk            = "l3_iclk_div",
3045         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3046 };
3047
3048 /* l3_main_1 -> aes1 */
3049 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1 = {
3050         .master         = &dra7xx_l3_main_1_hwmod,
3051         .slave          = &dra7xx_aes1_hwmod,
3052         .clk            = "l3_iclk_div",
3053         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3054 };
3055
3056 /* l3_main_1 -> aes2 */
3057 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2 = {
3058         .master         = &dra7xx_l3_main_1_hwmod,
3059         .slave          = &dra7xx_aes2_hwmod,
3060         .clk            = "l3_iclk_div",
3061         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3062 };
3063
3064 /* l3_main_1 -> sha0 */
3065 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0 = {
3066         .master         = &dra7xx_l3_main_1_hwmod,
3067         .slave          = &dra7xx_sha0_hwmod,
3068         .clk            = "l3_iclk_div",
3069         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3070 };
3071
3072 /* l4_per2 -> mcasp1 */
3073 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp1 = {
3074         .master         = &dra7xx_l4_per2_hwmod,
3075         .slave          = &dra7xx_mcasp1_hwmod,
3076         .clk            = "l4_root_clk_div",
3077         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3078 };
3079
3080 /* l3_main_1 -> mcasp1 */
3081 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp1 = {
3082         .master         = &dra7xx_l3_main_1_hwmod,
3083         .slave          = &dra7xx_mcasp1_hwmod,
3084         .clk            = "l3_iclk_div",
3085         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3086 };
3087
3088 /* l4_per2 -> mcasp2 */
3089 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp2 = {
3090         .master         = &dra7xx_l4_per2_hwmod,
3091         .slave          = &dra7xx_mcasp2_hwmod,
3092         .clk            = "l4_root_clk_div",
3093         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3094 };
3095
3096 /* l3_main_1 -> mcasp2 */
3097 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp2 = {
3098         .master         = &dra7xx_l3_main_1_hwmod,
3099         .slave          = &dra7xx_mcasp2_hwmod,
3100         .clk            = "l3_iclk_div",
3101         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3102 };
3103
3104 /* l4_per2 -> mcasp3 */
3105 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp3 = {
3106         .master         = &dra7xx_l4_per2_hwmod,
3107         .slave          = &dra7xx_mcasp3_hwmod,
3108         .clk            = "l4_root_clk_div",
3109         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3110 };
3111
3112 /* l3_main_1 -> mcasp3 */
3113 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp3 = {
3114         .master         = &dra7xx_l3_main_1_hwmod,
3115         .slave          = &dra7xx_mcasp3_hwmod,
3116         .clk            = "l3_iclk_div",
3117         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3118 };
3119
3120 /* l4_per2 -> mcasp4 */
3121 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp4 = {
3122         .master         = &dra7xx_l4_per2_hwmod,
3123         .slave          = &dra7xx_mcasp4_hwmod,
3124         .clk            = "l4_root_clk_div",
3125         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3126 };
3127
3128 /* l4_per2 -> mcasp5 */
3129 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp5 = {
3130         .master         = &dra7xx_l4_per2_hwmod,
3131         .slave          = &dra7xx_mcasp5_hwmod,
3132         .clk            = "l4_root_clk_div",
3133         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3134 };
3135
3136 /* l4_per2 -> mcasp6 */
3137 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp6 = {
3138         .master         = &dra7xx_l4_per2_hwmod,
3139         .slave          = &dra7xx_mcasp6_hwmod,
3140         .clk            = "l4_root_clk_div",
3141         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3142 };
3143
3144 /* l4_per2 -> mcasp7 */
3145 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp7 = {
3146         .master         = &dra7xx_l4_per2_hwmod,
3147         .slave          = &dra7xx_mcasp7_hwmod,
3148         .clk            = "l4_root_clk_div",
3149         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3150 };
3151
3152 /* l4_per2 -> mcasp8 */
3153 static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp8 = {
3154         .master         = &dra7xx_l4_per2_hwmod,
3155         .slave          = &dra7xx_mcasp8_hwmod,
3156         .clk            = "l4_root_clk_div",
3157         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3158 };
3159
3160 /* l4_per1 -> elm */
3161 static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
3162         .master         = &dra7xx_l4_per1_hwmod,
3163         .slave          = &dra7xx_elm_hwmod,
3164         .clk            = "l3_iclk_div",
3165         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3166 };
3167
3168 /* l4_wkup -> gpio1 */
3169 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
3170         .master         = &dra7xx_l4_wkup_hwmod,
3171         .slave          = &dra7xx_gpio1_hwmod,
3172         .clk            = "wkupaon_iclk_mux",
3173         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3174 };
3175
3176 /* l4_per1 -> gpio2 */
3177 static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
3178         .master         = &dra7xx_l4_per1_hwmod,
3179         .slave          = &dra7xx_gpio2_hwmod,
3180         .clk            = "l3_iclk_div",
3181         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3182 };
3183
3184 /* l4_per1 -> gpio3 */
3185 static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
3186         .master         = &dra7xx_l4_per1_hwmod,
3187         .slave          = &dra7xx_gpio3_hwmod,
3188         .clk            = "l3_iclk_div",
3189         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3190 };
3191
3192 /* l4_per1 -> gpio4 */
3193 static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
3194         .master         = &dra7xx_l4_per1_hwmod,
3195         .slave          = &dra7xx_gpio4_hwmod,
3196         .clk            = "l3_iclk_div",
3197         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3198 };
3199
3200 /* l4_per1 -> gpio5 */
3201 static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
3202         .master         = &dra7xx_l4_per1_hwmod,
3203         .slave          = &dra7xx_gpio5_hwmod,
3204         .clk            = "l3_iclk_div",
3205         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3206 };
3207
3208 /* l4_per1 -> gpio6 */
3209 static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
3210         .master         = &dra7xx_l4_per1_hwmod,
3211         .slave          = &dra7xx_gpio6_hwmod,
3212         .clk            = "l3_iclk_div",
3213         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3214 };
3215
3216 /* l4_per1 -> gpio7 */
3217 static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
3218         .master         = &dra7xx_l4_per1_hwmod,
3219         .slave          = &dra7xx_gpio7_hwmod,
3220         .clk            = "l3_iclk_div",
3221         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3222 };
3223
3224 /* l4_per1 -> gpio8 */
3225 static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
3226         .master         = &dra7xx_l4_per1_hwmod,
3227         .slave          = &dra7xx_gpio8_hwmod,
3228         .clk            = "l3_iclk_div",
3229         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3230 };
3231
3232 /* l3_main_1 -> gpmc */
3233 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
3234         .master         = &dra7xx_l3_main_1_hwmod,
3235         .slave          = &dra7xx_gpmc_hwmod,
3236         .clk            = "l3_iclk_div",
3237         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3238 };
3239
3240 /* l4_per1 -> hdq1w */
3241 static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
3242         .master         = &dra7xx_l4_per1_hwmod,
3243         .slave          = &dra7xx_hdq1w_hwmod,
3244         .clk            = "l3_iclk_div",
3245         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3246 };
3247
3248 /* l4_per1 -> i2c1 */
3249 static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
3250         .master         = &dra7xx_l4_per1_hwmod,
3251         .slave          = &dra7xx_i2c1_hwmod,
3252         .clk            = "l3_iclk_div",
3253         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3254 };
3255
3256 /* l4_per1 -> i2c2 */
3257 static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
3258         .master         = &dra7xx_l4_per1_hwmod,
3259         .slave          = &dra7xx_i2c2_hwmod,
3260         .clk            = "l3_iclk_div",
3261         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3262 };
3263
3264 /* l4_per1 -> i2c3 */
3265 static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
3266         .master         = &dra7xx_l4_per1_hwmod,
3267         .slave          = &dra7xx_i2c3_hwmod,
3268         .clk            = "l3_iclk_div",
3269         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3270 };
3271
3272 /* l4_per1 -> i2c4 */
3273 static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
3274         .master         = &dra7xx_l4_per1_hwmod,
3275         .slave          = &dra7xx_i2c4_hwmod,
3276         .clk            = "l3_iclk_div",
3277         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3278 };
3279
3280 /* l4_per1 -> i2c5 */
3281 static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
3282         .master         = &dra7xx_l4_per1_hwmod,
3283         .slave          = &dra7xx_i2c5_hwmod,
3284         .clk            = "l3_iclk_div",
3285         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3286 };
3287
3288 /* l4_cfg -> mailbox1 */
3289 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
3290         .master         = &dra7xx_l4_cfg_hwmod,
3291         .slave          = &dra7xx_mailbox1_hwmod,
3292         .clk            = "l3_iclk_div",
3293         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3294 };
3295
3296 /* l4_per3 -> mailbox2 */
3297 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
3298         .master         = &dra7xx_l4_per3_hwmod,
3299         .slave          = &dra7xx_mailbox2_hwmod,
3300         .clk            = "l3_iclk_div",
3301         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3302 };
3303
3304 /* l4_per3 -> mailbox3 */
3305 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
3306         .master         = &dra7xx_l4_per3_hwmod,
3307         .slave          = &dra7xx_mailbox3_hwmod,
3308         .clk            = "l3_iclk_div",
3309         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3310 };
3311
3312 /* l4_per3 -> mailbox4 */
3313 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
3314         .master         = &dra7xx_l4_per3_hwmod,
3315         .slave          = &dra7xx_mailbox4_hwmod,
3316         .clk            = "l3_iclk_div",
3317         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3318 };
3319
3320 /* l4_per3 -> mailbox5 */
3321 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
3322         .master         = &dra7xx_l4_per3_hwmod,
3323         .slave          = &dra7xx_mailbox5_hwmod,
3324         .clk            = "l3_iclk_div",
3325         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3326 };
3327
3328 /* l4_per3 -> mailbox6 */
3329 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
3330         .master         = &dra7xx_l4_per3_hwmod,
3331         .slave          = &dra7xx_mailbox6_hwmod,
3332         .clk            = "l3_iclk_div",
3333         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3334 };
3335
3336 /* l4_per3 -> mailbox7 */
3337 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
3338         .master         = &dra7xx_l4_per3_hwmod,
3339         .slave          = &dra7xx_mailbox7_hwmod,
3340         .clk            = "l3_iclk_div",
3341         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3342 };
3343
3344 /* l4_per3 -> mailbox8 */
3345 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
3346         .master         = &dra7xx_l4_per3_hwmod,
3347         .slave          = &dra7xx_mailbox8_hwmod,
3348         .clk            = "l3_iclk_div",
3349         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3350 };
3351
3352 /* l4_per3 -> mailbox9 */
3353 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
3354         .master         = &dra7xx_l4_per3_hwmod,
3355         .slave          = &dra7xx_mailbox9_hwmod,
3356         .clk            = "l3_iclk_div",
3357         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3358 };
3359
3360 /* l4_per3 -> mailbox10 */
3361 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
3362         .master         = &dra7xx_l4_per3_hwmod,
3363         .slave          = &dra7xx_mailbox10_hwmod,
3364         .clk            = "l3_iclk_div",
3365         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3366 };
3367
3368 /* l4_per3 -> mailbox11 */
3369 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
3370         .master         = &dra7xx_l4_per3_hwmod,
3371         .slave          = &dra7xx_mailbox11_hwmod,
3372         .clk            = "l3_iclk_div",
3373         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3374 };
3375
3376 /* l4_per3 -> mailbox12 */
3377 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
3378         .master         = &dra7xx_l4_per3_hwmod,
3379         .slave          = &dra7xx_mailbox12_hwmod,
3380         .clk            = "l3_iclk_div",
3381         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3382 };
3383
3384 /* l4_per3 -> mailbox13 */
3385 static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
3386         .master         = &dra7xx_l4_per3_hwmod,
3387         .slave          = &dra7xx_mailbox13_hwmod,
3388         .clk            = "l3_iclk_div",
3389         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3390 };
3391
3392 /* l4_per1 -> mcspi1 */
3393 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
3394         .master         = &dra7xx_l4_per1_hwmod,
3395         .slave          = &dra7xx_mcspi1_hwmod,
3396         .clk            = "l3_iclk_div",
3397         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3398 };
3399
3400 /* l4_per1 -> mcspi2 */
3401 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
3402         .master         = &dra7xx_l4_per1_hwmod,
3403         .slave          = &dra7xx_mcspi2_hwmod,
3404         .clk            = "l3_iclk_div",
3405         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3406 };
3407
3408 /* l4_per1 -> mcspi3 */
3409 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
3410         .master         = &dra7xx_l4_per1_hwmod,
3411         .slave          = &dra7xx_mcspi3_hwmod,
3412         .clk            = "l3_iclk_div",
3413         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3414 };
3415
3416 /* l4_per1 -> mcspi4 */
3417 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
3418         .master         = &dra7xx_l4_per1_hwmod,
3419         .slave          = &dra7xx_mcspi4_hwmod,
3420         .clk            = "l3_iclk_div",
3421         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3422 };
3423
3424 /* l4_per1 -> mmc1 */
3425 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
3426         .master         = &dra7xx_l4_per1_hwmod,
3427         .slave          = &dra7xx_mmc1_hwmod,
3428         .clk            = "l3_iclk_div",
3429         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3430 };
3431
3432 /* l4_per1 -> mmc2 */
3433 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
3434         .master         = &dra7xx_l4_per1_hwmod,
3435         .slave          = &dra7xx_mmc2_hwmod,
3436         .clk            = "l3_iclk_div",
3437         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3438 };
3439
3440 /* l4_per1 -> mmc3 */
3441 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
3442         .master         = &dra7xx_l4_per1_hwmod,
3443         .slave          = &dra7xx_mmc3_hwmod,
3444         .clk            = "l3_iclk_div",
3445         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3446 };
3447
3448 /* l4_per1 -> mmc4 */
3449 static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
3450         .master         = &dra7xx_l4_per1_hwmod,
3451         .slave          = &dra7xx_mmc4_hwmod,
3452         .clk            = "l3_iclk_div",
3453         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3454 };
3455
3456 /* l4_cfg -> mpu */
3457 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
3458         .master         = &dra7xx_l4_cfg_hwmod,
3459         .slave          = &dra7xx_mpu_hwmod,
3460         .clk            = "l3_iclk_div",
3461         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3462 };
3463
3464 /* l4_cfg -> ocp2scp1 */
3465 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
3466         .master         = &dra7xx_l4_cfg_hwmod,
3467         .slave          = &dra7xx_ocp2scp1_hwmod,
3468         .clk            = "l4_root_clk_div",
3469         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3470 };
3471
3472 /* l4_cfg -> ocp2scp3 */
3473 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
3474         .master         = &dra7xx_l4_cfg_hwmod,
3475         .slave          = &dra7xx_ocp2scp3_hwmod,
3476         .clk            = "l4_root_clk_div",
3477         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3478 };
3479
3480 /* l3_main_1 -> pciess1 */
3481 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
3482         .master         = &dra7xx_l3_main_1_hwmod,
3483         .slave          = &dra7xx_pciess1_hwmod,
3484         .clk            = "l3_iclk_div",
3485         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3486 };
3487
3488 /* l4_cfg -> pciess1 */
3489 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
3490         .master         = &dra7xx_l4_cfg_hwmod,
3491         .slave          = &dra7xx_pciess1_hwmod,
3492         .clk            = "l4_root_clk_div",
3493         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3494 };
3495
3496 /* l3_main_1 -> pciess2 */
3497 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
3498         .master         = &dra7xx_l3_main_1_hwmod,
3499         .slave          = &dra7xx_pciess2_hwmod,
3500         .clk            = "l3_iclk_div",
3501         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3502 };
3503
3504 /* l4_cfg -> pciess2 */
3505 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
3506         .master         = &dra7xx_l4_cfg_hwmod,
3507         .slave          = &dra7xx_pciess2_hwmod,
3508         .clk            = "l4_root_clk_div",
3509         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3510 };
3511
3512 /* l3_main_1 -> qspi */
3513 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
3514         .master         = &dra7xx_l3_main_1_hwmod,
3515         .slave          = &dra7xx_qspi_hwmod,
3516         .clk            = "l3_iclk_div",
3517         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3518 };
3519
3520 /* l4_per3 -> rtcss */
3521 static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
3522         .master         = &dra7xx_l4_per3_hwmod,
3523         .slave          = &dra7xx_rtcss_hwmod,
3524         .clk            = "l4_root_clk_div",
3525         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3526 };
3527
3528 /* l4_cfg -> sata */
3529 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
3530         .master         = &dra7xx_l4_cfg_hwmod,
3531         .slave          = &dra7xx_sata_hwmod,
3532         .clk            = "l3_iclk_div",
3533         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3534 };
3535
3536 /* l4_cfg -> smartreflex_core */
3537 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
3538         .master         = &dra7xx_l4_cfg_hwmod,
3539         .slave          = &dra7xx_smartreflex_core_hwmod,
3540         .clk            = "l4_root_clk_div",
3541         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3542 };
3543
3544 /* l4_cfg -> smartreflex_mpu */
3545 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
3546         .master         = &dra7xx_l4_cfg_hwmod,
3547         .slave          = &dra7xx_smartreflex_mpu_hwmod,
3548         .clk            = "l4_root_clk_div",
3549         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3550 };
3551
3552 /* l4_cfg -> spinlock */
3553 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
3554         .master         = &dra7xx_l4_cfg_hwmod,
3555         .slave          = &dra7xx_spinlock_hwmod,
3556         .clk            = "l3_iclk_div",
3557         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3558 };
3559
3560 /* l4_wkup -> timer1 */
3561 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
3562         .master         = &dra7xx_l4_wkup_hwmod,
3563         .slave          = &dra7xx_timer1_hwmod,
3564         .clk            = "wkupaon_iclk_mux",
3565         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3566 };
3567
3568 /* l4_per1 -> timer2 */
3569 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
3570         .master         = &dra7xx_l4_per1_hwmod,
3571         .slave          = &dra7xx_timer2_hwmod,
3572         .clk            = "l3_iclk_div",
3573         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3574 };
3575
3576 /* l4_per1 -> timer3 */
3577 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
3578         .master         = &dra7xx_l4_per1_hwmod,
3579         .slave          = &dra7xx_timer3_hwmod,
3580         .clk            = "l3_iclk_div",
3581         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3582 };
3583
3584 /* l4_per1 -> timer4 */
3585 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
3586         .master         = &dra7xx_l4_per1_hwmod,
3587         .slave          = &dra7xx_timer4_hwmod,
3588         .clk            = "l3_iclk_div",
3589         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3590 };
3591
3592 /* l4_per3 -> timer5 */
3593 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
3594         .master         = &dra7xx_l4_per3_hwmod,
3595         .slave          = &dra7xx_timer5_hwmod,
3596         .clk            = "l3_iclk_div",
3597         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3598 };
3599
3600 /* l4_per3 -> timer6 */
3601 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
3602         .master         = &dra7xx_l4_per3_hwmod,
3603         .slave          = &dra7xx_timer6_hwmod,
3604         .clk            = "l3_iclk_div",
3605         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3606 };
3607
3608 /* l4_per3 -> timer7 */
3609 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
3610         .master         = &dra7xx_l4_per3_hwmod,
3611         .slave          = &dra7xx_timer7_hwmod,
3612         .clk            = "l3_iclk_div",
3613         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3614 };
3615
3616 /* l4_per3 -> timer8 */
3617 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
3618         .master         = &dra7xx_l4_per3_hwmod,
3619         .slave          = &dra7xx_timer8_hwmod,
3620         .clk            = "l3_iclk_div",
3621         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3622 };
3623
3624 /* l4_per1 -> timer9 */
3625 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
3626         .master         = &dra7xx_l4_per1_hwmod,
3627         .slave          = &dra7xx_timer9_hwmod,
3628         .clk            = "l3_iclk_div",
3629         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3630 };
3631
3632 /* l4_per1 -> timer10 */
3633 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
3634         .master         = &dra7xx_l4_per1_hwmod,
3635         .slave          = &dra7xx_timer10_hwmod,
3636         .clk            = "l3_iclk_div",
3637         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3638 };
3639
3640 /* l4_per1 -> timer11 */
3641 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
3642         .master         = &dra7xx_l4_per1_hwmod,
3643         .slave          = &dra7xx_timer11_hwmod,
3644         .clk            = "l3_iclk_div",
3645         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3646 };
3647
3648 /* l4_wkup -> timer12 */
3649 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12 = {
3650         .master         = &dra7xx_l4_wkup_hwmod,
3651         .slave          = &dra7xx_timer12_hwmod,
3652         .clk            = "wkupaon_iclk_mux",
3653         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3654 };
3655
3656 /* l4_per3 -> timer13 */
3657 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
3658         .master         = &dra7xx_l4_per3_hwmod,
3659         .slave          = &dra7xx_timer13_hwmod,
3660         .clk            = "l3_iclk_div",
3661         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3662 };
3663
3664 /* l4_per3 -> timer14 */
3665 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
3666         .master         = &dra7xx_l4_per3_hwmod,
3667         .slave          = &dra7xx_timer14_hwmod,
3668         .clk            = "l3_iclk_div",
3669         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3670 };
3671
3672 /* l4_per3 -> timer15 */
3673 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
3674         .master         = &dra7xx_l4_per3_hwmod,
3675         .slave          = &dra7xx_timer15_hwmod,
3676         .clk            = "l3_iclk_div",
3677         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3678 };
3679
3680 /* l4_per3 -> timer16 */
3681 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
3682         .master         = &dra7xx_l4_per3_hwmod,
3683         .slave          = &dra7xx_timer16_hwmod,
3684         .clk            = "l3_iclk_div",
3685         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3686 };
3687
3688 /* l4_per1 -> uart1 */
3689 static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
3690         .master         = &dra7xx_l4_per1_hwmod,
3691         .slave          = &dra7xx_uart1_hwmod,
3692         .clk            = "l3_iclk_div",
3693         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3694 };
3695
3696 /* l4_per1 -> uart2 */
3697 static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
3698         .master         = &dra7xx_l4_per1_hwmod,
3699         .slave          = &dra7xx_uart2_hwmod,
3700         .clk            = "l3_iclk_div",
3701         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3702 };
3703
3704 /* l4_per1 -> uart3 */
3705 static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
3706         .master         = &dra7xx_l4_per1_hwmod,
3707         .slave          = &dra7xx_uart3_hwmod,
3708         .clk            = "l3_iclk_div",
3709         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3710 };
3711
3712 /* l4_per1 -> uart4 */
3713 static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
3714         .master         = &dra7xx_l4_per1_hwmod,
3715         .slave          = &dra7xx_uart4_hwmod,
3716         .clk            = "l3_iclk_div",
3717         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3718 };
3719
3720 /* l4_per1 -> uart5 */
3721 static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
3722         .master         = &dra7xx_l4_per1_hwmod,
3723         .slave          = &dra7xx_uart5_hwmod,
3724         .clk            = "l3_iclk_div",
3725         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3726 };
3727
3728 /* l4_per1 -> uart6 */
3729 static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
3730         .master         = &dra7xx_l4_per1_hwmod,
3731         .slave          = &dra7xx_uart6_hwmod,
3732         .clk            = "l3_iclk_div",
3733         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3734 };
3735
3736 /* l4_per2 -> uart7 */
3737 static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = {
3738         .master         = &dra7xx_l4_per2_hwmod,
3739         .slave          = &dra7xx_uart7_hwmod,
3740         .clk            = "l3_iclk_div",
3741         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3742 };
3743
3744 /* l4_per1 -> des */
3745 static struct omap_hwmod_ocp_if dra7xx_l4_per1__des = {
3746         .master         = &dra7xx_l4_per1_hwmod,
3747         .slave          = &dra7xx_des_hwmod,
3748         .clk            = "l3_iclk_div",
3749         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3750 };
3751
3752 /* l4_per2 -> uart8 */
3753 static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = {
3754         .master         = &dra7xx_l4_per2_hwmod,
3755         .slave          = &dra7xx_uart8_hwmod,
3756         .clk            = "l3_iclk_div",
3757         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3758 };
3759
3760 /* l4_per2 -> uart9 */
3761 static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart9 = {
3762         .master         = &dra7xx_l4_per2_hwmod,
3763         .slave          = &dra7xx_uart9_hwmod,
3764         .clk            = "l3_iclk_div",
3765         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3766 };
3767
3768 /* l4_wkup -> uart10 */
3769 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = {
3770         .master         = &dra7xx_l4_wkup_hwmod,
3771         .slave          = &dra7xx_uart10_hwmod,
3772         .clk            = "wkupaon_iclk_mux",
3773         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3774 };
3775
3776 /* l4_per1 -> rng */
3777 static struct omap_hwmod_ocp_if dra7xx_l4_per1__rng = {
3778         .master         = &dra7xx_l4_per1_hwmod,
3779         .slave          = &dra7xx_rng_hwmod,
3780         .user           = OCP_USER_MPU,
3781 };
3782
3783 /* l4_per3 -> usb_otg_ss1 */
3784 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
3785         .master         = &dra7xx_l4_per3_hwmod,
3786         .slave          = &dra7xx_usb_otg_ss1_hwmod,
3787         .clk            = "dpll_core_h13x2_ck",
3788         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3789 };
3790
3791 /* l4_per3 -> usb_otg_ss2 */
3792 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
3793         .master         = &dra7xx_l4_per3_hwmod,
3794         .slave          = &dra7xx_usb_otg_ss2_hwmod,
3795         .clk            = "dpll_core_h13x2_ck",
3796         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3797 };
3798
3799 /* l4_per3 -> usb_otg_ss3 */
3800 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
3801         .master         = &dra7xx_l4_per3_hwmod,
3802         .slave          = &dra7xx_usb_otg_ss3_hwmod,
3803         .clk            = "dpll_core_h13x2_ck",
3804         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3805 };
3806
3807 /* l4_per3 -> usb_otg_ss4 */
3808 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
3809         .master         = &dra7xx_l4_per3_hwmod,
3810         .slave          = &dra7xx_usb_otg_ss4_hwmod,
3811         .clk            = "dpll_core_h13x2_ck",
3812         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3813 };
3814
3815 /* l3_main_1 -> vcp1 */
3816 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
3817         .master         = &dra7xx_l3_main_1_hwmod,
3818         .slave          = &dra7xx_vcp1_hwmod,
3819         .clk            = "l3_iclk_div",
3820         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3821 };
3822
3823 /* l4_per2 -> vcp1 */
3824 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
3825         .master         = &dra7xx_l4_per2_hwmod,
3826         .slave          = &dra7xx_vcp1_hwmod,
3827         .clk            = "l3_iclk_div",
3828         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3829 };
3830
3831 /* l3_main_1 -> vcp2 */
3832 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
3833         .master         = &dra7xx_l3_main_1_hwmod,
3834         .slave          = &dra7xx_vcp2_hwmod,
3835         .clk            = "l3_iclk_div",
3836         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3837 };
3838
3839 /* l4_per2 -> vcp2 */
3840 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
3841         .master         = &dra7xx_l4_per2_hwmod,
3842         .slave          = &dra7xx_vcp2_hwmod,
3843         .clk            = "l3_iclk_div",
3844         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3845 };
3846
3847 /* l4_wkup -> wd_timer2 */
3848 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
3849         .master         = &dra7xx_l4_wkup_hwmod,
3850         .slave          = &dra7xx_wd_timer2_hwmod,
3851         .clk            = "wkupaon_iclk_mux",
3852         .user           = OCP_USER_MPU | OCP_USER_SDMA,
3853 };
3854
3855 /* l4_per2 -> epwmss0 */
3856 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
3857         .master         = &dra7xx_l4_per2_hwmod,
3858         .slave          = &dra7xx_epwmss0_hwmod,
3859         .clk            = "l4_root_clk_div",
3860         .user           = OCP_USER_MPU,
3861 };
3862
3863 /* l4_per2 -> epwmss1 */
3864 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
3865         .master         = &dra7xx_l4_per2_hwmod,
3866         .slave          = &dra7xx_epwmss1_hwmod,
3867         .clk            = "l4_root_clk_div",
3868         .user           = OCP_USER_MPU,
3869 };
3870
3871 /* l4_per2 -> epwmss2 */
3872 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
3873         .master         = &dra7xx_l4_per2_hwmod,
3874         .slave          = &dra7xx_epwmss2_hwmod,
3875         .clk            = "l4_root_clk_div",
3876         .user           = OCP_USER_MPU,
3877 };
3878
3879 static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3880         &dra7xx_l3_main_1__dmm,
3881         &dra7xx_l3_main_2__l3_instr,
3882         &dra7xx_l4_cfg__l3_main_1,
3883         &dra7xx_mpu__l3_main_1,
3884         &dra7xx_l3_main_1__l3_main_2,
3885         &dra7xx_l4_cfg__l3_main_2,
3886         &dra7xx_l3_main_1__l4_cfg,
3887         &dra7xx_l3_main_1__l4_per1,
3888         &dra7xx_l3_main_1__l4_per2,
3889         &dra7xx_l3_main_1__l4_per3,
3890         &dra7xx_l3_main_1__l4_wkup,
3891         &dra7xx_l4_per2__atl,
3892         &dra7xx_l3_main_1__bb2d,
3893         &dra7xx_l4_wkup__counter_32k,
3894         &dra7xx_l4_wkup__ctrl_module_wkup,
3895         &dra7xx_l4_wkup__dcan1,
3896         &dra7xx_l4_per2__dcan2,
3897         &dra7xx_l4_per2__cpgmac0,
3898         &dra7xx_l4_per2__mcasp1,
3899         &dra7xx_l3_main_1__mcasp1,
3900         &dra7xx_l4_per2__mcasp2,
3901         &dra7xx_l3_main_1__mcasp2,
3902         &dra7xx_l4_per2__mcasp3,
3903         &dra7xx_l3_main_1__mcasp3,
3904         &dra7xx_l4_per2__mcasp4,
3905         &dra7xx_l4_per2__mcasp5,
3906         &dra7xx_l4_per2__mcasp6,
3907         &dra7xx_l4_per2__mcasp7,
3908         &dra7xx_l4_per2__mcasp8,
3909         &dra7xx_gmac__mdio,
3910         &dra7xx_l4_cfg__dma_system,
3911         &dra7xx_l3_main_1__tpcc,
3912         &dra7xx_l3_main_1__tptc0,
3913         &dra7xx_l3_main_1__tptc1,
3914         &dra7xx_l3_main_1__dss,
3915         &dra7xx_l3_main_1__dispc,
3916         &dra7xx_l3_main_1__hdmi,
3917         &dra7xx_l3_main_1__aes1,
3918         &dra7xx_l3_main_1__aes2,
3919         &dra7xx_l3_main_1__sha0,
3920         &dra7xx_l4_per1__elm,
3921         &dra7xx_l4_wkup__gpio1,
3922         &dra7xx_l4_per1__gpio2,
3923         &dra7xx_l4_per1__gpio3,
3924         &dra7xx_l4_per1__gpio4,
3925         &dra7xx_l4_per1__gpio5,
3926         &dra7xx_l4_per1__gpio6,
3927         &dra7xx_l4_per1__gpio7,
3928         &dra7xx_l4_per1__gpio8,
3929         &dra7xx_l3_main_1__gpmc,
3930         &dra7xx_l4_per1__hdq1w,
3931         &dra7xx_l4_per1__i2c1,
3932         &dra7xx_l4_per1__i2c2,
3933         &dra7xx_l4_per1__i2c3,
3934         &dra7xx_l4_per1__i2c4,
3935         &dra7xx_l4_per1__i2c5,
3936         &dra7xx_l4_cfg__mailbox1,
3937         &dra7xx_l4_per3__mailbox2,
3938         &dra7xx_l4_per3__mailbox3,
3939         &dra7xx_l4_per3__mailbox4,
3940         &dra7xx_l4_per3__mailbox5,
3941         &dra7xx_l4_per3__mailbox6,
3942         &dra7xx_l4_per3__mailbox7,
3943         &dra7xx_l4_per3__mailbox8,
3944         &dra7xx_l4_per3__mailbox9,
3945         &dra7xx_l4_per3__mailbox10,
3946         &dra7xx_l4_per3__mailbox11,
3947         &dra7xx_l4_per3__mailbox12,
3948         &dra7xx_l4_per3__mailbox13,
3949         &dra7xx_l4_per1__mcspi1,
3950         &dra7xx_l4_per1__mcspi2,
3951         &dra7xx_l4_per1__mcspi3,
3952         &dra7xx_l4_per1__mcspi4,
3953         &dra7xx_l4_per1__mmc1,
3954         &dra7xx_l4_per1__mmc2,
3955         &dra7xx_l4_per1__mmc3,
3956         &dra7xx_l4_per1__mmc4,
3957         &dra7xx_l4_cfg__mpu,
3958         &dra7xx_l4_cfg__ocp2scp1,
3959         &dra7xx_l4_cfg__ocp2scp3,
3960         &dra7xx_l3_main_1__pciess1,
3961         &dra7xx_l4_cfg__pciess1,
3962         &dra7xx_l3_main_1__pciess2,
3963         &dra7xx_l4_cfg__pciess2,
3964         &dra7xx_l3_main_1__qspi,
3965         &dra7xx_l4_cfg__sata,
3966         &dra7xx_l4_cfg__smartreflex_core,
3967         &dra7xx_l4_cfg__smartreflex_mpu,
3968         &dra7xx_l4_cfg__spinlock,
3969         &dra7xx_l4_wkup__timer1,
3970         &dra7xx_l4_per1__timer2,
3971         &dra7xx_l4_per1__timer3,
3972         &dra7xx_l4_per1__timer4,
3973         &dra7xx_l4_per3__timer5,
3974         &dra7xx_l4_per3__timer6,
3975         &dra7xx_l4_per3__timer7,
3976         &dra7xx_l4_per3__timer8,
3977         &dra7xx_l4_per1__timer9,
3978         &dra7xx_l4_per1__timer10,
3979         &dra7xx_l4_per1__timer11,
3980         &dra7xx_l4_per3__timer13,
3981         &dra7xx_l4_per3__timer14,
3982         &dra7xx_l4_per3__timer15,
3983         &dra7xx_l4_per3__timer16,
3984         &dra7xx_l4_per1__uart1,
3985         &dra7xx_l4_per1__uart2,
3986         &dra7xx_l4_per1__uart3,
3987         &dra7xx_l4_per1__uart4,
3988         &dra7xx_l4_per1__uart5,
3989         &dra7xx_l4_per1__uart6,
3990         &dra7xx_l4_per2__uart7,
3991         &dra7xx_l4_per2__uart8,
3992         &dra7xx_l4_per2__uart9,
3993         &dra7xx_l4_wkup__uart10,
3994         &dra7xx_l4_per1__des,
3995         &dra7xx_l4_per3__usb_otg_ss1,
3996         &dra7xx_l4_per3__usb_otg_ss2,
3997         &dra7xx_l4_per3__usb_otg_ss3,
3998         &dra7xx_l3_main_1__vcp1,
3999         &dra7xx_l4_per2__vcp1,
4000         &dra7xx_l3_main_1__vcp2,
4001         &dra7xx_l4_per2__vcp2,
4002         &dra7xx_l4_wkup__wd_timer2,
4003         &dra7xx_l4_per2__epwmss0,
4004         &dra7xx_l4_per2__epwmss1,
4005         &dra7xx_l4_per2__epwmss2,
4006         NULL,
4007 };
4008
4009 /* GP-only hwmod links */
4010 static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
4011         &dra7xx_l4_wkup__timer12,
4012         &dra7xx_l4_per1__rng,
4013         NULL,
4014 };
4015
4016 /* SoC variant specific hwmod links */
4017 static struct omap_hwmod_ocp_if *dra76x_hwmod_ocp_ifs[] __initdata = {
4018         &dra7xx_l4_per3__usb_otg_ss4,
4019         NULL,
4020 };
4021
4022 static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
4023         &dra7xx_l4_per3__usb_otg_ss4,
4024         NULL,
4025 };
4026
4027 static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
4028         NULL,
4029 };
4030
4031 static struct omap_hwmod_ocp_if *dra74x_dra72x_hwmod_ocp_ifs[] __initdata = {
4032         &dra7xx_l4_per3__rtcss,
4033         NULL,
4034 };
4035
4036 int __init dra7xx_hwmod_init(void)
4037 {
4038         int ret;
4039
4040         omap_hwmod_init();
4041         ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
4042
4043         if (!ret && soc_is_dra74x())
4044                 ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
4045         else if (!ret && soc_is_dra72x())
4046                 ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
4047         else if (!ret && soc_is_dra76x())
4048                 ret = omap_hwmod_register_links(dra76x_hwmod_ocp_ifs);
4049
4050         if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
4051                 ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
4052
4053         /* now for the IPs available only in dra74 and dra72 */
4054         if (!ret && !of_machine_is_compatible("ti,dra718") && !soc_is_dra76x())
4055                 ret = omap_hwmod_register_links(dra74x_dra72x_hwmod_ocp_ifs);
4056
4057         return ret;
4058 }