treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm / mach-omap2 / omap_hwmod_7xx_data.c
blobf8715bd9668706c94f2dadcd47de30000a4c97ef
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Hardware modules present on the DRA7xx chips
5 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
7 * Paul Walmsley
8 * Benoit Cousson
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
17 #include <linux/io.h>
18 #include <linux/power/smartreflex.h>
20 #include <linux/omap-dma.h>
22 #include "omap_hwmod.h"
23 #include "omap_hwmod_common_data.h"
24 #include "cm1_7xx.h"
25 #include "cm2_7xx.h"
26 #include "prm7xx.h"
27 #include "soc.h"
29 /* Base offset for all DRA7XX interrupts external to MPUSS */
30 #define DRA7XX_IRQ_GIC_START 32
32 /* Base offset for all DRA7XX dma requests */
33 #define DRA7XX_DMA_REQ_START 1
37 * IP blocks
41 * 'dmm' class
42 * instance(s): dmm
44 static struct omap_hwmod_class dra7xx_dmm_hwmod_class = {
45 .name = "dmm",
48 /* dmm */
49 static struct omap_hwmod dra7xx_dmm_hwmod = {
50 .name = "dmm",
51 .class = &dra7xx_dmm_hwmod_class,
52 .clkdm_name = "emif_clkdm",
53 .prcm = {
54 .omap4 = {
55 .clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
56 .context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET,
62 * 'l3' class
63 * instance(s): l3_instr, l3_main_1, l3_main_2
65 static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
66 .name = "l3",
69 /* l3_instr */
70 static struct omap_hwmod dra7xx_l3_instr_hwmod = {
71 .name = "l3_instr",
72 .class = &dra7xx_l3_hwmod_class,
73 .clkdm_name = "l3instr_clkdm",
74 .prcm = {
75 .omap4 = {
76 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
77 .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
78 .modulemode = MODULEMODE_HWCTRL,
83 /* l3_main_1 */
84 static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
85 .name = "l3_main_1",
86 .class = &dra7xx_l3_hwmod_class,
87 .clkdm_name = "l3main1_clkdm",
88 .prcm = {
89 .omap4 = {
90 .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
91 .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
96 /* l3_main_2 */
97 static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
98 .name = "l3_main_2",
99 .class = &dra7xx_l3_hwmod_class,
100 .clkdm_name = "l3instr_clkdm",
101 .prcm = {
102 .omap4 = {
103 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
104 .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
105 .modulemode = MODULEMODE_HWCTRL,
111 * 'l4' class
112 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
114 static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
115 .name = "l4",
118 /* l4_cfg */
119 static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
120 .name = "l4_cfg",
121 .class = &dra7xx_l4_hwmod_class,
122 .clkdm_name = "l4cfg_clkdm",
123 .prcm = {
124 .omap4 = {
125 .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
126 .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
131 /* l4_per1 */
132 static struct omap_hwmod dra7xx_l4_per1_hwmod = {
133 .name = "l4_per1",
134 .class = &dra7xx_l4_hwmod_class,
135 .clkdm_name = "l4per_clkdm",
136 .prcm = {
137 .omap4 = {
138 .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
139 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
144 /* l4_per2 */
145 static struct omap_hwmod dra7xx_l4_per2_hwmod = {
146 .name = "l4_per2",
147 .class = &dra7xx_l4_hwmod_class,
148 .clkdm_name = "l4per2_clkdm",
149 .prcm = {
150 .omap4 = {
151 .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
152 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
157 /* l4_per3 */
158 static struct omap_hwmod dra7xx_l4_per3_hwmod = {
159 .name = "l4_per3",
160 .class = &dra7xx_l4_hwmod_class,
161 .clkdm_name = "l4per3_clkdm",
162 .prcm = {
163 .omap4 = {
164 .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
165 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
170 /* l4_wkup */
171 static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
172 .name = "l4_wkup",
173 .class = &dra7xx_l4_hwmod_class,
174 .clkdm_name = "wkupaon_clkdm",
175 .prcm = {
176 .omap4 = {
177 .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
178 .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
184 * 'atl' class
188 static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
189 .name = "atl",
192 /* atl */
193 static struct omap_hwmod dra7xx_atl_hwmod = {
194 .name = "atl",
195 .class = &dra7xx_atl_hwmod_class,
196 .clkdm_name = "atl_clkdm",
197 .main_clk = "atl_gfclk_mux",
198 .prcm = {
199 .omap4 = {
200 .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
201 .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
202 .modulemode = MODULEMODE_SWCTRL,
208 * 'bb2d' class
212 static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
213 .name = "bb2d",
216 /* bb2d */
217 static struct omap_hwmod dra7xx_bb2d_hwmod = {
218 .name = "bb2d",
219 .class = &dra7xx_bb2d_hwmod_class,
220 .clkdm_name = "dss_clkdm",
221 .main_clk = "dpll_core_h24x2_ck",
222 .prcm = {
223 .omap4 = {
224 .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
225 .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
226 .modulemode = MODULEMODE_SWCTRL,
232 * 'counter' class
236 static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
237 .rev_offs = 0x0000,
238 .sysc_offs = 0x0010,
239 .sysc_flags = SYSC_HAS_SIDLEMODE,
240 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
241 SIDLE_SMART_WKUP),
242 .sysc_fields = &omap_hwmod_sysc_type1,
245 static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
246 .name = "counter",
247 .sysc = &dra7xx_counter_sysc,
250 /* counter_32k */
251 static struct omap_hwmod dra7xx_counter_32k_hwmod = {
252 .name = "counter_32k",
253 .class = &dra7xx_counter_hwmod_class,
254 .clkdm_name = "wkupaon_clkdm",
255 .flags = HWMOD_SWSUP_SIDLE,
256 .main_clk = "wkupaon_iclk_mux",
257 .prcm = {
258 .omap4 = {
259 .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
260 .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
266 * 'ctrl_module' class
270 static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
271 .name = "ctrl_module",
274 /* ctrl_module_wkup */
275 static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
276 .name = "ctrl_module_wkup",
277 .class = &dra7xx_ctrl_module_hwmod_class,
278 .clkdm_name = "wkupaon_clkdm",
279 .prcm = {
280 .omap4 = {
281 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
287 * 'dcan' class
291 static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
292 .name = "dcan",
295 /* dcan1 */
296 static struct omap_hwmod dra7xx_dcan1_hwmod = {
297 .name = "dcan1",
298 .class = &dra7xx_dcan_hwmod_class,
299 .clkdm_name = "wkupaon_clkdm",
300 .main_clk = "dcan1_sys_clk_mux",
301 .flags = HWMOD_CLKDM_NOAUTO,
302 .prcm = {
303 .omap4 = {
304 .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
305 .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
306 .modulemode = MODULEMODE_SWCTRL,
311 /* dcan2 */
312 static struct omap_hwmod dra7xx_dcan2_hwmod = {
313 .name = "dcan2",
314 .class = &dra7xx_dcan_hwmod_class,
315 .clkdm_name = "l4per2_clkdm",
316 .main_clk = "sys_clkin1",
317 .flags = HWMOD_CLKDM_NOAUTO,
318 .prcm = {
319 .omap4 = {
320 .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
321 .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
322 .modulemode = MODULEMODE_SWCTRL,
327 /* pwmss */
328 static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
329 .rev_offs = 0x0,
330 .sysc_offs = 0x4,
331 .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
332 SYSC_HAS_RESET_STATUS,
333 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
334 .sysc_fields = &omap_hwmod_sysc_type2,
338 * epwmss class
340 static struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
341 .name = "epwmss",
342 .sysc = &dra7xx_epwmss_sysc,
345 /* epwmss0 */
346 static struct omap_hwmod dra7xx_epwmss0_hwmod = {
347 .name = "epwmss0",
348 .class = &dra7xx_epwmss_hwmod_class,
349 .clkdm_name = "l4per2_clkdm",
350 .main_clk = "l4_root_clk_div",
351 .prcm = {
352 .omap4 = {
353 .modulemode = MODULEMODE_SWCTRL,
354 .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
355 .context_offs = DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
360 /* epwmss1 */
361 static struct omap_hwmod dra7xx_epwmss1_hwmod = {
362 .name = "epwmss1",
363 .class = &dra7xx_epwmss_hwmod_class,
364 .clkdm_name = "l4per2_clkdm",
365 .main_clk = "l4_root_clk_div",
366 .prcm = {
367 .omap4 = {
368 .modulemode = MODULEMODE_SWCTRL,
369 .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
370 .context_offs = DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
375 /* epwmss2 */
376 static struct omap_hwmod dra7xx_epwmss2_hwmod = {
377 .name = "epwmss2",
378 .class = &dra7xx_epwmss_hwmod_class,
379 .clkdm_name = "l4per2_clkdm",
380 .main_clk = "l4_root_clk_div",
381 .prcm = {
382 .omap4 = {
383 .modulemode = MODULEMODE_SWCTRL,
384 .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
385 .context_offs = DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
391 * 'dma' class
395 static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
396 .rev_offs = 0x0000,
397 .sysc_offs = 0x002c,
398 .syss_offs = 0x0028,
399 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
400 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
401 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
402 SYSS_HAS_RESET_STATUS),
403 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
404 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
405 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
406 .sysc_fields = &omap_hwmod_sysc_type1,
409 static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
410 .name = "dma",
411 .sysc = &dra7xx_dma_sysc,
414 /* dma dev_attr */
415 static struct omap_dma_dev_attr dma_dev_attr = {
416 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
417 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
418 .lch_count = 32,
421 /* dma_system */
422 static struct omap_hwmod dra7xx_dma_system_hwmod = {
423 .name = "dma_system",
424 .class = &dra7xx_dma_hwmod_class,
425 .clkdm_name = "dma_clkdm",
426 .main_clk = "l3_iclk_div",
427 .prcm = {
428 .omap4 = {
429 .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
430 .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
433 .dev_attr = &dma_dev_attr,
437 * 'tpcc' class
440 static struct omap_hwmod_class dra7xx_tpcc_hwmod_class = {
441 .name = "tpcc",
444 static struct omap_hwmod dra7xx_tpcc_hwmod = {
445 .name = "tpcc",
446 .class = &dra7xx_tpcc_hwmod_class,
447 .clkdm_name = "l3main1_clkdm",
448 .main_clk = "l3_iclk_div",
449 .prcm = {
450 .omap4 = {
451 .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET,
452 .context_offs = DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET,
458 * 'tptc' class
461 static struct omap_hwmod_class dra7xx_tptc_hwmod_class = {
462 .name = "tptc",
465 /* tptc0 */
466 static struct omap_hwmod dra7xx_tptc0_hwmod = {
467 .name = "tptc0",
468 .class = &dra7xx_tptc_hwmod_class,
469 .clkdm_name = "l3main1_clkdm",
470 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
471 .main_clk = "l3_iclk_div",
472 .prcm = {
473 .omap4 = {
474 .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET,
475 .context_offs = DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET,
476 .modulemode = MODULEMODE_HWCTRL,
481 /* tptc1 */
482 static struct omap_hwmod dra7xx_tptc1_hwmod = {
483 .name = "tptc1",
484 .class = &dra7xx_tptc_hwmod_class,
485 .clkdm_name = "l3main1_clkdm",
486 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
487 .main_clk = "l3_iclk_div",
488 .prcm = {
489 .omap4 = {
490 .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET,
491 .context_offs = DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET,
492 .modulemode = MODULEMODE_HWCTRL,
498 * 'dss' class
502 static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
503 .rev_offs = 0x0000,
504 .syss_offs = 0x0014,
505 .sysc_flags = SYSS_HAS_RESET_STATUS,
508 static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
509 .name = "dss",
510 .sysc = &dra7xx_dss_sysc,
511 .reset = omap_dss_reset,
514 /* dss */
515 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
516 { .role = "dss_clk", .clk = "dss_dss_clk" },
517 { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
518 { .role = "32khz_clk", .clk = "dss_32khz_clk" },
519 { .role = "video2_clk", .clk = "dss_video2_clk" },
520 { .role = "video1_clk", .clk = "dss_video1_clk" },
521 { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
522 { .role = "hdcp_clk", .clk = "dss_deshdcp_clk" },
525 static struct omap_hwmod dra7xx_dss_hwmod = {
526 .name = "dss_core",
527 .class = &dra7xx_dss_hwmod_class,
528 .clkdm_name = "dss_clkdm",
529 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
530 .main_clk = "dss_dss_clk",
531 .prcm = {
532 .omap4 = {
533 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
534 .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
535 .modulemode = MODULEMODE_SWCTRL,
538 .opt_clks = dss_opt_clks,
539 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
543 * 'dispc' class
544 * display controller
547 static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
548 .rev_offs = 0x0000,
549 .sysc_offs = 0x0010,
550 .syss_offs = 0x0014,
551 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
552 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
553 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
554 SYSS_HAS_RESET_STATUS),
555 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
556 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
557 .sysc_fields = &omap_hwmod_sysc_type1,
560 static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
561 .name = "dispc",
562 .sysc = &dra7xx_dispc_sysc,
565 /* dss_dispc */
566 /* dss_dispc dev_attr */
567 static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
568 .has_framedonetv_irq = 1,
569 .manager_count = 4,
572 static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
573 .name = "dss_dispc",
574 .class = &dra7xx_dispc_hwmod_class,
575 .clkdm_name = "dss_clkdm",
576 .main_clk = "dss_dss_clk",
577 .prcm = {
578 .omap4 = {
579 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
580 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
583 .dev_attr = &dss_dispc_dev_attr,
584 .parent_hwmod = &dra7xx_dss_hwmod,
588 * 'hdmi' class
589 * hdmi controller
592 static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
593 .rev_offs = 0x0000,
594 .sysc_offs = 0x0010,
595 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
596 SYSC_HAS_SOFTRESET),
597 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
598 SIDLE_SMART_WKUP),
599 .sysc_fields = &omap_hwmod_sysc_type2,
602 static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
603 .name = "hdmi",
604 .sysc = &dra7xx_hdmi_sysc,
607 /* dss_hdmi */
609 static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
610 { .role = "sys_clk", .clk = "dss_hdmi_clk" },
613 static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
614 .name = "dss_hdmi",
615 .class = &dra7xx_hdmi_hwmod_class,
616 .clkdm_name = "dss_clkdm",
617 .main_clk = "dss_48mhz_clk",
618 .prcm = {
619 .omap4 = {
620 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
621 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
624 .opt_clks = dss_hdmi_opt_clks,
625 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
626 .parent_hwmod = &dra7xx_dss_hwmod,
629 /* AES (the 'P' (public) device) */
630 static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
631 .rev_offs = 0x0080,
632 .sysc_offs = 0x0084,
633 .syss_offs = 0x0088,
634 .sysc_flags = SYSS_HAS_RESET_STATUS,
637 static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
638 .name = "aes",
639 .sysc = &dra7xx_aes_sysc,
642 /* AES1 */
643 static struct omap_hwmod dra7xx_aes1_hwmod = {
644 .name = "aes1",
645 .class = &dra7xx_aes_hwmod_class,
646 .clkdm_name = "l4sec_clkdm",
647 .main_clk = "l3_iclk_div",
648 .prcm = {
649 .omap4 = {
650 .clkctrl_offs = DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET,
651 .context_offs = DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET,
652 .modulemode = MODULEMODE_HWCTRL,
657 /* AES2 */
658 static struct omap_hwmod dra7xx_aes2_hwmod = {
659 .name = "aes2",
660 .class = &dra7xx_aes_hwmod_class,
661 .clkdm_name = "l4sec_clkdm",
662 .main_clk = "l3_iclk_div",
663 .prcm = {
664 .omap4 = {
665 .clkctrl_offs = DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET,
666 .context_offs = DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET,
667 .modulemode = MODULEMODE_HWCTRL,
672 /* sha0 HIB2 (the 'P' (public) device) */
673 static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
674 .rev_offs = 0x100,
675 .sysc_offs = 0x110,
676 .syss_offs = 0x114,
677 .sysc_flags = SYSS_HAS_RESET_STATUS,
680 static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
681 .name = "sham",
682 .sysc = &dra7xx_sha0_sysc,
685 static struct omap_hwmod dra7xx_sha0_hwmod = {
686 .name = "sham",
687 .class = &dra7xx_sha0_hwmod_class,
688 .clkdm_name = "l4sec_clkdm",
689 .main_clk = "l3_iclk_div",
690 .prcm = {
691 .omap4 = {
692 .clkctrl_offs = DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
693 .context_offs = DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
694 .modulemode = MODULEMODE_HWCTRL,
700 * 'elm' class
704 static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
705 .rev_offs = 0x0000,
706 .sysc_offs = 0x0010,
707 .syss_offs = 0x0014,
708 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
709 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
710 SYSS_HAS_RESET_STATUS),
711 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
712 SIDLE_SMART_WKUP),
713 .sysc_fields = &omap_hwmod_sysc_type1,
716 static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
717 .name = "elm",
718 .sysc = &dra7xx_elm_sysc,
721 /* elm */
723 static struct omap_hwmod dra7xx_elm_hwmod = {
724 .name = "elm",
725 .class = &dra7xx_elm_hwmod_class,
726 .clkdm_name = "l4per_clkdm",
727 .main_clk = "l3_iclk_div",
728 .prcm = {
729 .omap4 = {
730 .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
731 .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
737 * 'gpmc' class
741 static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
742 .rev_offs = 0x0000,
743 .sysc_offs = 0x0010,
744 .syss_offs = 0x0014,
745 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
746 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
747 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
748 .sysc_fields = &omap_hwmod_sysc_type1,
751 static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
752 .name = "gpmc",
753 .sysc = &dra7xx_gpmc_sysc,
756 /* gpmc */
758 static struct omap_hwmod dra7xx_gpmc_hwmod = {
759 .name = "gpmc",
760 .class = &dra7xx_gpmc_hwmod_class,
761 .clkdm_name = "l3main1_clkdm",
762 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
763 .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
764 .main_clk = "l3_iclk_div",
765 .prcm = {
766 .omap4 = {
767 .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
768 .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
769 .modulemode = MODULEMODE_HWCTRL,
777 * 'mpu' class
781 static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
782 .name = "mpu",
785 /* mpu */
786 static struct omap_hwmod dra7xx_mpu_hwmod = {
787 .name = "mpu",
788 .class = &dra7xx_mpu_hwmod_class,
789 .clkdm_name = "mpu_clkdm",
790 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
791 .main_clk = "dpll_mpu_m2_ck",
792 .prcm = {
793 .omap4 = {
794 .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
795 .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
801 * 'ocp2scp' class
805 static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
806 .rev_offs = 0x0000,
807 .sysc_offs = 0x0010,
808 .syss_offs = 0x0014,
809 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
810 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
811 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
812 .sysc_fields = &omap_hwmod_sysc_type1,
815 static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
816 .name = "ocp2scp",
817 .sysc = &dra7xx_ocp2scp_sysc,
820 /* ocp2scp1 */
821 static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
822 .name = "ocp2scp1",
823 .class = &dra7xx_ocp2scp_hwmod_class,
824 .clkdm_name = "l3init_clkdm",
825 .main_clk = "l4_root_clk_div",
826 .prcm = {
827 .omap4 = {
828 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
829 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
830 .modulemode = MODULEMODE_HWCTRL,
835 /* ocp2scp3 */
836 static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
837 .name = "ocp2scp3",
838 .class = &dra7xx_ocp2scp_hwmod_class,
839 .clkdm_name = "l3init_clkdm",
840 .main_clk = "l4_root_clk_div",
841 .prcm = {
842 .omap4 = {
843 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
844 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
845 .modulemode = MODULEMODE_HWCTRL,
851 * 'PCIE' class
856 * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
857 * functionality of OMAP HWMOD layer does not deassert the hardreset lines
858 * associated with an IP automatically leaving the driver to handle that
859 * by itself. This does not work for PCIeSS which needs the reset lines
860 * deasserted for the driver to start accessing registers.
862 * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
863 * lines after asserting them.
865 int dra7xx_pciess_reset(struct omap_hwmod *oh)
867 int i;
869 for (i = 0; i < oh->rst_lines_cnt; i++) {
870 omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
871 omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
874 return 0;
877 static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
878 .name = "pcie",
879 .reset = dra7xx_pciess_reset,
882 /* pcie1 */
883 static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
884 { .name = "pcie", .rst_shift = 0 },
887 static struct omap_hwmod dra7xx_pciess1_hwmod = {
888 .name = "pcie1",
889 .class = &dra7xx_pciess_hwmod_class,
890 .clkdm_name = "pcie_clkdm",
891 .rst_lines = dra7xx_pciess1_resets,
892 .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess1_resets),
893 .main_clk = "l4_root_clk_div",
894 .prcm = {
895 .omap4 = {
896 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
897 .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
898 .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
899 .modulemode = MODULEMODE_SWCTRL,
904 /* pcie2 */
905 static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
906 { .name = "pcie", .rst_shift = 1 },
909 /* pcie2 */
910 static struct omap_hwmod dra7xx_pciess2_hwmod = {
911 .name = "pcie2",
912 .class = &dra7xx_pciess_hwmod_class,
913 .clkdm_name = "pcie_clkdm",
914 .rst_lines = dra7xx_pciess2_resets,
915 .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess2_resets),
916 .main_clk = "l4_root_clk_div",
917 .prcm = {
918 .omap4 = {
919 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
920 .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
921 .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
922 .modulemode = MODULEMODE_SWCTRL,
928 * 'qspi' class
932 static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
933 .rev_offs = 0,
934 .sysc_offs = 0x0010,
935 .sysc_flags = SYSC_HAS_SIDLEMODE,
936 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
937 SIDLE_SMART_WKUP),
938 .sysc_fields = &omap_hwmod_sysc_type2,
941 static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
942 .name = "qspi",
943 .sysc = &dra7xx_qspi_sysc,
946 /* qspi */
947 static struct omap_hwmod dra7xx_qspi_hwmod = {
948 .name = "qspi",
949 .class = &dra7xx_qspi_hwmod_class,
950 .clkdm_name = "l4per2_clkdm",
951 .main_clk = "qspi_gfclk_div",
952 .prcm = {
953 .omap4 = {
954 .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
955 .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
956 .modulemode = MODULEMODE_SWCTRL,
962 * 'rtcss' class
965 static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
966 .rev_offs = 0x0074,
967 .sysc_offs = 0x0078,
968 .sysc_flags = SYSC_HAS_SIDLEMODE,
969 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
970 SIDLE_SMART_WKUP),
971 .sysc_fields = &omap_hwmod_sysc_type3,
974 static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
975 .name = "rtcss",
976 .sysc = &dra7xx_rtcss_sysc,
977 .unlock = &omap_hwmod_rtc_unlock,
978 .lock = &omap_hwmod_rtc_lock,
981 /* rtcss */
982 static struct omap_hwmod dra7xx_rtcss_hwmod = {
983 .name = "rtcss",
984 .class = &dra7xx_rtcss_hwmod_class,
985 .clkdm_name = "rtc_clkdm",
986 .main_clk = "sys_32k_ck",
987 .prcm = {
988 .omap4 = {
989 .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
990 .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
991 .modulemode = MODULEMODE_SWCTRL,
997 * 'sata' class
1001 static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
1002 .rev_offs = 0x00fc,
1003 .sysc_offs = 0x0000,
1004 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1005 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1006 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1007 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1008 .sysc_fields = &omap_hwmod_sysc_type2,
1011 static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
1012 .name = "sata",
1013 .sysc = &dra7xx_sata_sysc,
1016 /* sata */
1018 static struct omap_hwmod dra7xx_sata_hwmod = {
1019 .name = "sata",
1020 .class = &dra7xx_sata_hwmod_class,
1021 .clkdm_name = "l3init_clkdm",
1022 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1023 .main_clk = "func_48m_fclk",
1024 .mpu_rt_idx = 1,
1025 .prcm = {
1026 .omap4 = {
1027 .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
1028 .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
1029 .modulemode = MODULEMODE_SWCTRL,
1035 * 'smartreflex' class
1039 /* The IP is not compliant to type1 / type2 scheme */
1040 static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
1041 .rev_offs = -ENODEV,
1042 .sysc_offs = 0x0038,
1043 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
1044 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1045 SIDLE_SMART_WKUP),
1046 .sysc_fields = &omap36xx_sr_sysc_fields,
1049 static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
1050 .name = "smartreflex",
1051 .sysc = &dra7xx_smartreflex_sysc,
1054 /* smartreflex_core */
1055 /* smartreflex_core dev_attr */
1056 static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
1057 .sensor_voltdm_name = "core",
1060 static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
1061 .name = "smartreflex_core",
1062 .class = &dra7xx_smartreflex_hwmod_class,
1063 .clkdm_name = "coreaon_clkdm",
1064 .main_clk = "wkupaon_iclk_mux",
1065 .prcm = {
1066 .omap4 = {
1067 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
1068 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
1069 .modulemode = MODULEMODE_SWCTRL,
1072 .dev_attr = &smartreflex_core_dev_attr,
1075 /* smartreflex_mpu */
1076 /* smartreflex_mpu dev_attr */
1077 static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
1078 .sensor_voltdm_name = "mpu",
1081 static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
1082 .name = "smartreflex_mpu",
1083 .class = &dra7xx_smartreflex_hwmod_class,
1084 .clkdm_name = "coreaon_clkdm",
1085 .main_clk = "wkupaon_iclk_mux",
1086 .prcm = {
1087 .omap4 = {
1088 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
1089 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
1090 .modulemode = MODULEMODE_SWCTRL,
1093 .dev_attr = &smartreflex_mpu_dev_attr,
1097 * 'spinlock' class
1101 static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
1102 .rev_offs = 0x0000,
1103 .sysc_offs = 0x0010,
1104 .syss_offs = 0x0014,
1105 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1106 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1107 SYSS_HAS_RESET_STATUS),
1108 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1109 .sysc_fields = &omap_hwmod_sysc_type1,
1112 static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
1113 .name = "spinlock",
1114 .sysc = &dra7xx_spinlock_sysc,
1117 /* spinlock */
1118 static struct omap_hwmod dra7xx_spinlock_hwmod = {
1119 .name = "spinlock",
1120 .class = &dra7xx_spinlock_hwmod_class,
1121 .clkdm_name = "l4cfg_clkdm",
1122 .main_clk = "l3_iclk_div",
1123 .prcm = {
1124 .omap4 = {
1125 .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
1126 .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
1132 * 'timer' class
1134 * This class contains several variants: ['timer_1ms', 'timer_secure',
1135 * 'timer']
1138 static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
1139 .rev_offs = 0x0000,
1140 .sysc_offs = 0x0010,
1141 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1142 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1143 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1144 SIDLE_SMART_WKUP),
1145 .sysc_fields = &omap_hwmod_sysc_type2,
1148 static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1149 .name = "timer",
1150 .sysc = &dra7xx_timer_1ms_sysc,
1153 static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1154 .rev_offs = 0x0000,
1155 .sysc_offs = 0x0010,
1156 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1157 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1158 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1159 SIDLE_SMART_WKUP),
1160 .sysc_fields = &omap_hwmod_sysc_type2,
1163 static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
1164 .name = "timer",
1165 .sysc = &dra7xx_timer_sysc,
1168 /* timer1 */
1169 static struct omap_hwmod dra7xx_timer1_hwmod = {
1170 .name = "timer1",
1171 .class = &dra7xx_timer_1ms_hwmod_class,
1172 .clkdm_name = "wkupaon_clkdm",
1173 .main_clk = "timer1_gfclk_mux",
1174 .prcm = {
1175 .omap4 = {
1176 .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
1177 .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
1178 .modulemode = MODULEMODE_SWCTRL,
1183 /* timer2 */
1184 static struct omap_hwmod dra7xx_timer2_hwmod = {
1185 .name = "timer2",
1186 .class = &dra7xx_timer_1ms_hwmod_class,
1187 .clkdm_name = "l4per_clkdm",
1188 .main_clk = "timer2_gfclk_mux",
1189 .prcm = {
1190 .omap4 = {
1191 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
1192 .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
1193 .modulemode = MODULEMODE_SWCTRL,
1198 /* timer3 */
1199 static struct omap_hwmod dra7xx_timer3_hwmod = {
1200 .name = "timer3",
1201 .class = &dra7xx_timer_hwmod_class,
1202 .clkdm_name = "l4per_clkdm",
1203 .main_clk = "timer3_gfclk_mux",
1204 .prcm = {
1205 .omap4 = {
1206 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
1207 .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
1208 .modulemode = MODULEMODE_SWCTRL,
1213 /* timer4 */
1214 static struct omap_hwmod dra7xx_timer4_hwmod = {
1215 .name = "timer4",
1216 .class = &dra7xx_timer_hwmod_class,
1217 .clkdm_name = "l4per_clkdm",
1218 .main_clk = "timer4_gfclk_mux",
1219 .prcm = {
1220 .omap4 = {
1221 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
1222 .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
1223 .modulemode = MODULEMODE_SWCTRL,
1228 /* timer5 */
1229 static struct omap_hwmod dra7xx_timer5_hwmod = {
1230 .name = "timer5",
1231 .class = &dra7xx_timer_hwmod_class,
1232 .clkdm_name = "ipu_clkdm",
1233 .main_clk = "timer5_gfclk_mux",
1234 .prcm = {
1235 .omap4 = {
1236 .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
1237 .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
1238 .modulemode = MODULEMODE_SWCTRL,
1243 /* timer6 */
1244 static struct omap_hwmod dra7xx_timer6_hwmod = {
1245 .name = "timer6",
1246 .class = &dra7xx_timer_hwmod_class,
1247 .clkdm_name = "ipu_clkdm",
1248 .main_clk = "timer6_gfclk_mux",
1249 .prcm = {
1250 .omap4 = {
1251 .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
1252 .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
1253 .modulemode = MODULEMODE_SWCTRL,
1258 /* timer7 */
1259 static struct omap_hwmod dra7xx_timer7_hwmod = {
1260 .name = "timer7",
1261 .class = &dra7xx_timer_hwmod_class,
1262 .clkdm_name = "ipu_clkdm",
1263 .main_clk = "timer7_gfclk_mux",
1264 .prcm = {
1265 .omap4 = {
1266 .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
1267 .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
1268 .modulemode = MODULEMODE_SWCTRL,
1273 /* timer8 */
1274 static struct omap_hwmod dra7xx_timer8_hwmod = {
1275 .name = "timer8",
1276 .class = &dra7xx_timer_hwmod_class,
1277 .clkdm_name = "ipu_clkdm",
1278 .main_clk = "timer8_gfclk_mux",
1279 .prcm = {
1280 .omap4 = {
1281 .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
1282 .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
1283 .modulemode = MODULEMODE_SWCTRL,
1288 /* timer9 */
1289 static struct omap_hwmod dra7xx_timer9_hwmod = {
1290 .name = "timer9",
1291 .class = &dra7xx_timer_hwmod_class,
1292 .clkdm_name = "l4per_clkdm",
1293 .main_clk = "timer9_gfclk_mux",
1294 .prcm = {
1295 .omap4 = {
1296 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
1297 .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
1298 .modulemode = MODULEMODE_SWCTRL,
1303 /* timer10 */
1304 static struct omap_hwmod dra7xx_timer10_hwmod = {
1305 .name = "timer10",
1306 .class = &dra7xx_timer_1ms_hwmod_class,
1307 .clkdm_name = "l4per_clkdm",
1308 .main_clk = "timer10_gfclk_mux",
1309 .prcm = {
1310 .omap4 = {
1311 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
1312 .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
1313 .modulemode = MODULEMODE_SWCTRL,
1318 /* timer11 */
1319 static struct omap_hwmod dra7xx_timer11_hwmod = {
1320 .name = "timer11",
1321 .class = &dra7xx_timer_hwmod_class,
1322 .clkdm_name = "l4per_clkdm",
1323 .main_clk = "timer11_gfclk_mux",
1324 .prcm = {
1325 .omap4 = {
1326 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
1327 .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
1328 .modulemode = MODULEMODE_SWCTRL,
1333 /* timer12 */
1334 static struct omap_hwmod dra7xx_timer12_hwmod = {
1335 .name = "timer12",
1336 .class = &dra7xx_timer_hwmod_class,
1337 .clkdm_name = "wkupaon_clkdm",
1338 .main_clk = "secure_32k_clk_src_ck",
1339 .prcm = {
1340 .omap4 = {
1341 .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET,
1342 .context_offs = DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET,
1347 /* timer13 */
1348 static struct omap_hwmod dra7xx_timer13_hwmod = {
1349 .name = "timer13",
1350 .class = &dra7xx_timer_hwmod_class,
1351 .clkdm_name = "l4per3_clkdm",
1352 .main_clk = "timer13_gfclk_mux",
1353 .prcm = {
1354 .omap4 = {
1355 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
1356 .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
1357 .modulemode = MODULEMODE_SWCTRL,
1362 /* timer14 */
1363 static struct omap_hwmod dra7xx_timer14_hwmod = {
1364 .name = "timer14",
1365 .class = &dra7xx_timer_hwmod_class,
1366 .clkdm_name = "l4per3_clkdm",
1367 .main_clk = "timer14_gfclk_mux",
1368 .prcm = {
1369 .omap4 = {
1370 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
1371 .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
1372 .modulemode = MODULEMODE_SWCTRL,
1377 /* timer15 */
1378 static struct omap_hwmod dra7xx_timer15_hwmod = {
1379 .name = "timer15",
1380 .class = &dra7xx_timer_hwmod_class,
1381 .clkdm_name = "l4per3_clkdm",
1382 .main_clk = "timer15_gfclk_mux",
1383 .prcm = {
1384 .omap4 = {
1385 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
1386 .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
1387 .modulemode = MODULEMODE_SWCTRL,
1392 /* timer16 */
1393 static struct omap_hwmod dra7xx_timer16_hwmod = {
1394 .name = "timer16",
1395 .class = &dra7xx_timer_hwmod_class,
1396 .clkdm_name = "l4per3_clkdm",
1397 .main_clk = "timer16_gfclk_mux",
1398 .prcm = {
1399 .omap4 = {
1400 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
1401 .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
1402 .modulemode = MODULEMODE_SWCTRL,
1407 /* DES (the 'P' (public) device) */
1408 static struct omap_hwmod_class_sysconfig dra7xx_des_sysc = {
1409 .rev_offs = 0x0030,
1410 .sysc_offs = 0x0034,
1411 .syss_offs = 0x0038,
1412 .sysc_flags = SYSS_HAS_RESET_STATUS,
1415 static struct omap_hwmod_class dra7xx_des_hwmod_class = {
1416 .name = "des",
1417 .sysc = &dra7xx_des_sysc,
1420 /* DES */
1421 static struct omap_hwmod dra7xx_des_hwmod = {
1422 .name = "des",
1423 .class = &dra7xx_des_hwmod_class,
1424 .clkdm_name = "l4sec_clkdm",
1425 .main_clk = "l3_iclk_div",
1426 .prcm = {
1427 .omap4 = {
1428 .clkctrl_offs = DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET,
1429 .context_offs = DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET,
1430 .modulemode = MODULEMODE_HWCTRL,
1436 * 'usb_otg_ss' class
1440 static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
1441 .rev_offs = 0x0000,
1442 .sysc_offs = 0x0010,
1443 .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
1444 SYSC_HAS_SIDLEMODE),
1445 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1446 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1447 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1448 .sysc_fields = &omap_hwmod_sysc_type2,
1451 static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
1452 .name = "usb_otg_ss",
1453 .sysc = &dra7xx_usb_otg_ss_sysc,
1456 /* usb_otg_ss1 */
1457 static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
1458 { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
1461 static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
1462 .name = "usb_otg_ss1",
1463 .class = &dra7xx_usb_otg_ss_hwmod_class,
1464 .clkdm_name = "l3init_clkdm",
1465 .main_clk = "dpll_core_h13x2_ck",
1466 .flags = HWMOD_CLKDM_NOAUTO,
1467 .prcm = {
1468 .omap4 = {
1469 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
1470 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
1471 .modulemode = MODULEMODE_HWCTRL,
1474 .opt_clks = usb_otg_ss1_opt_clks,
1475 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
1478 /* usb_otg_ss2 */
1479 static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
1480 { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
1483 static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
1484 .name = "usb_otg_ss2",
1485 .class = &dra7xx_usb_otg_ss_hwmod_class,
1486 .clkdm_name = "l3init_clkdm",
1487 .main_clk = "dpll_core_h13x2_ck",
1488 .flags = HWMOD_CLKDM_NOAUTO,
1489 .prcm = {
1490 .omap4 = {
1491 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
1492 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
1493 .modulemode = MODULEMODE_HWCTRL,
1496 .opt_clks = usb_otg_ss2_opt_clks,
1497 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
1500 /* usb_otg_ss3 */
1501 static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
1502 .name = "usb_otg_ss3",
1503 .class = &dra7xx_usb_otg_ss_hwmod_class,
1504 .clkdm_name = "l3init_clkdm",
1505 .main_clk = "dpll_core_h13x2_ck",
1506 .prcm = {
1507 .omap4 = {
1508 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
1509 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
1510 .modulemode = MODULEMODE_HWCTRL,
1515 /* usb_otg_ss4 */
1516 static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
1517 .name = "usb_otg_ss4",
1518 .class = &dra7xx_usb_otg_ss_hwmod_class,
1519 .clkdm_name = "l3init_clkdm",
1520 .main_clk = "dpll_core_h13x2_ck",
1521 .prcm = {
1522 .omap4 = {
1523 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
1524 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
1525 .modulemode = MODULEMODE_HWCTRL,
1531 * 'vcp' class
1535 static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
1536 .name = "vcp",
1539 /* vcp1 */
1540 static struct omap_hwmod dra7xx_vcp1_hwmod = {
1541 .name = "vcp1",
1542 .class = &dra7xx_vcp_hwmod_class,
1543 .clkdm_name = "l3main1_clkdm",
1544 .main_clk = "l3_iclk_div",
1545 .prcm = {
1546 .omap4 = {
1547 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
1548 .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
1553 /* vcp2 */
1554 static struct omap_hwmod dra7xx_vcp2_hwmod = {
1555 .name = "vcp2",
1556 .class = &dra7xx_vcp_hwmod_class,
1557 .clkdm_name = "l3main1_clkdm",
1558 .main_clk = "l3_iclk_div",
1559 .prcm = {
1560 .omap4 = {
1561 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
1562 .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
1570 * Interfaces
1573 /* l3_main_1 -> dmm */
1574 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
1575 .master = &dra7xx_l3_main_1_hwmod,
1576 .slave = &dra7xx_dmm_hwmod,
1577 .clk = "l3_iclk_div",
1578 .user = OCP_USER_SDMA,
1581 /* l3_main_2 -> l3_instr */
1582 static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
1583 .master = &dra7xx_l3_main_2_hwmod,
1584 .slave = &dra7xx_l3_instr_hwmod,
1585 .clk = "l3_iclk_div",
1586 .user = OCP_USER_MPU | OCP_USER_SDMA,
1589 /* l4_cfg -> l3_main_1 */
1590 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
1591 .master = &dra7xx_l4_cfg_hwmod,
1592 .slave = &dra7xx_l3_main_1_hwmod,
1593 .clk = "l3_iclk_div",
1594 .user = OCP_USER_MPU | OCP_USER_SDMA,
1597 /* mpu -> l3_main_1 */
1598 static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
1599 .master = &dra7xx_mpu_hwmod,
1600 .slave = &dra7xx_l3_main_1_hwmod,
1601 .clk = "l3_iclk_div",
1602 .user = OCP_USER_MPU,
1605 /* l3_main_1 -> l3_main_2 */
1606 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
1607 .master = &dra7xx_l3_main_1_hwmod,
1608 .slave = &dra7xx_l3_main_2_hwmod,
1609 .clk = "l3_iclk_div",
1610 .user = OCP_USER_MPU,
1613 /* l4_cfg -> l3_main_2 */
1614 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
1615 .master = &dra7xx_l4_cfg_hwmod,
1616 .slave = &dra7xx_l3_main_2_hwmod,
1617 .clk = "l3_iclk_div",
1618 .user = OCP_USER_MPU | OCP_USER_SDMA,
1621 /* l3_main_1 -> l4_cfg */
1622 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
1623 .master = &dra7xx_l3_main_1_hwmod,
1624 .slave = &dra7xx_l4_cfg_hwmod,
1625 .clk = "l3_iclk_div",
1626 .user = OCP_USER_MPU | OCP_USER_SDMA,
1629 /* l3_main_1 -> l4_per1 */
1630 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
1631 .master = &dra7xx_l3_main_1_hwmod,
1632 .slave = &dra7xx_l4_per1_hwmod,
1633 .clk = "l3_iclk_div",
1634 .user = OCP_USER_MPU | OCP_USER_SDMA,
1637 /* l3_main_1 -> l4_per2 */
1638 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
1639 .master = &dra7xx_l3_main_1_hwmod,
1640 .slave = &dra7xx_l4_per2_hwmod,
1641 .clk = "l3_iclk_div",
1642 .user = OCP_USER_MPU | OCP_USER_SDMA,
1645 /* l3_main_1 -> l4_per3 */
1646 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
1647 .master = &dra7xx_l3_main_1_hwmod,
1648 .slave = &dra7xx_l4_per3_hwmod,
1649 .clk = "l3_iclk_div",
1650 .user = OCP_USER_MPU | OCP_USER_SDMA,
1653 /* l3_main_1 -> l4_wkup */
1654 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
1655 .master = &dra7xx_l3_main_1_hwmod,
1656 .slave = &dra7xx_l4_wkup_hwmod,
1657 .clk = "wkupaon_iclk_mux",
1658 .user = OCP_USER_MPU | OCP_USER_SDMA,
1661 /* l4_per2 -> atl */
1662 static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
1663 .master = &dra7xx_l4_per2_hwmod,
1664 .slave = &dra7xx_atl_hwmod,
1665 .clk = "l3_iclk_div",
1666 .user = OCP_USER_MPU | OCP_USER_SDMA,
1669 /* l3_main_1 -> bb2d */
1670 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
1671 .master = &dra7xx_l3_main_1_hwmod,
1672 .slave = &dra7xx_bb2d_hwmod,
1673 .clk = "l3_iclk_div",
1674 .user = OCP_USER_MPU | OCP_USER_SDMA,
1677 /* l4_wkup -> counter_32k */
1678 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
1679 .master = &dra7xx_l4_wkup_hwmod,
1680 .slave = &dra7xx_counter_32k_hwmod,
1681 .clk = "wkupaon_iclk_mux",
1682 .user = OCP_USER_MPU | OCP_USER_SDMA,
1685 /* l4_wkup -> ctrl_module_wkup */
1686 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
1687 .master = &dra7xx_l4_wkup_hwmod,
1688 .slave = &dra7xx_ctrl_module_wkup_hwmod,
1689 .clk = "wkupaon_iclk_mux",
1690 .user = OCP_USER_MPU | OCP_USER_SDMA,
1693 /* l4_wkup -> dcan1 */
1694 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
1695 .master = &dra7xx_l4_wkup_hwmod,
1696 .slave = &dra7xx_dcan1_hwmod,
1697 .clk = "wkupaon_iclk_mux",
1698 .user = OCP_USER_MPU | OCP_USER_SDMA,
1701 /* l4_per2 -> dcan2 */
1702 static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
1703 .master = &dra7xx_l4_per2_hwmod,
1704 .slave = &dra7xx_dcan2_hwmod,
1705 .clk = "l3_iclk_div",
1706 .user = OCP_USER_MPU | OCP_USER_SDMA,
1709 /* l4_cfg -> dma_system */
1710 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
1711 .master = &dra7xx_l4_cfg_hwmod,
1712 .slave = &dra7xx_dma_system_hwmod,
1713 .clk = "l3_iclk_div",
1714 .user = OCP_USER_MPU | OCP_USER_SDMA,
1717 /* l3_main_1 -> tpcc */
1718 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
1719 .master = &dra7xx_l3_main_1_hwmod,
1720 .slave = &dra7xx_tpcc_hwmod,
1721 .clk = "l3_iclk_div",
1722 .user = OCP_USER_MPU,
1725 /* l3_main_1 -> tptc0 */
1726 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0 = {
1727 .master = &dra7xx_l3_main_1_hwmod,
1728 .slave = &dra7xx_tptc0_hwmod,
1729 .clk = "l3_iclk_div",
1730 .user = OCP_USER_MPU,
1733 /* l3_main_1 -> tptc1 */
1734 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1 = {
1735 .master = &dra7xx_l3_main_1_hwmod,
1736 .slave = &dra7xx_tptc1_hwmod,
1737 .clk = "l3_iclk_div",
1738 .user = OCP_USER_MPU,
1741 /* l3_main_1 -> dss */
1742 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
1743 .master = &dra7xx_l3_main_1_hwmod,
1744 .slave = &dra7xx_dss_hwmod,
1745 .clk = "l3_iclk_div",
1746 .user = OCP_USER_MPU | OCP_USER_SDMA,
1749 /* l3_main_1 -> dispc */
1750 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
1751 .master = &dra7xx_l3_main_1_hwmod,
1752 .slave = &dra7xx_dss_dispc_hwmod,
1753 .clk = "l3_iclk_div",
1754 .user = OCP_USER_MPU | OCP_USER_SDMA,
1757 /* l3_main_1 -> dispc */
1758 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
1759 .master = &dra7xx_l3_main_1_hwmod,
1760 .slave = &dra7xx_dss_hdmi_hwmod,
1761 .clk = "l3_iclk_div",
1762 .user = OCP_USER_MPU | OCP_USER_SDMA,
1765 /* l3_main_1 -> aes1 */
1766 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1 = {
1767 .master = &dra7xx_l3_main_1_hwmod,
1768 .slave = &dra7xx_aes1_hwmod,
1769 .clk = "l3_iclk_div",
1770 .user = OCP_USER_MPU | OCP_USER_SDMA,
1773 /* l3_main_1 -> aes2 */
1774 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2 = {
1775 .master = &dra7xx_l3_main_1_hwmod,
1776 .slave = &dra7xx_aes2_hwmod,
1777 .clk = "l3_iclk_div",
1778 .user = OCP_USER_MPU | OCP_USER_SDMA,
1781 /* l3_main_1 -> sha0 */
1782 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0 = {
1783 .master = &dra7xx_l3_main_1_hwmod,
1784 .slave = &dra7xx_sha0_hwmod,
1785 .clk = "l3_iclk_div",
1786 .user = OCP_USER_MPU | OCP_USER_SDMA,
1789 /* l4_per1 -> elm */
1790 static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
1791 .master = &dra7xx_l4_per1_hwmod,
1792 .slave = &dra7xx_elm_hwmod,
1793 .clk = "l3_iclk_div",
1794 .user = OCP_USER_MPU | OCP_USER_SDMA,
1797 /* l3_main_1 -> gpmc */
1798 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
1799 .master = &dra7xx_l3_main_1_hwmod,
1800 .slave = &dra7xx_gpmc_hwmod,
1801 .clk = "l3_iclk_div",
1802 .user = OCP_USER_MPU | OCP_USER_SDMA,
1805 /* l4_cfg -> mpu */
1806 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
1807 .master = &dra7xx_l4_cfg_hwmod,
1808 .slave = &dra7xx_mpu_hwmod,
1809 .clk = "l3_iclk_div",
1810 .user = OCP_USER_MPU | OCP_USER_SDMA,
1813 /* l4_cfg -> ocp2scp1 */
1814 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
1815 .master = &dra7xx_l4_cfg_hwmod,
1816 .slave = &dra7xx_ocp2scp1_hwmod,
1817 .clk = "l4_root_clk_div",
1818 .user = OCP_USER_MPU | OCP_USER_SDMA,
1821 /* l4_cfg -> ocp2scp3 */
1822 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
1823 .master = &dra7xx_l4_cfg_hwmod,
1824 .slave = &dra7xx_ocp2scp3_hwmod,
1825 .clk = "l4_root_clk_div",
1826 .user = OCP_USER_MPU | OCP_USER_SDMA,
1829 /* l3_main_1 -> pciess1 */
1830 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
1831 .master = &dra7xx_l3_main_1_hwmod,
1832 .slave = &dra7xx_pciess1_hwmod,
1833 .clk = "l3_iclk_div",
1834 .user = OCP_USER_MPU | OCP_USER_SDMA,
1837 /* l4_cfg -> pciess1 */
1838 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
1839 .master = &dra7xx_l4_cfg_hwmod,
1840 .slave = &dra7xx_pciess1_hwmod,
1841 .clk = "l4_root_clk_div",
1842 .user = OCP_USER_MPU | OCP_USER_SDMA,
1845 /* l3_main_1 -> pciess2 */
1846 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
1847 .master = &dra7xx_l3_main_1_hwmod,
1848 .slave = &dra7xx_pciess2_hwmod,
1849 .clk = "l3_iclk_div",
1850 .user = OCP_USER_MPU | OCP_USER_SDMA,
1853 /* l4_cfg -> pciess2 */
1854 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
1855 .master = &dra7xx_l4_cfg_hwmod,
1856 .slave = &dra7xx_pciess2_hwmod,
1857 .clk = "l4_root_clk_div",
1858 .user = OCP_USER_MPU | OCP_USER_SDMA,
1861 /* l3_main_1 -> qspi */
1862 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
1863 .master = &dra7xx_l3_main_1_hwmod,
1864 .slave = &dra7xx_qspi_hwmod,
1865 .clk = "l3_iclk_div",
1866 .user = OCP_USER_MPU | OCP_USER_SDMA,
1869 /* l4_per3 -> rtcss */
1870 static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
1871 .master = &dra7xx_l4_per3_hwmod,
1872 .slave = &dra7xx_rtcss_hwmod,
1873 .clk = "l4_root_clk_div",
1874 .user = OCP_USER_MPU | OCP_USER_SDMA,
1877 /* l4_cfg -> sata */
1878 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
1879 .master = &dra7xx_l4_cfg_hwmod,
1880 .slave = &dra7xx_sata_hwmod,
1881 .clk = "l3_iclk_div",
1882 .user = OCP_USER_MPU | OCP_USER_SDMA,
1885 /* l4_cfg -> smartreflex_core */
1886 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
1887 .master = &dra7xx_l4_cfg_hwmod,
1888 .slave = &dra7xx_smartreflex_core_hwmod,
1889 .clk = "l4_root_clk_div",
1890 .user = OCP_USER_MPU | OCP_USER_SDMA,
1893 /* l4_cfg -> smartreflex_mpu */
1894 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
1895 .master = &dra7xx_l4_cfg_hwmod,
1896 .slave = &dra7xx_smartreflex_mpu_hwmod,
1897 .clk = "l4_root_clk_div",
1898 .user = OCP_USER_MPU | OCP_USER_SDMA,
1901 /* l4_cfg -> spinlock */
1902 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
1903 .master = &dra7xx_l4_cfg_hwmod,
1904 .slave = &dra7xx_spinlock_hwmod,
1905 .clk = "l3_iclk_div",
1906 .user = OCP_USER_MPU | OCP_USER_SDMA,
1909 /* l4_wkup -> timer1 */
1910 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
1911 .master = &dra7xx_l4_wkup_hwmod,
1912 .slave = &dra7xx_timer1_hwmod,
1913 .clk = "wkupaon_iclk_mux",
1914 .user = OCP_USER_MPU | OCP_USER_SDMA,
1917 /* l4_per1 -> timer2 */
1918 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
1919 .master = &dra7xx_l4_per1_hwmod,
1920 .slave = &dra7xx_timer2_hwmod,
1921 .clk = "l3_iclk_div",
1922 .user = OCP_USER_MPU | OCP_USER_SDMA,
1925 /* l4_per1 -> timer3 */
1926 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
1927 .master = &dra7xx_l4_per1_hwmod,
1928 .slave = &dra7xx_timer3_hwmod,
1929 .clk = "l3_iclk_div",
1930 .user = OCP_USER_MPU | OCP_USER_SDMA,
1933 /* l4_per1 -> timer4 */
1934 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
1935 .master = &dra7xx_l4_per1_hwmod,
1936 .slave = &dra7xx_timer4_hwmod,
1937 .clk = "l3_iclk_div",
1938 .user = OCP_USER_MPU | OCP_USER_SDMA,
1941 /* l4_per3 -> timer5 */
1942 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
1943 .master = &dra7xx_l4_per3_hwmod,
1944 .slave = &dra7xx_timer5_hwmod,
1945 .clk = "l3_iclk_div",
1946 .user = OCP_USER_MPU | OCP_USER_SDMA,
1949 /* l4_per3 -> timer6 */
1950 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
1951 .master = &dra7xx_l4_per3_hwmod,
1952 .slave = &dra7xx_timer6_hwmod,
1953 .clk = "l3_iclk_div",
1954 .user = OCP_USER_MPU | OCP_USER_SDMA,
1957 /* l4_per3 -> timer7 */
1958 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
1959 .master = &dra7xx_l4_per3_hwmod,
1960 .slave = &dra7xx_timer7_hwmod,
1961 .clk = "l3_iclk_div",
1962 .user = OCP_USER_MPU | OCP_USER_SDMA,
1965 /* l4_per3 -> timer8 */
1966 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
1967 .master = &dra7xx_l4_per3_hwmod,
1968 .slave = &dra7xx_timer8_hwmod,
1969 .clk = "l3_iclk_div",
1970 .user = OCP_USER_MPU | OCP_USER_SDMA,
1973 /* l4_per1 -> timer9 */
1974 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
1975 .master = &dra7xx_l4_per1_hwmod,
1976 .slave = &dra7xx_timer9_hwmod,
1977 .clk = "l3_iclk_div",
1978 .user = OCP_USER_MPU | OCP_USER_SDMA,
1981 /* l4_per1 -> timer10 */
1982 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
1983 .master = &dra7xx_l4_per1_hwmod,
1984 .slave = &dra7xx_timer10_hwmod,
1985 .clk = "l3_iclk_div",
1986 .user = OCP_USER_MPU | OCP_USER_SDMA,
1989 /* l4_per1 -> timer11 */
1990 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
1991 .master = &dra7xx_l4_per1_hwmod,
1992 .slave = &dra7xx_timer11_hwmod,
1993 .clk = "l3_iclk_div",
1994 .user = OCP_USER_MPU | OCP_USER_SDMA,
1997 /* l4_wkup -> timer12 */
1998 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12 = {
1999 .master = &dra7xx_l4_wkup_hwmod,
2000 .slave = &dra7xx_timer12_hwmod,
2001 .clk = "wkupaon_iclk_mux",
2002 .user = OCP_USER_MPU | OCP_USER_SDMA,
2005 /* l4_per3 -> timer13 */
2006 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
2007 .master = &dra7xx_l4_per3_hwmod,
2008 .slave = &dra7xx_timer13_hwmod,
2009 .clk = "l3_iclk_div",
2010 .user = OCP_USER_MPU | OCP_USER_SDMA,
2013 /* l4_per3 -> timer14 */
2014 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
2015 .master = &dra7xx_l4_per3_hwmod,
2016 .slave = &dra7xx_timer14_hwmod,
2017 .clk = "l3_iclk_div",
2018 .user = OCP_USER_MPU | OCP_USER_SDMA,
2021 /* l4_per3 -> timer15 */
2022 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
2023 .master = &dra7xx_l4_per3_hwmod,
2024 .slave = &dra7xx_timer15_hwmod,
2025 .clk = "l3_iclk_div",
2026 .user = OCP_USER_MPU | OCP_USER_SDMA,
2029 /* l4_per3 -> timer16 */
2030 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
2031 .master = &dra7xx_l4_per3_hwmod,
2032 .slave = &dra7xx_timer16_hwmod,
2033 .clk = "l3_iclk_div",
2034 .user = OCP_USER_MPU | OCP_USER_SDMA,
2037 /* l4_per1 -> des */
2038 static struct omap_hwmod_ocp_if dra7xx_l4_per1__des = {
2039 .master = &dra7xx_l4_per1_hwmod,
2040 .slave = &dra7xx_des_hwmod,
2041 .clk = "l3_iclk_div",
2042 .user = OCP_USER_MPU | OCP_USER_SDMA,
2045 /* l4_per3 -> usb_otg_ss1 */
2046 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
2047 .master = &dra7xx_l4_per3_hwmod,
2048 .slave = &dra7xx_usb_otg_ss1_hwmod,
2049 .clk = "dpll_core_h13x2_ck",
2050 .user = OCP_USER_MPU | OCP_USER_SDMA,
2053 /* l4_per3 -> usb_otg_ss2 */
2054 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
2055 .master = &dra7xx_l4_per3_hwmod,
2056 .slave = &dra7xx_usb_otg_ss2_hwmod,
2057 .clk = "dpll_core_h13x2_ck",
2058 .user = OCP_USER_MPU | OCP_USER_SDMA,
2061 /* l4_per3 -> usb_otg_ss3 */
2062 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
2063 .master = &dra7xx_l4_per3_hwmod,
2064 .slave = &dra7xx_usb_otg_ss3_hwmod,
2065 .clk = "dpll_core_h13x2_ck",
2066 .user = OCP_USER_MPU | OCP_USER_SDMA,
2069 /* l4_per3 -> usb_otg_ss4 */
2070 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
2071 .master = &dra7xx_l4_per3_hwmod,
2072 .slave = &dra7xx_usb_otg_ss4_hwmod,
2073 .clk = "dpll_core_h13x2_ck",
2074 .user = OCP_USER_MPU | OCP_USER_SDMA,
2077 /* l3_main_1 -> vcp1 */
2078 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
2079 .master = &dra7xx_l3_main_1_hwmod,
2080 .slave = &dra7xx_vcp1_hwmod,
2081 .clk = "l3_iclk_div",
2082 .user = OCP_USER_MPU | OCP_USER_SDMA,
2085 /* l4_per2 -> vcp1 */
2086 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
2087 .master = &dra7xx_l4_per2_hwmod,
2088 .slave = &dra7xx_vcp1_hwmod,
2089 .clk = "l3_iclk_div",
2090 .user = OCP_USER_MPU | OCP_USER_SDMA,
2093 /* l3_main_1 -> vcp2 */
2094 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
2095 .master = &dra7xx_l3_main_1_hwmod,
2096 .slave = &dra7xx_vcp2_hwmod,
2097 .clk = "l3_iclk_div",
2098 .user = OCP_USER_MPU | OCP_USER_SDMA,
2101 /* l4_per2 -> vcp2 */
2102 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
2103 .master = &dra7xx_l4_per2_hwmod,
2104 .slave = &dra7xx_vcp2_hwmod,
2105 .clk = "l3_iclk_div",
2106 .user = OCP_USER_MPU | OCP_USER_SDMA,
2109 /* l4_per2 -> epwmss0 */
2110 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
2111 .master = &dra7xx_l4_per2_hwmod,
2112 .slave = &dra7xx_epwmss0_hwmod,
2113 .clk = "l4_root_clk_div",
2114 .user = OCP_USER_MPU,
2117 /* l4_per2 -> epwmss1 */
2118 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
2119 .master = &dra7xx_l4_per2_hwmod,
2120 .slave = &dra7xx_epwmss1_hwmod,
2121 .clk = "l4_root_clk_div",
2122 .user = OCP_USER_MPU,
2125 /* l4_per2 -> epwmss2 */
2126 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
2127 .master = &dra7xx_l4_per2_hwmod,
2128 .slave = &dra7xx_epwmss2_hwmod,
2129 .clk = "l4_root_clk_div",
2130 .user = OCP_USER_MPU,
2133 static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
2134 &dra7xx_l3_main_1__dmm,
2135 &dra7xx_l3_main_2__l3_instr,
2136 &dra7xx_l4_cfg__l3_main_1,
2137 &dra7xx_mpu__l3_main_1,
2138 &dra7xx_l3_main_1__l3_main_2,
2139 &dra7xx_l4_cfg__l3_main_2,
2140 &dra7xx_l3_main_1__l4_cfg,
2141 &dra7xx_l3_main_1__l4_per1,
2142 &dra7xx_l3_main_1__l4_per2,
2143 &dra7xx_l3_main_1__l4_per3,
2144 &dra7xx_l3_main_1__l4_wkup,
2145 &dra7xx_l4_per2__atl,
2146 &dra7xx_l3_main_1__bb2d,
2147 &dra7xx_l4_wkup__counter_32k,
2148 &dra7xx_l4_wkup__ctrl_module_wkup,
2149 &dra7xx_l4_wkup__dcan1,
2150 &dra7xx_l4_per2__dcan2,
2151 &dra7xx_l4_cfg__dma_system,
2152 &dra7xx_l3_main_1__tpcc,
2153 &dra7xx_l3_main_1__tptc0,
2154 &dra7xx_l3_main_1__tptc1,
2155 &dra7xx_l3_main_1__dss,
2156 &dra7xx_l3_main_1__dispc,
2157 &dra7xx_l3_main_1__hdmi,
2158 &dra7xx_l3_main_1__aes1,
2159 &dra7xx_l3_main_1__aes2,
2160 &dra7xx_l3_main_1__sha0,
2161 &dra7xx_l4_per1__elm,
2162 &dra7xx_l3_main_1__gpmc,
2163 &dra7xx_l4_cfg__mpu,
2164 &dra7xx_l4_cfg__ocp2scp1,
2165 &dra7xx_l4_cfg__ocp2scp3,
2166 &dra7xx_l3_main_1__pciess1,
2167 &dra7xx_l4_cfg__pciess1,
2168 &dra7xx_l3_main_1__pciess2,
2169 &dra7xx_l4_cfg__pciess2,
2170 &dra7xx_l3_main_1__qspi,
2171 &dra7xx_l4_cfg__sata,
2172 &dra7xx_l4_cfg__smartreflex_core,
2173 &dra7xx_l4_cfg__smartreflex_mpu,
2174 &dra7xx_l4_cfg__spinlock,
2175 &dra7xx_l4_wkup__timer1,
2176 &dra7xx_l4_per1__timer2,
2177 &dra7xx_l4_per1__timer3,
2178 &dra7xx_l4_per1__timer4,
2179 &dra7xx_l4_per3__timer5,
2180 &dra7xx_l4_per3__timer6,
2181 &dra7xx_l4_per3__timer7,
2182 &dra7xx_l4_per3__timer8,
2183 &dra7xx_l4_per1__timer9,
2184 &dra7xx_l4_per1__timer10,
2185 &dra7xx_l4_per1__timer11,
2186 &dra7xx_l4_per3__timer13,
2187 &dra7xx_l4_per3__timer14,
2188 &dra7xx_l4_per3__timer15,
2189 &dra7xx_l4_per3__timer16,
2190 &dra7xx_l4_per1__des,
2191 &dra7xx_l4_per3__usb_otg_ss1,
2192 &dra7xx_l4_per3__usb_otg_ss2,
2193 &dra7xx_l4_per3__usb_otg_ss3,
2194 &dra7xx_l3_main_1__vcp1,
2195 &dra7xx_l4_per2__vcp1,
2196 &dra7xx_l3_main_1__vcp2,
2197 &dra7xx_l4_per2__vcp2,
2198 &dra7xx_l4_per2__epwmss0,
2199 &dra7xx_l4_per2__epwmss1,
2200 &dra7xx_l4_per2__epwmss2,
2201 NULL,
2204 /* GP-only hwmod links */
2205 static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
2206 &dra7xx_l4_wkup__timer12,
2207 NULL,
2210 /* SoC variant specific hwmod links */
2211 static struct omap_hwmod_ocp_if *dra76x_hwmod_ocp_ifs[] __initdata = {
2212 &dra7xx_l4_per3__usb_otg_ss4,
2213 NULL,
2216 static struct omap_hwmod_ocp_if *acd_76x_hwmod_ocp_ifs[] __initdata = {
2217 NULL,
2220 static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
2221 &dra7xx_l4_per3__usb_otg_ss4,
2222 NULL,
2225 static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
2226 NULL,
2229 static struct omap_hwmod_ocp_if *rtc_hwmod_ocp_ifs[] __initdata = {
2230 &dra7xx_l4_per3__rtcss,
2231 NULL,
2234 int __init dra7xx_hwmod_init(void)
2236 int ret;
2238 omap_hwmod_init();
2239 ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
2241 if (!ret && soc_is_dra74x()) {
2242 ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
2243 if (!ret)
2244 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
2245 } else if (!ret && soc_is_dra72x()) {
2246 ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
2247 if (!ret && !of_machine_is_compatible("ti,dra718"))
2248 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
2249 } else if (!ret && soc_is_dra76x()) {
2250 ret = omap_hwmod_register_links(dra76x_hwmod_ocp_ifs);
2252 if (!ret && soc_is_dra76x_acd()) {
2253 ret = omap_hwmod_register_links(acd_76x_hwmod_ocp_ifs);
2254 } else if (!ret && soc_is_dra76x_abz()) {
2255 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
2259 if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
2260 ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
2262 return ret;