mm: make wait_on_page_writeback() wait for multiple pending writebacks
[linux/fpc-iii.git] / arch / arm / mach-omap2 / omap_hwmod_7xx_data.c
blob48c2a808bd4673a422abf6f79a147dc5d47fbc46
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Hardware modules present on the DRA7xx chips
5 * Copyright (C) 2013 Texas Instruments Incorporated - https://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>
19 #include "omap_hwmod.h"
20 #include "omap_hwmod_common_data.h"
21 #include "cm1_7xx.h"
22 #include "cm2_7xx.h"
23 #include "prm7xx.h"
24 #include "soc.h"
26 /* Base offset for all DRA7XX interrupts external to MPUSS */
27 #define DRA7XX_IRQ_GIC_START 32
30 * IP blocks
34 * 'dmm' class
35 * instance(s): dmm
37 static struct omap_hwmod_class dra7xx_dmm_hwmod_class = {
38 .name = "dmm",
41 /* dmm */
42 static struct omap_hwmod dra7xx_dmm_hwmod = {
43 .name = "dmm",
44 .class = &dra7xx_dmm_hwmod_class,
45 .clkdm_name = "emif_clkdm",
46 .prcm = {
47 .omap4 = {
48 .clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
49 .context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET,
55 * 'l3' class
56 * instance(s): l3_instr, l3_main_1, l3_main_2
58 static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
59 .name = "l3",
62 /* l3_instr */
63 static struct omap_hwmod dra7xx_l3_instr_hwmod = {
64 .name = "l3_instr",
65 .class = &dra7xx_l3_hwmod_class,
66 .clkdm_name = "l3instr_clkdm",
67 .prcm = {
68 .omap4 = {
69 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
70 .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
71 .modulemode = MODULEMODE_HWCTRL,
76 /* l3_main_1 */
77 static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
78 .name = "l3_main_1",
79 .class = &dra7xx_l3_hwmod_class,
80 .clkdm_name = "l3main1_clkdm",
81 .prcm = {
82 .omap4 = {
83 .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
84 .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
89 /* l3_main_2 */
90 static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
91 .name = "l3_main_2",
92 .class = &dra7xx_l3_hwmod_class,
93 .clkdm_name = "l3instr_clkdm",
94 .prcm = {
95 .omap4 = {
96 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
97 .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
98 .modulemode = MODULEMODE_HWCTRL,
104 * 'l4' class
105 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
107 static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
108 .name = "l4",
111 /* l4_cfg */
112 static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
113 .name = "l4_cfg",
114 .class = &dra7xx_l4_hwmod_class,
115 .clkdm_name = "l4cfg_clkdm",
116 .prcm = {
117 .omap4 = {
118 .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
119 .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
124 /* l4_per1 */
125 static struct omap_hwmod dra7xx_l4_per1_hwmod = {
126 .name = "l4_per1",
127 .class = &dra7xx_l4_hwmod_class,
128 .clkdm_name = "l4per_clkdm",
129 .prcm = {
130 .omap4 = {
131 .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
132 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
137 /* l4_per2 */
138 static struct omap_hwmod dra7xx_l4_per2_hwmod = {
139 .name = "l4_per2",
140 .class = &dra7xx_l4_hwmod_class,
141 .clkdm_name = "l4per2_clkdm",
142 .prcm = {
143 .omap4 = {
144 .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
145 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
150 /* l4_per3 */
151 static struct omap_hwmod dra7xx_l4_per3_hwmod = {
152 .name = "l4_per3",
153 .class = &dra7xx_l4_hwmod_class,
154 .clkdm_name = "l4per3_clkdm",
155 .prcm = {
156 .omap4 = {
157 .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
158 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
163 /* l4_wkup */
164 static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
165 .name = "l4_wkup",
166 .class = &dra7xx_l4_hwmod_class,
167 .clkdm_name = "wkupaon_clkdm",
168 .prcm = {
169 .omap4 = {
170 .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
171 .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
177 * 'atl' class
181 static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
182 .name = "atl",
185 /* atl */
186 static struct omap_hwmod dra7xx_atl_hwmod = {
187 .name = "atl",
188 .class = &dra7xx_atl_hwmod_class,
189 .clkdm_name = "atl_clkdm",
190 .main_clk = "atl_gfclk_mux",
191 .prcm = {
192 .omap4 = {
193 .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
194 .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
195 .modulemode = MODULEMODE_SWCTRL,
201 * 'bb2d' class
205 static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
206 .name = "bb2d",
209 /* bb2d */
210 static struct omap_hwmod dra7xx_bb2d_hwmod = {
211 .name = "bb2d",
212 .class = &dra7xx_bb2d_hwmod_class,
213 .clkdm_name = "dss_clkdm",
214 .main_clk = "dpll_core_h24x2_ck",
215 .prcm = {
216 .omap4 = {
217 .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
218 .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
219 .modulemode = MODULEMODE_SWCTRL,
225 * 'ctrl_module' class
229 static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
230 .name = "ctrl_module",
233 /* ctrl_module_wkup */
234 static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
235 .name = "ctrl_module_wkup",
236 .class = &dra7xx_ctrl_module_hwmod_class,
237 .clkdm_name = "wkupaon_clkdm",
238 .prcm = {
239 .omap4 = {
240 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
246 * 'mpu' class
250 static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
251 .name = "mpu",
254 /* mpu */
255 static struct omap_hwmod dra7xx_mpu_hwmod = {
256 .name = "mpu",
257 .class = &dra7xx_mpu_hwmod_class,
258 .clkdm_name = "mpu_clkdm",
259 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
260 .main_clk = "dpll_mpu_m2_ck",
261 .prcm = {
262 .omap4 = {
263 .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
264 .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
271 * 'PCIE' class
276 * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
277 * functionality of OMAP HWMOD layer does not deassert the hardreset lines
278 * associated with an IP automatically leaving the driver to handle that
279 * by itself. This does not work for PCIeSS which needs the reset lines
280 * deasserted for the driver to start accessing registers.
282 * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
283 * lines after asserting them.
285 int dra7xx_pciess_reset(struct omap_hwmod *oh)
287 int i;
289 for (i = 0; i < oh->rst_lines_cnt; i++) {
290 omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
291 omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
294 return 0;
297 static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
298 .name = "pcie",
299 .reset = dra7xx_pciess_reset,
302 /* pcie1 */
303 static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
304 { .name = "pcie", .rst_shift = 0 },
307 static struct omap_hwmod dra7xx_pciess1_hwmod = {
308 .name = "pcie1",
309 .class = &dra7xx_pciess_hwmod_class,
310 .clkdm_name = "pcie_clkdm",
311 .rst_lines = dra7xx_pciess1_resets,
312 .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess1_resets),
313 .main_clk = "l4_root_clk_div",
314 .prcm = {
315 .omap4 = {
316 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
317 .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
318 .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
319 .modulemode = MODULEMODE_SWCTRL,
324 /* pcie2 */
325 static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
326 { .name = "pcie", .rst_shift = 1 },
329 /* pcie2 */
330 static struct omap_hwmod dra7xx_pciess2_hwmod = {
331 .name = "pcie2",
332 .class = &dra7xx_pciess_hwmod_class,
333 .clkdm_name = "pcie_clkdm",
334 .rst_lines = dra7xx_pciess2_resets,
335 .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess2_resets),
336 .main_clk = "l4_root_clk_div",
337 .prcm = {
338 .omap4 = {
339 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
340 .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
341 .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
342 .modulemode = MODULEMODE_SWCTRL,
348 * 'qspi' class
352 static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
353 .rev_offs = 0,
354 .sysc_offs = 0x0010,
355 .sysc_flags = SYSC_HAS_SIDLEMODE,
356 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
357 SIDLE_SMART_WKUP),
358 .sysc_fields = &omap_hwmod_sysc_type2,
361 static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
362 .name = "qspi",
363 .sysc = &dra7xx_qspi_sysc,
366 /* qspi */
367 static struct omap_hwmod dra7xx_qspi_hwmod = {
368 .name = "qspi",
369 .class = &dra7xx_qspi_hwmod_class,
370 .clkdm_name = "l4per2_clkdm",
371 .main_clk = "qspi_gfclk_div",
372 .prcm = {
373 .omap4 = {
374 .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
375 .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
376 .modulemode = MODULEMODE_SWCTRL,
382 * 'sata' class
386 static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
387 .rev_offs = 0x00fc,
388 .sysc_offs = 0x0000,
389 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
390 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
391 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
392 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
393 .sysc_fields = &omap_hwmod_sysc_type2,
396 static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
397 .name = "sata",
398 .sysc = &dra7xx_sata_sysc,
401 /* sata */
403 static struct omap_hwmod dra7xx_sata_hwmod = {
404 .name = "sata",
405 .class = &dra7xx_sata_hwmod_class,
406 .clkdm_name = "l3init_clkdm",
407 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
408 .main_clk = "func_48m_fclk",
409 .mpu_rt_idx = 1,
410 .prcm = {
411 .omap4 = {
412 .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
413 .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
414 .modulemode = MODULEMODE_SWCTRL,
420 * 'vcp' class
424 static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
425 .name = "vcp",
428 /* vcp1 */
429 static struct omap_hwmod dra7xx_vcp1_hwmod = {
430 .name = "vcp1",
431 .class = &dra7xx_vcp_hwmod_class,
432 .clkdm_name = "l3main1_clkdm",
433 .main_clk = "l3_iclk_div",
434 .prcm = {
435 .omap4 = {
436 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
437 .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
442 /* vcp2 */
443 static struct omap_hwmod dra7xx_vcp2_hwmod = {
444 .name = "vcp2",
445 .class = &dra7xx_vcp_hwmod_class,
446 .clkdm_name = "l3main1_clkdm",
447 .main_clk = "l3_iclk_div",
448 .prcm = {
449 .omap4 = {
450 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
451 .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
459 * Interfaces
462 /* l3_main_1 -> dmm */
463 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
464 .master = &dra7xx_l3_main_1_hwmod,
465 .slave = &dra7xx_dmm_hwmod,
466 .clk = "l3_iclk_div",
467 .user = OCP_USER_SDMA,
470 /* l3_main_2 -> l3_instr */
471 static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
472 .master = &dra7xx_l3_main_2_hwmod,
473 .slave = &dra7xx_l3_instr_hwmod,
474 .clk = "l3_iclk_div",
475 .user = OCP_USER_MPU | OCP_USER_SDMA,
478 /* l4_cfg -> l3_main_1 */
479 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
480 .master = &dra7xx_l4_cfg_hwmod,
481 .slave = &dra7xx_l3_main_1_hwmod,
482 .clk = "l3_iclk_div",
483 .user = OCP_USER_MPU | OCP_USER_SDMA,
486 /* mpu -> l3_main_1 */
487 static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
488 .master = &dra7xx_mpu_hwmod,
489 .slave = &dra7xx_l3_main_1_hwmod,
490 .clk = "l3_iclk_div",
491 .user = OCP_USER_MPU,
494 /* l3_main_1 -> l3_main_2 */
495 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
496 .master = &dra7xx_l3_main_1_hwmod,
497 .slave = &dra7xx_l3_main_2_hwmod,
498 .clk = "l3_iclk_div",
499 .user = OCP_USER_MPU,
502 /* l4_cfg -> l3_main_2 */
503 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
504 .master = &dra7xx_l4_cfg_hwmod,
505 .slave = &dra7xx_l3_main_2_hwmod,
506 .clk = "l3_iclk_div",
507 .user = OCP_USER_MPU | OCP_USER_SDMA,
510 /* l3_main_1 -> l4_cfg */
511 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
512 .master = &dra7xx_l3_main_1_hwmod,
513 .slave = &dra7xx_l4_cfg_hwmod,
514 .clk = "l3_iclk_div",
515 .user = OCP_USER_MPU | OCP_USER_SDMA,
518 /* l3_main_1 -> l4_per1 */
519 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
520 .master = &dra7xx_l3_main_1_hwmod,
521 .slave = &dra7xx_l4_per1_hwmod,
522 .clk = "l3_iclk_div",
523 .user = OCP_USER_MPU | OCP_USER_SDMA,
526 /* l3_main_1 -> l4_per2 */
527 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
528 .master = &dra7xx_l3_main_1_hwmod,
529 .slave = &dra7xx_l4_per2_hwmod,
530 .clk = "l3_iclk_div",
531 .user = OCP_USER_MPU | OCP_USER_SDMA,
534 /* l3_main_1 -> l4_per3 */
535 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
536 .master = &dra7xx_l3_main_1_hwmod,
537 .slave = &dra7xx_l4_per3_hwmod,
538 .clk = "l3_iclk_div",
539 .user = OCP_USER_MPU | OCP_USER_SDMA,
542 /* l3_main_1 -> l4_wkup */
543 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
544 .master = &dra7xx_l3_main_1_hwmod,
545 .slave = &dra7xx_l4_wkup_hwmod,
546 .clk = "wkupaon_iclk_mux",
547 .user = OCP_USER_MPU | OCP_USER_SDMA,
550 /* l4_per2 -> atl */
551 static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
552 .master = &dra7xx_l4_per2_hwmod,
553 .slave = &dra7xx_atl_hwmod,
554 .clk = "l3_iclk_div",
555 .user = OCP_USER_MPU | OCP_USER_SDMA,
558 /* l3_main_1 -> bb2d */
559 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
560 .master = &dra7xx_l3_main_1_hwmod,
561 .slave = &dra7xx_bb2d_hwmod,
562 .clk = "l3_iclk_div",
563 .user = OCP_USER_MPU | OCP_USER_SDMA,
566 /* l4_wkup -> ctrl_module_wkup */
567 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
568 .master = &dra7xx_l4_wkup_hwmod,
569 .slave = &dra7xx_ctrl_module_wkup_hwmod,
570 .clk = "wkupaon_iclk_mux",
571 .user = OCP_USER_MPU | OCP_USER_SDMA,
574 /* l4_cfg -> mpu */
575 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
576 .master = &dra7xx_l4_cfg_hwmod,
577 .slave = &dra7xx_mpu_hwmod,
578 .clk = "l3_iclk_div",
579 .user = OCP_USER_MPU | OCP_USER_SDMA,
582 /* l3_main_1 -> pciess1 */
583 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
584 .master = &dra7xx_l3_main_1_hwmod,
585 .slave = &dra7xx_pciess1_hwmod,
586 .clk = "l3_iclk_div",
587 .user = OCP_USER_MPU | OCP_USER_SDMA,
590 /* l4_cfg -> pciess1 */
591 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
592 .master = &dra7xx_l4_cfg_hwmod,
593 .slave = &dra7xx_pciess1_hwmod,
594 .clk = "l4_root_clk_div",
595 .user = OCP_USER_MPU | OCP_USER_SDMA,
598 /* l3_main_1 -> pciess2 */
599 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
600 .master = &dra7xx_l3_main_1_hwmod,
601 .slave = &dra7xx_pciess2_hwmod,
602 .clk = "l3_iclk_div",
603 .user = OCP_USER_MPU | OCP_USER_SDMA,
606 /* l4_cfg -> pciess2 */
607 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
608 .master = &dra7xx_l4_cfg_hwmod,
609 .slave = &dra7xx_pciess2_hwmod,
610 .clk = "l4_root_clk_div",
611 .user = OCP_USER_MPU | OCP_USER_SDMA,
614 /* l3_main_1 -> qspi */
615 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
616 .master = &dra7xx_l3_main_1_hwmod,
617 .slave = &dra7xx_qspi_hwmod,
618 .clk = "l3_iclk_div",
619 .user = OCP_USER_MPU | OCP_USER_SDMA,
622 /* l4_cfg -> sata */
623 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
624 .master = &dra7xx_l4_cfg_hwmod,
625 .slave = &dra7xx_sata_hwmod,
626 .clk = "l3_iclk_div",
627 .user = OCP_USER_MPU | OCP_USER_SDMA,
630 /* l3_main_1 -> vcp1 */
631 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
632 .master = &dra7xx_l3_main_1_hwmod,
633 .slave = &dra7xx_vcp1_hwmod,
634 .clk = "l3_iclk_div",
635 .user = OCP_USER_MPU | OCP_USER_SDMA,
638 /* l4_per2 -> vcp1 */
639 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
640 .master = &dra7xx_l4_per2_hwmod,
641 .slave = &dra7xx_vcp1_hwmod,
642 .clk = "l3_iclk_div",
643 .user = OCP_USER_MPU | OCP_USER_SDMA,
646 /* l3_main_1 -> vcp2 */
647 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
648 .master = &dra7xx_l3_main_1_hwmod,
649 .slave = &dra7xx_vcp2_hwmod,
650 .clk = "l3_iclk_div",
651 .user = OCP_USER_MPU | OCP_USER_SDMA,
654 /* l4_per2 -> vcp2 */
655 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
656 .master = &dra7xx_l4_per2_hwmod,
657 .slave = &dra7xx_vcp2_hwmod,
658 .clk = "l3_iclk_div",
659 .user = OCP_USER_MPU | OCP_USER_SDMA,
662 static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
663 &dra7xx_l3_main_1__dmm,
664 &dra7xx_l3_main_2__l3_instr,
665 &dra7xx_l4_cfg__l3_main_1,
666 &dra7xx_mpu__l3_main_1,
667 &dra7xx_l3_main_1__l3_main_2,
668 &dra7xx_l4_cfg__l3_main_2,
669 &dra7xx_l3_main_1__l4_cfg,
670 &dra7xx_l3_main_1__l4_per1,
671 &dra7xx_l3_main_1__l4_per2,
672 &dra7xx_l3_main_1__l4_per3,
673 &dra7xx_l3_main_1__l4_wkup,
674 &dra7xx_l4_per2__atl,
675 &dra7xx_l3_main_1__bb2d,
676 &dra7xx_l4_wkup__ctrl_module_wkup,
677 &dra7xx_l4_cfg__mpu,
678 &dra7xx_l3_main_1__pciess1,
679 &dra7xx_l4_cfg__pciess1,
680 &dra7xx_l3_main_1__pciess2,
681 &dra7xx_l4_cfg__pciess2,
682 &dra7xx_l3_main_1__qspi,
683 &dra7xx_l4_cfg__sata,
684 &dra7xx_l3_main_1__vcp1,
685 &dra7xx_l4_per2__vcp1,
686 &dra7xx_l3_main_1__vcp2,
687 &dra7xx_l4_per2__vcp2,
688 NULL,
691 /* SoC variant specific hwmod links */
692 static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
693 NULL,
696 static struct omap_hwmod_ocp_if *rtc_hwmod_ocp_ifs[] __initdata = {
697 NULL,
700 int __init dra7xx_hwmod_init(void)
702 int ret;
704 omap_hwmod_init();
705 ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
707 if (!ret && soc_is_dra74x()) {
708 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
709 } else if (!ret && soc_is_dra72x()) {
710 ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
711 if (!ret && !of_machine_is_compatible("ti,dra718"))
712 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
713 } else if (!ret && soc_is_dra76x()) {
714 if (!ret && soc_is_dra76x_abz())
715 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
718 return ret;