Linux Audio

Check our new training course

Loading...
v3.15
 
   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/power/smartreflex.h>
  23#include <linux/i2c-omap.h>
  24
  25#include <linux/omap-dma.h>
  26#include <linux/platform_data/spi-omap2-mcspi.h>
  27#include <linux/platform_data/asoc-ti-mcbsp.h>
  28#include <plat/dmtimer.h>
  29
  30#include "omap_hwmod.h"
  31#include "omap_hwmod_common_data.h"
  32#include "cm1_7xx.h"
  33#include "cm2_7xx.h"
  34#include "prm7xx.h"
  35#include "i2c.h"
  36#include "mmc.h"
  37#include "wd_timer.h"
 
  38
  39/* Base offset for all DRA7XX interrupts external to MPUSS */
  40#define DRA7XX_IRQ_GIC_START	32
  41
  42/* Base offset for all DRA7XX dma requests */
  43#define DRA7XX_DMA_REQ_START	1
  44
  45
  46/*
  47 * IP blocks
  48 */
  49
  50/*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  51 * 'l3' class
  52 * instance(s): l3_instr, l3_main_1, l3_main_2
  53 */
  54static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
  55	.name	= "l3",
  56};
  57
  58/* l3_instr */
  59static struct omap_hwmod dra7xx_l3_instr_hwmod = {
  60	.name		= "l3_instr",
  61	.class		= &dra7xx_l3_hwmod_class,
  62	.clkdm_name	= "l3instr_clkdm",
  63	.prcm = {
  64		.omap4 = {
  65			.clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
  66			.context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
  67			.modulemode   = MODULEMODE_HWCTRL,
  68		},
  69	},
  70};
  71
  72/* l3_main_1 */
  73static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
  74	.name		= "l3_main_1",
  75	.class		= &dra7xx_l3_hwmod_class,
  76	.clkdm_name	= "l3main1_clkdm",
  77	.prcm = {
  78		.omap4 = {
  79			.clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
  80			.context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
  81		},
  82	},
  83};
  84
  85/* l3_main_2 */
  86static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
  87	.name		= "l3_main_2",
  88	.class		= &dra7xx_l3_hwmod_class,
  89	.clkdm_name	= "l3instr_clkdm",
  90	.prcm = {
  91		.omap4 = {
  92			.clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
  93			.context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
  94			.modulemode   = MODULEMODE_HWCTRL,
  95		},
  96	},
  97};
  98
  99/*
 100 * 'l4' class
 101 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
 102 */
 103static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
 104	.name	= "l4",
 105};
 106
 107/* l4_cfg */
 108static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
 109	.name		= "l4_cfg",
 110	.class		= &dra7xx_l4_hwmod_class,
 111	.clkdm_name	= "l4cfg_clkdm",
 112	.prcm = {
 113		.omap4 = {
 114			.clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
 115			.context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
 116		},
 117	},
 118};
 119
 120/* l4_per1 */
 121static struct omap_hwmod dra7xx_l4_per1_hwmod = {
 122	.name		= "l4_per1",
 123	.class		= &dra7xx_l4_hwmod_class,
 124	.clkdm_name	= "l4per_clkdm",
 125	.prcm = {
 126		.omap4 = {
 127			.clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
 128			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 129		},
 130	},
 131};
 132
 133/* l4_per2 */
 134static struct omap_hwmod dra7xx_l4_per2_hwmod = {
 135	.name		= "l4_per2",
 136	.class		= &dra7xx_l4_hwmod_class,
 137	.clkdm_name	= "l4per2_clkdm",
 138	.prcm = {
 139		.omap4 = {
 140			.clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
 141			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 142		},
 143	},
 144};
 145
 146/* l4_per3 */
 147static struct omap_hwmod dra7xx_l4_per3_hwmod = {
 148	.name		= "l4_per3",
 149	.class		= &dra7xx_l4_hwmod_class,
 150	.clkdm_name	= "l4per3_clkdm",
 151	.prcm = {
 152		.omap4 = {
 153			.clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
 154			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 155		},
 156	},
 157};
 158
 159/* l4_wkup */
 160static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
 161	.name		= "l4_wkup",
 162	.class		= &dra7xx_l4_hwmod_class,
 163	.clkdm_name	= "wkupaon_clkdm",
 164	.prcm = {
 165		.omap4 = {
 166			.clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
 167			.context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
 168		},
 169	},
 170};
 171
 172/*
 173 * 'atl' class
 174 *
 175 */
 176
 177static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
 178	.name	= "atl",
 179};
 180
 181/* atl */
 182static struct omap_hwmod dra7xx_atl_hwmod = {
 183	.name		= "atl",
 184	.class		= &dra7xx_atl_hwmod_class,
 185	.clkdm_name	= "atl_clkdm",
 186	.main_clk	= "atl_gfclk_mux",
 187	.prcm = {
 188		.omap4 = {
 189			.clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
 190			.context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
 191			.modulemode   = MODULEMODE_SWCTRL,
 192		},
 193	},
 194};
 195
 196/*
 197 * 'bb2d' class
 198 *
 199 */
 200
 201static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
 202	.name	= "bb2d",
 203};
 204
 205/* bb2d */
 206static struct omap_hwmod dra7xx_bb2d_hwmod = {
 207	.name		= "bb2d",
 208	.class		= &dra7xx_bb2d_hwmod_class,
 209	.clkdm_name	= "dss_clkdm",
 210	.main_clk	= "dpll_core_h24x2_ck",
 211	.prcm = {
 212		.omap4 = {
 213			.clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
 214			.context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
 215			.modulemode   = MODULEMODE_SWCTRL,
 216		},
 217	},
 218};
 219
 220/*
 221 * 'counter' class
 222 *
 223 */
 224
 225static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
 226	.rev_offs	= 0x0000,
 227	.sysc_offs	= 0x0010,
 228	.sysc_flags	= SYSC_HAS_SIDLEMODE,
 229	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 230			   SIDLE_SMART_WKUP),
 231	.sysc_fields	= &omap_hwmod_sysc_type1,
 232};
 233
 234static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
 235	.name	= "counter",
 236	.sysc	= &dra7xx_counter_sysc,
 237};
 238
 239/* counter_32k */
 240static struct omap_hwmod dra7xx_counter_32k_hwmod = {
 241	.name		= "counter_32k",
 242	.class		= &dra7xx_counter_hwmod_class,
 243	.clkdm_name	= "wkupaon_clkdm",
 244	.flags		= HWMOD_SWSUP_SIDLE,
 245	.main_clk	= "wkupaon_iclk_mux",
 246	.prcm = {
 247		.omap4 = {
 248			.clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
 249			.context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
 250		},
 251	},
 252};
 253
 254/*
 255 * 'ctrl_module' class
 256 *
 257 */
 258
 259static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
 260	.name	= "ctrl_module",
 261};
 262
 263/* ctrl_module_wkup */
 264static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
 265	.name		= "ctrl_module_wkup",
 266	.class		= &dra7xx_ctrl_module_hwmod_class,
 267	.clkdm_name	= "wkupaon_clkdm",
 268	.prcm = {
 269		.omap4 = {
 270			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 271		},
 272	},
 273};
 274
 275/*
 276 * 'dcan' class
 277 *
 278 */
 279
 280static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
 281	.name	= "dcan",
 282};
 283
 284/* dcan1 */
 285static struct omap_hwmod dra7xx_dcan1_hwmod = {
 286	.name		= "dcan1",
 287	.class		= &dra7xx_dcan_hwmod_class,
 288	.clkdm_name	= "wkupaon_clkdm",
 289	.main_clk	= "dcan1_sys_clk_mux",
 
 290	.prcm = {
 291		.omap4 = {
 292			.clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
 293			.context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
 294			.modulemode   = MODULEMODE_SWCTRL,
 295		},
 296	},
 297};
 298
 299/* dcan2 */
 300static struct omap_hwmod dra7xx_dcan2_hwmod = {
 301	.name		= "dcan2",
 302	.class		= &dra7xx_dcan_hwmod_class,
 303	.clkdm_name	= "l4per2_clkdm",
 304	.main_clk	= "sys_clkin1",
 
 305	.prcm = {
 306		.omap4 = {
 307			.clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
 308			.context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
 309			.modulemode   = MODULEMODE_SWCTRL,
 310		},
 311	},
 312};
 313
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 314/*
 315 * 'dma' class
 316 *
 317 */
 318
 319static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
 320	.rev_offs	= 0x0000,
 321	.sysc_offs	= 0x002c,
 322	.syss_offs	= 0x0028,
 323	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
 324			   SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
 325			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 326			   SYSS_HAS_RESET_STATUS),
 327	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 328			   SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
 329			   MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
 330	.sysc_fields	= &omap_hwmod_sysc_type1,
 331};
 332
 333static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
 334	.name	= "dma",
 335	.sysc	= &dra7xx_dma_sysc,
 336};
 337
 338/* dma dev_attr */
 339static struct omap_dma_dev_attr dma_dev_attr = {
 340	.dev_caps	= RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
 341			  IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
 342	.lch_count	= 32,
 343};
 344
 345/* dma_system */
 346static struct omap_hwmod_irq_info dra7xx_dma_system_irqs[] = {
 347	{ .name = "0", .irq = 12 + DRA7XX_IRQ_GIC_START },
 348	{ .name = "1", .irq = 13 + DRA7XX_IRQ_GIC_START },
 349	{ .name = "2", .irq = 14 + DRA7XX_IRQ_GIC_START },
 350	{ .name = "3", .irq = 15 + DRA7XX_IRQ_GIC_START },
 351	{ .irq = -1 }
 352};
 353
 354static struct omap_hwmod dra7xx_dma_system_hwmod = {
 355	.name		= "dma_system",
 356	.class		= &dra7xx_dma_hwmod_class,
 357	.clkdm_name	= "dma_clkdm",
 358	.mpu_irqs	= dra7xx_dma_system_irqs,
 359	.main_clk	= "l3_iclk_div",
 360	.prcm = {
 361		.omap4 = {
 362			.clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
 363			.context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
 364		},
 365	},
 366	.dev_attr	= &dma_dev_attr,
 367};
 368
 369/*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 370 * 'dss' class
 371 *
 372 */
 373
 374static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
 375	.rev_offs	= 0x0000,
 376	.syss_offs	= 0x0014,
 377	.sysc_flags	= SYSS_HAS_RESET_STATUS,
 378};
 379
 380static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
 381	.name	= "dss",
 382	.sysc	= &dra7xx_dss_sysc,
 383	.reset	= omap_dss_reset,
 384};
 385
 386/* dss */
 387static struct omap_hwmod_dma_info dra7xx_dss_sdma_reqs[] = {
 388	{ .dma_req = 75 + DRA7XX_DMA_REQ_START },
 389	{ .dma_req = -1 }
 390};
 391
 392static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 393	{ .role = "dss_clk", .clk = "dss_dss_clk" },
 394	{ .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
 395	{ .role = "32khz_clk", .clk = "dss_32khz_clk" },
 396	{ .role = "video2_clk", .clk = "dss_video2_clk" },
 397	{ .role = "video1_clk", .clk = "dss_video1_clk" },
 398	{ .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
 
 399};
 400
 401static struct omap_hwmod dra7xx_dss_hwmod = {
 402	.name		= "dss_core",
 403	.class		= &dra7xx_dss_hwmod_class,
 404	.clkdm_name	= "dss_clkdm",
 405	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 406	.sdma_reqs	= dra7xx_dss_sdma_reqs,
 407	.main_clk	= "dss_dss_clk",
 408	.prcm = {
 409		.omap4 = {
 410			.clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
 411			.context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
 412			.modulemode   = MODULEMODE_SWCTRL,
 413		},
 414	},
 415	.opt_clks	= dss_opt_clks,
 416	.opt_clks_cnt	= ARRAY_SIZE(dss_opt_clks),
 417};
 418
 419/*
 420 * 'dispc' class
 421 * display controller
 422 */
 423
 424static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
 425	.rev_offs	= 0x0000,
 426	.sysc_offs	= 0x0010,
 427	.syss_offs	= 0x0014,
 428	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
 429			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
 430			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 431			   SYSS_HAS_RESET_STATUS),
 432	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 433			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
 434	.sysc_fields	= &omap_hwmod_sysc_type1,
 435};
 436
 437static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
 438	.name	= "dispc",
 439	.sysc	= &dra7xx_dispc_sysc,
 440};
 441
 442/* dss_dispc */
 443/* dss_dispc dev_attr */
 444static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
 445	.has_framedonetv_irq	= 1,
 446	.manager_count		= 4,
 447};
 448
 449static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
 450	.name		= "dss_dispc",
 451	.class		= &dra7xx_dispc_hwmod_class,
 452	.clkdm_name	= "dss_clkdm",
 453	.main_clk	= "dss_dss_clk",
 454	.prcm = {
 455		.omap4 = {
 456			.clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
 457			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 458		},
 459	},
 460	.dev_attr	= &dss_dispc_dev_attr,
 
 461};
 462
 463/*
 464 * 'hdmi' class
 465 * hdmi controller
 466 */
 467
 468static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
 469	.rev_offs	= 0x0000,
 470	.sysc_offs	= 0x0010,
 471	.sysc_flags	= (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
 472			   SYSC_HAS_SOFTRESET),
 473	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 474			   SIDLE_SMART_WKUP),
 475	.sysc_fields	= &omap_hwmod_sysc_type2,
 476};
 477
 478static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
 479	.name	= "hdmi",
 480	.sysc	= &dra7xx_hdmi_sysc,
 481};
 482
 483/* dss_hdmi */
 484
 485static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
 486	{ .role = "sys_clk", .clk = "dss_hdmi_clk" },
 487};
 488
 489static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
 490	.name		= "dss_hdmi",
 491	.class		= &dra7xx_hdmi_hwmod_class,
 492	.clkdm_name	= "dss_clkdm",
 493	.main_clk	= "dss_48mhz_clk",
 494	.prcm = {
 495		.omap4 = {
 496			.clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
 497			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 498		},
 499	},
 500	.opt_clks	= dss_hdmi_opt_clks,
 501	.opt_clks_cnt	= ARRAY_SIZE(dss_hdmi_opt_clks),
 
 502};
 503
 504/*
 505 * 'elm' class
 506 *
 507 */
 508
 509static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
 510	.rev_offs	= 0x0000,
 511	.sysc_offs	= 0x0010,
 512	.syss_offs	= 0x0014,
 513	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
 514			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 515			   SYSS_HAS_RESET_STATUS),
 516	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 517			   SIDLE_SMART_WKUP),
 518	.sysc_fields	= &omap_hwmod_sysc_type1,
 519};
 520
 521static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
 522	.name	= "elm",
 523	.sysc	= &dra7xx_elm_sysc,
 524};
 525
 526/* elm */
 527
 528static struct omap_hwmod dra7xx_elm_hwmod = {
 529	.name		= "elm",
 530	.class		= &dra7xx_elm_hwmod_class,
 531	.clkdm_name	= "l4per_clkdm",
 532	.main_clk	= "l3_iclk_div",
 533	.prcm = {
 534		.omap4 = {
 535			.clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
 536			.context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
 537		},
 538	},
 539};
 540
 541/*
 542 * 'gpio' class
 543 *
 544 */
 545
 546static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
 547	.rev_offs	= 0x0000,
 548	.sysc_offs	= 0x0010,
 549	.syss_offs	= 0x0114,
 550	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
 551			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 552			   SYSS_HAS_RESET_STATUS),
 553	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 554			   SIDLE_SMART_WKUP),
 555	.sysc_fields	= &omap_hwmod_sysc_type1,
 556};
 557
 558static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
 559	.name	= "gpio",
 560	.sysc	= &dra7xx_gpio_sysc,
 561	.rev	= 2,
 562};
 563
 564/* gpio dev_attr */
 565static struct omap_gpio_dev_attr gpio_dev_attr = {
 566	.bank_width	= 32,
 567	.dbck_flag	= true,
 568};
 569
 570/* gpio1 */
 571static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
 572	{ .role = "dbclk", .clk = "gpio1_dbclk" },
 573};
 574
 575static struct omap_hwmod dra7xx_gpio1_hwmod = {
 576	.name		= "gpio1",
 577	.class		= &dra7xx_gpio_hwmod_class,
 578	.clkdm_name	= "wkupaon_clkdm",
 579	.main_clk	= "wkupaon_iclk_mux",
 580	.prcm = {
 581		.omap4 = {
 582			.clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
 583			.context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
 584			.modulemode   = MODULEMODE_HWCTRL,
 585		},
 586	},
 587	.opt_clks	= gpio1_opt_clks,
 588	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
 589	.dev_attr	= &gpio_dev_attr,
 590};
 591
 592/* gpio2 */
 593static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
 594	{ .role = "dbclk", .clk = "gpio2_dbclk" },
 595};
 596
 597static struct omap_hwmod dra7xx_gpio2_hwmod = {
 598	.name		= "gpio2",
 599	.class		= &dra7xx_gpio_hwmod_class,
 600	.clkdm_name	= "l4per_clkdm",
 601	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 602	.main_clk	= "l3_iclk_div",
 603	.prcm = {
 604		.omap4 = {
 605			.clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
 606			.context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
 607			.modulemode   = MODULEMODE_HWCTRL,
 608		},
 609	},
 610	.opt_clks	= gpio2_opt_clks,
 611	.opt_clks_cnt	= ARRAY_SIZE(gpio2_opt_clks),
 612	.dev_attr	= &gpio_dev_attr,
 613};
 614
 615/* gpio3 */
 616static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
 617	{ .role = "dbclk", .clk = "gpio3_dbclk" },
 618};
 619
 620static struct omap_hwmod dra7xx_gpio3_hwmod = {
 621	.name		= "gpio3",
 622	.class		= &dra7xx_gpio_hwmod_class,
 623	.clkdm_name	= "l4per_clkdm",
 624	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 625	.main_clk	= "l3_iclk_div",
 626	.prcm = {
 627		.omap4 = {
 628			.clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
 629			.context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
 630			.modulemode   = MODULEMODE_HWCTRL,
 631		},
 632	},
 633	.opt_clks	= gpio3_opt_clks,
 634	.opt_clks_cnt	= ARRAY_SIZE(gpio3_opt_clks),
 635	.dev_attr	= &gpio_dev_attr,
 636};
 637
 638/* gpio4 */
 639static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
 640	{ .role = "dbclk", .clk = "gpio4_dbclk" },
 641};
 642
 643static struct omap_hwmod dra7xx_gpio4_hwmod = {
 644	.name		= "gpio4",
 645	.class		= &dra7xx_gpio_hwmod_class,
 646	.clkdm_name	= "l4per_clkdm",
 647	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 648	.main_clk	= "l3_iclk_div",
 649	.prcm = {
 650		.omap4 = {
 651			.clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
 652			.context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
 653			.modulemode   = MODULEMODE_HWCTRL,
 654		},
 655	},
 656	.opt_clks	= gpio4_opt_clks,
 657	.opt_clks_cnt	= ARRAY_SIZE(gpio4_opt_clks),
 658	.dev_attr	= &gpio_dev_attr,
 659};
 660
 661/* gpio5 */
 662static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
 663	{ .role = "dbclk", .clk = "gpio5_dbclk" },
 664};
 665
 666static struct omap_hwmod dra7xx_gpio5_hwmod = {
 667	.name		= "gpio5",
 668	.class		= &dra7xx_gpio_hwmod_class,
 669	.clkdm_name	= "l4per_clkdm",
 670	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 671	.main_clk	= "l3_iclk_div",
 672	.prcm = {
 673		.omap4 = {
 674			.clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
 675			.context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
 676			.modulemode   = MODULEMODE_HWCTRL,
 677		},
 678	},
 679	.opt_clks	= gpio5_opt_clks,
 680	.opt_clks_cnt	= ARRAY_SIZE(gpio5_opt_clks),
 681	.dev_attr	= &gpio_dev_attr,
 682};
 683
 684/* gpio6 */
 685static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
 686	{ .role = "dbclk", .clk = "gpio6_dbclk" },
 687};
 688
 689static struct omap_hwmod dra7xx_gpio6_hwmod = {
 690	.name		= "gpio6",
 691	.class		= &dra7xx_gpio_hwmod_class,
 692	.clkdm_name	= "l4per_clkdm",
 693	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 694	.main_clk	= "l3_iclk_div",
 695	.prcm = {
 696		.omap4 = {
 697			.clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
 698			.context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
 699			.modulemode   = MODULEMODE_HWCTRL,
 700		},
 701	},
 702	.opt_clks	= gpio6_opt_clks,
 703	.opt_clks_cnt	= ARRAY_SIZE(gpio6_opt_clks),
 704	.dev_attr	= &gpio_dev_attr,
 705};
 706
 707/* gpio7 */
 708static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
 709	{ .role = "dbclk", .clk = "gpio7_dbclk" },
 
 
 
 
 
 
 
 710};
 711
 712static struct omap_hwmod dra7xx_gpio7_hwmod = {
 713	.name		= "gpio7",
 714	.class		= &dra7xx_gpio_hwmod_class,
 715	.clkdm_name	= "l4per_clkdm",
 716	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 717	.main_clk	= "l3_iclk_div",
 718	.prcm = {
 719		.omap4 = {
 720			.clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
 721			.context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
 722			.modulemode   = MODULEMODE_HWCTRL,
 723		},
 724	},
 725	.opt_clks	= gpio7_opt_clks,
 726	.opt_clks_cnt	= ARRAY_SIZE(gpio7_opt_clks),
 727	.dev_attr	= &gpio_dev_attr,
 728};
 729
 730/* gpio8 */
 731static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
 732	{ .role = "dbclk", .clk = "gpio8_dbclk" },
 733};
 734
 735static struct omap_hwmod dra7xx_gpio8_hwmod = {
 736	.name		= "gpio8",
 737	.class		= &dra7xx_gpio_hwmod_class,
 738	.clkdm_name	= "l4per_clkdm",
 739	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 740	.main_clk	= "l3_iclk_div",
 741	.prcm = {
 742		.omap4 = {
 743			.clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
 744			.context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
 745			.modulemode   = MODULEMODE_HWCTRL,
 746		},
 747	},
 748	.opt_clks	= gpio8_opt_clks,
 749	.opt_clks_cnt	= ARRAY_SIZE(gpio8_opt_clks),
 750	.dev_attr	= &gpio_dev_attr,
 751};
 752
 753/*
 754 * 'gpmc' class
 755 *
 756 */
 757
 758static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
 759	.rev_offs	= 0x0000,
 760	.sysc_offs	= 0x0010,
 761	.syss_offs	= 0x0014,
 762	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
 763			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
 764	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 765			   SIDLE_SMART_WKUP),
 766	.sysc_fields	= &omap_hwmod_sysc_type1,
 767};
 768
 769static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
 770	.name	= "gpmc",
 771	.sysc	= &dra7xx_gpmc_sysc,
 772};
 773
 774/* gpmc */
 775
 776static struct omap_hwmod dra7xx_gpmc_hwmod = {
 777	.name		= "gpmc",
 778	.class		= &dra7xx_gpmc_hwmod_class,
 779	.clkdm_name	= "l3main1_clkdm",
 780	.flags		= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
 
 781	.main_clk	= "l3_iclk_div",
 782	.prcm = {
 783		.omap4 = {
 784			.clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
 785			.context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
 786			.modulemode   = MODULEMODE_HWCTRL,
 787		},
 788	},
 789};
 790
 791/*
 792 * 'hdq1w' class
 793 *
 794 */
 795
 796static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
 797	.rev_offs	= 0x0000,
 798	.sysc_offs	= 0x0014,
 799	.syss_offs	= 0x0018,
 800	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
 801			   SYSS_HAS_RESET_STATUS),
 802	.sysc_fields	= &omap_hwmod_sysc_type1,
 803};
 804
 805static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
 806	.name	= "hdq1w",
 807	.sysc	= &dra7xx_hdq1w_sysc,
 808};
 809
 810/* hdq1w */
 811
 812static struct omap_hwmod dra7xx_hdq1w_hwmod = {
 813	.name		= "hdq1w",
 814	.class		= &dra7xx_hdq1w_hwmod_class,
 815	.clkdm_name	= "l4per_clkdm",
 816	.flags		= HWMOD_INIT_NO_RESET,
 817	.main_clk	= "func_12m_fclk",
 818	.prcm = {
 819		.omap4 = {
 820			.clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
 821			.context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
 822			.modulemode   = MODULEMODE_SWCTRL,
 823		},
 824	},
 825};
 826
 827/*
 828 * 'i2c' class
 829 *
 830 */
 831
 832static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
 
 833	.sysc_offs	= 0x0010,
 834	.syss_offs	= 0x0090,
 835	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
 836			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
 837			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
 838	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 839			   SIDLE_SMART_WKUP),
 840	.clockact	= CLOCKACT_TEST_ICLK,
 841	.sysc_fields	= &omap_hwmod_sysc_type1,
 842};
 843
 844static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
 845	.name	= "i2c",
 846	.sysc	= &dra7xx_i2c_sysc,
 847	.reset	= &omap_i2c_reset,
 848	.rev	= OMAP_I2C_IP_VERSION_2,
 849};
 850
 851/* i2c dev_attr */
 852static struct omap_i2c_dev_attr i2c_dev_attr = {
 853	.flags	= OMAP_I2C_FLAG_BUS_SHIFT_NONE,
 854};
 855
 856/* i2c1 */
 857static struct omap_hwmod dra7xx_i2c1_hwmod = {
 858	.name		= "i2c1",
 859	.class		= &dra7xx_i2c_hwmod_class,
 860	.clkdm_name	= "l4per_clkdm",
 861	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
 862	.main_clk	= "func_96m_fclk",
 863	.prcm = {
 864		.omap4 = {
 865			.clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
 866			.context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
 867			.modulemode   = MODULEMODE_SWCTRL,
 868		},
 869	},
 870	.dev_attr	= &i2c_dev_attr,
 871};
 872
 873/* i2c2 */
 874static struct omap_hwmod dra7xx_i2c2_hwmod = {
 875	.name		= "i2c2",
 876	.class		= &dra7xx_i2c_hwmod_class,
 877	.clkdm_name	= "l4per_clkdm",
 878	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
 879	.main_clk	= "func_96m_fclk",
 880	.prcm = {
 881		.omap4 = {
 882			.clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
 883			.context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
 884			.modulemode   = MODULEMODE_SWCTRL,
 885		},
 886	},
 887	.dev_attr	= &i2c_dev_attr,
 888};
 889
 890/* i2c3 */
 891static struct omap_hwmod dra7xx_i2c3_hwmod = {
 892	.name		= "i2c3",
 893	.class		= &dra7xx_i2c_hwmod_class,
 894	.clkdm_name	= "l4per_clkdm",
 895	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
 896	.main_clk	= "func_96m_fclk",
 897	.prcm = {
 898		.omap4 = {
 899			.clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
 900			.context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
 901			.modulemode   = MODULEMODE_SWCTRL,
 902		},
 903	},
 904	.dev_attr	= &i2c_dev_attr,
 905};
 906
 907/* i2c4 */
 908static struct omap_hwmod dra7xx_i2c4_hwmod = {
 909	.name		= "i2c4",
 910	.class		= &dra7xx_i2c_hwmod_class,
 911	.clkdm_name	= "l4per_clkdm",
 912	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
 913	.main_clk	= "func_96m_fclk",
 914	.prcm = {
 915		.omap4 = {
 916			.clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
 917			.context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
 918			.modulemode   = MODULEMODE_SWCTRL,
 919		},
 920	},
 921	.dev_attr	= &i2c_dev_attr,
 922};
 923
 924/* i2c5 */
 925static struct omap_hwmod dra7xx_i2c5_hwmod = {
 926	.name		= "i2c5",
 927	.class		= &dra7xx_i2c_hwmod_class,
 928	.clkdm_name	= "ipu_clkdm",
 929	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
 930	.main_clk	= "func_96m_fclk",
 931	.prcm = {
 932		.omap4 = {
 933			.clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
 934			.context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
 935			.modulemode   = MODULEMODE_SWCTRL,
 936		},
 937	},
 938	.dev_attr	= &i2c_dev_attr,
 939};
 940
 941/*
 942 * 'mcspi' class
 943 *
 944 */
 945
 946static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
 947	.rev_offs	= 0x0000,
 948	.sysc_offs	= 0x0010,
 949	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
 950			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
 951	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 952			   SIDLE_SMART_WKUP),
 953	.sysc_fields	= &omap_hwmod_sysc_type2,
 954};
 955
 956static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
 957	.name	= "mcspi",
 958	.sysc	= &dra7xx_mcspi_sysc,
 959	.rev	= OMAP4_MCSPI_REV,
 960};
 961
 962/* mcspi1 */
 963/* mcspi1 dev_attr */
 964static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
 965	.num_chipselect	= 4,
 966};
 967
 968static struct omap_hwmod dra7xx_mcspi1_hwmod = {
 969	.name		= "mcspi1",
 970	.class		= &dra7xx_mcspi_hwmod_class,
 971	.clkdm_name	= "l4per_clkdm",
 972	.main_clk	= "func_48m_fclk",
 973	.prcm = {
 974		.omap4 = {
 975			.clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
 976			.context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
 977			.modulemode   = MODULEMODE_SWCTRL,
 978		},
 979	},
 980	.dev_attr	= &mcspi1_dev_attr,
 981};
 982
 983/* mcspi2 */
 984/* mcspi2 dev_attr */
 985static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
 986	.num_chipselect	= 2,
 987};
 988
 989static struct omap_hwmod dra7xx_mcspi2_hwmod = {
 990	.name		= "mcspi2",
 991	.class		= &dra7xx_mcspi_hwmod_class,
 992	.clkdm_name	= "l4per_clkdm",
 993	.main_clk	= "func_48m_fclk",
 994	.prcm = {
 995		.omap4 = {
 996			.clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
 997			.context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
 998			.modulemode   = MODULEMODE_SWCTRL,
 999		},
1000	},
1001	.dev_attr	= &mcspi2_dev_attr,
1002};
1003
1004/* mcspi3 */
1005/* mcspi3 dev_attr */
1006static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
1007	.num_chipselect	= 2,
1008};
1009
1010static struct omap_hwmod dra7xx_mcspi3_hwmod = {
1011	.name		= "mcspi3",
1012	.class		= &dra7xx_mcspi_hwmod_class,
1013	.clkdm_name	= "l4per_clkdm",
1014	.main_clk	= "func_48m_fclk",
1015	.prcm = {
1016		.omap4 = {
1017			.clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
1018			.context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
1019			.modulemode   = MODULEMODE_SWCTRL,
1020		},
1021	},
1022	.dev_attr	= &mcspi3_dev_attr,
1023};
1024
1025/* mcspi4 */
1026/* mcspi4 dev_attr */
1027static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
1028	.num_chipselect	= 1,
1029};
1030
1031static struct omap_hwmod dra7xx_mcspi4_hwmod = {
1032	.name		= "mcspi4",
1033	.class		= &dra7xx_mcspi_hwmod_class,
1034	.clkdm_name	= "l4per_clkdm",
1035	.main_clk	= "func_48m_fclk",
1036	.prcm = {
1037		.omap4 = {
1038			.clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
1039			.context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
1040			.modulemode   = MODULEMODE_SWCTRL,
1041		},
1042	},
1043	.dev_attr	= &mcspi4_dev_attr,
1044};
1045
1046/*
1047 * 'mmc' class
1048 *
1049 */
1050
1051static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
1052	.rev_offs	= 0x0000,
1053	.sysc_offs	= 0x0010,
1054	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
1055			   SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1056			   SYSC_HAS_SOFTRESET),
1057	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1058			   SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1059			   MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1060	.sysc_fields	= &omap_hwmod_sysc_type2,
1061};
1062
1063static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
1064	.name	= "mmc",
1065	.sysc	= &dra7xx_mmc_sysc,
1066};
1067
1068/* mmc1 */
1069static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
1070	{ .role = "clk32k", .clk = "mmc1_clk32k" },
1071};
1072
1073/* mmc1 dev_attr */
1074static struct omap_mmc_dev_attr mmc1_dev_attr = {
1075	.flags	= OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1076};
1077
1078static struct omap_hwmod dra7xx_mmc1_hwmod = {
1079	.name		= "mmc1",
1080	.class		= &dra7xx_mmc_hwmod_class,
1081	.clkdm_name	= "l3init_clkdm",
1082	.main_clk	= "mmc1_fclk_div",
1083	.prcm = {
1084		.omap4 = {
1085			.clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
1086			.context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
1087			.modulemode   = MODULEMODE_SWCTRL,
1088		},
1089	},
1090	.opt_clks	= mmc1_opt_clks,
1091	.opt_clks_cnt	= ARRAY_SIZE(mmc1_opt_clks),
1092	.dev_attr	= &mmc1_dev_attr,
1093};
1094
1095/* mmc2 */
1096static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
1097	{ .role = "clk32k", .clk = "mmc2_clk32k" },
1098};
1099
1100static struct omap_hwmod dra7xx_mmc2_hwmod = {
1101	.name		= "mmc2",
1102	.class		= &dra7xx_mmc_hwmod_class,
1103	.clkdm_name	= "l3init_clkdm",
1104	.main_clk	= "mmc2_fclk_div",
1105	.prcm = {
1106		.omap4 = {
1107			.clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
1108			.context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
1109			.modulemode   = MODULEMODE_SWCTRL,
1110		},
1111	},
1112	.opt_clks	= mmc2_opt_clks,
1113	.opt_clks_cnt	= ARRAY_SIZE(mmc2_opt_clks),
1114};
1115
1116/* mmc3 */
1117static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
1118	{ .role = "clk32k", .clk = "mmc3_clk32k" },
1119};
1120
1121static struct omap_hwmod dra7xx_mmc3_hwmod = {
1122	.name		= "mmc3",
1123	.class		= &dra7xx_mmc_hwmod_class,
1124	.clkdm_name	= "l4per_clkdm",
1125	.main_clk	= "mmc3_gfclk_div",
1126	.prcm = {
1127		.omap4 = {
1128			.clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
1129			.context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
1130			.modulemode   = MODULEMODE_SWCTRL,
1131		},
1132	},
1133	.opt_clks	= mmc3_opt_clks,
1134	.opt_clks_cnt	= ARRAY_SIZE(mmc3_opt_clks),
1135};
1136
1137/* mmc4 */
1138static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
1139	{ .role = "clk32k", .clk = "mmc4_clk32k" },
1140};
1141
1142static struct omap_hwmod dra7xx_mmc4_hwmod = {
1143	.name		= "mmc4",
1144	.class		= &dra7xx_mmc_hwmod_class,
1145	.clkdm_name	= "l4per_clkdm",
1146	.main_clk	= "mmc4_gfclk_div",
1147	.prcm = {
1148		.omap4 = {
1149			.clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
1150			.context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
1151			.modulemode   = MODULEMODE_SWCTRL,
1152		},
1153	},
1154	.opt_clks	= mmc4_opt_clks,
1155	.opt_clks_cnt	= ARRAY_SIZE(mmc4_opt_clks),
1156};
1157
1158/*
1159 * 'mpu' class
1160 *
1161 */
1162
1163static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
1164	.name	= "mpu",
1165};
1166
1167/* mpu */
1168static struct omap_hwmod dra7xx_mpu_hwmod = {
1169	.name		= "mpu",
1170	.class		= &dra7xx_mpu_hwmod_class,
1171	.clkdm_name	= "mpu_clkdm",
1172	.flags		= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1173	.main_clk	= "dpll_mpu_m2_ck",
1174	.prcm = {
1175		.omap4 = {
1176			.clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
1177			.context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
1178		},
1179	},
1180};
1181
1182/*
1183 * 'ocp2scp' class
1184 *
1185 */
1186
1187static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
1188	.rev_offs	= 0x0000,
1189	.sysc_offs	= 0x0010,
1190	.syss_offs	= 0x0014,
1191	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1192			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1193	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1194			   SIDLE_SMART_WKUP),
1195	.sysc_fields	= &omap_hwmod_sysc_type1,
1196};
1197
1198static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
1199	.name	= "ocp2scp",
1200	.sysc	= &dra7xx_ocp2scp_sysc,
1201};
1202
1203/* ocp2scp1 */
1204static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
1205	.name		= "ocp2scp1",
1206	.class		= &dra7xx_ocp2scp_hwmod_class,
1207	.clkdm_name	= "l3init_clkdm",
1208	.main_clk	= "l4_root_clk_div",
1209	.prcm = {
1210		.omap4 = {
1211			.clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
1212			.context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
1213			.modulemode   = MODULEMODE_HWCTRL,
1214		},
1215	},
1216};
1217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1218/*
1219 * 'qspi' class
1220 *
1221 */
1222
1223static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
 
1224	.sysc_offs	= 0x0010,
1225	.sysc_flags	= SYSC_HAS_SIDLEMODE,
1226	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1227			   SIDLE_SMART_WKUP),
1228	.sysc_fields	= &omap_hwmod_sysc_type2,
1229};
1230
1231static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
1232	.name	= "qspi",
1233	.sysc	= &dra7xx_qspi_sysc,
1234};
1235
1236/* qspi */
1237static struct omap_hwmod dra7xx_qspi_hwmod = {
1238	.name		= "qspi",
1239	.class		= &dra7xx_qspi_hwmod_class,
1240	.clkdm_name	= "l4per2_clkdm",
1241	.main_clk	= "qspi_gfclk_div",
1242	.prcm = {
1243		.omap4 = {
1244			.clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
1245			.context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
1246			.modulemode   = MODULEMODE_SWCTRL,
1247		},
1248	},
1249};
1250
1251/*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1252 * 'sata' class
1253 *
1254 */
1255
1256static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
 
1257	.sysc_offs	= 0x0000,
1258	.sysc_flags	= (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1259	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1260			   SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1261			   MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1262	.sysc_fields	= &omap_hwmod_sysc_type2,
1263};
1264
1265static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
1266	.name	= "sata",
1267	.sysc	= &dra7xx_sata_sysc,
1268};
1269
1270/* sata */
1271static struct omap_hwmod_opt_clk sata_opt_clks[] = {
1272	{ .role = "ref_clk", .clk = "sata_ref_clk" },
1273};
1274
1275static struct omap_hwmod dra7xx_sata_hwmod = {
1276	.name		= "sata",
1277	.class		= &dra7xx_sata_hwmod_class,
1278	.clkdm_name	= "l3init_clkdm",
1279	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1280	.main_clk	= "func_48m_fclk",
 
1281	.prcm = {
1282		.omap4 = {
1283			.clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
1284			.context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
1285			.modulemode   = MODULEMODE_SWCTRL,
1286		},
1287	},
1288	.opt_clks	= sata_opt_clks,
1289	.opt_clks_cnt	= ARRAY_SIZE(sata_opt_clks),
1290};
1291
1292/*
1293 * 'smartreflex' class
1294 *
1295 */
1296
1297/* The IP is not compliant to type1 / type2 scheme */
1298static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
1299	.sidle_shift	= 24,
1300	.enwkup_shift	= 26,
1301};
1302
1303static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
 
1304	.sysc_offs	= 0x0038,
1305	.sysc_flags	= (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
1306	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1307			   SIDLE_SMART_WKUP),
1308	.sysc_fields	= &omap_hwmod_sysc_type_smartreflex,
1309};
1310
1311static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
1312	.name	= "smartreflex",
1313	.sysc	= &dra7xx_smartreflex_sysc,
1314	.rev	= 2,
1315};
1316
1317/* smartreflex_core */
1318/* smartreflex_core dev_attr */
1319static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
1320	.sensor_voltdm_name	= "core",
1321};
1322
1323static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
1324	.name		= "smartreflex_core",
1325	.class		= &dra7xx_smartreflex_hwmod_class,
1326	.clkdm_name	= "coreaon_clkdm",
1327	.main_clk	= "wkupaon_iclk_mux",
1328	.prcm = {
1329		.omap4 = {
1330			.clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
1331			.context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
1332			.modulemode   = MODULEMODE_SWCTRL,
1333		},
1334	},
1335	.dev_attr	= &smartreflex_core_dev_attr,
1336};
1337
1338/* smartreflex_mpu */
1339/* smartreflex_mpu dev_attr */
1340static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
1341	.sensor_voltdm_name	= "mpu",
1342};
1343
1344static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
1345	.name		= "smartreflex_mpu",
1346	.class		= &dra7xx_smartreflex_hwmod_class,
1347	.clkdm_name	= "coreaon_clkdm",
1348	.main_clk	= "wkupaon_iclk_mux",
1349	.prcm = {
1350		.omap4 = {
1351			.clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
1352			.context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
1353			.modulemode   = MODULEMODE_SWCTRL,
1354		},
1355	},
1356	.dev_attr	= &smartreflex_mpu_dev_attr,
1357};
1358
1359/*
1360 * 'spinlock' class
1361 *
1362 */
1363
1364static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
1365	.rev_offs	= 0x0000,
1366	.sysc_offs	= 0x0010,
1367	.syss_offs	= 0x0014,
1368	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1369			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1370			   SYSS_HAS_RESET_STATUS),
1371	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1372	.sysc_fields	= &omap_hwmod_sysc_type1,
1373};
1374
1375static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
1376	.name	= "spinlock",
1377	.sysc	= &dra7xx_spinlock_sysc,
1378};
1379
1380/* spinlock */
1381static struct omap_hwmod dra7xx_spinlock_hwmod = {
1382	.name		= "spinlock",
1383	.class		= &dra7xx_spinlock_hwmod_class,
1384	.clkdm_name	= "l4cfg_clkdm",
1385	.main_clk	= "l3_iclk_div",
1386	.prcm = {
1387		.omap4 = {
1388			.clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
1389			.context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
1390		},
1391	},
1392};
1393
1394/*
1395 * 'timer' class
1396 *
1397 * This class contains several variants: ['timer_1ms', 'timer_secure',
1398 * 'timer']
1399 */
1400
1401static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
1402	.rev_offs	= 0x0000,
1403	.sysc_offs	= 0x0010,
1404	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1405			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1406	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1407			   SIDLE_SMART_WKUP),
1408	.sysc_fields	= &omap_hwmod_sysc_type2,
1409};
1410
1411static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1412	.name	= "timer",
1413	.sysc	= &dra7xx_timer_1ms_sysc,
1414};
1415
1416static struct omap_hwmod_class_sysconfig dra7xx_timer_secure_sysc = {
1417	.rev_offs	= 0x0000,
1418	.sysc_offs	= 0x0010,
1419	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1420			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1421	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1422			   SIDLE_SMART_WKUP),
1423	.sysc_fields	= &omap_hwmod_sysc_type2,
1424};
1425
1426static struct omap_hwmod_class dra7xx_timer_secure_hwmod_class = {
1427	.name	= "timer",
1428	.sysc	= &dra7xx_timer_secure_sysc,
1429};
1430
1431static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1432	.rev_offs	= 0x0000,
1433	.sysc_offs	= 0x0010,
1434	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1435			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1436	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1437			   SIDLE_SMART_WKUP),
1438	.sysc_fields	= &omap_hwmod_sysc_type2,
1439};
1440
1441static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
1442	.name	= "timer",
1443	.sysc	= &dra7xx_timer_sysc,
1444};
1445
1446/* timer1 */
1447static struct omap_hwmod dra7xx_timer1_hwmod = {
1448	.name		= "timer1",
1449	.class		= &dra7xx_timer_1ms_hwmod_class,
1450	.clkdm_name	= "wkupaon_clkdm",
1451	.main_clk	= "timer1_gfclk_mux",
1452	.prcm = {
1453		.omap4 = {
1454			.clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
1455			.context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
1456			.modulemode   = MODULEMODE_SWCTRL,
1457		},
1458	},
1459};
1460
1461/* timer2 */
1462static struct omap_hwmod dra7xx_timer2_hwmod = {
1463	.name		= "timer2",
1464	.class		= &dra7xx_timer_1ms_hwmod_class,
1465	.clkdm_name	= "l4per_clkdm",
1466	.main_clk	= "timer2_gfclk_mux",
1467	.prcm = {
1468		.omap4 = {
1469			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
1470			.context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
1471			.modulemode   = MODULEMODE_SWCTRL,
1472		},
1473	},
1474};
1475
1476/* timer3 */
1477static struct omap_hwmod dra7xx_timer3_hwmod = {
1478	.name		= "timer3",
1479	.class		= &dra7xx_timer_hwmod_class,
1480	.clkdm_name	= "l4per_clkdm",
1481	.main_clk	= "timer3_gfclk_mux",
1482	.prcm = {
1483		.omap4 = {
1484			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
1485			.context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
1486			.modulemode   = MODULEMODE_SWCTRL,
1487		},
1488	},
1489};
1490
1491/* timer4 */
1492static struct omap_hwmod dra7xx_timer4_hwmod = {
1493	.name		= "timer4",
1494	.class		= &dra7xx_timer_secure_hwmod_class,
1495	.clkdm_name	= "l4per_clkdm",
1496	.main_clk	= "timer4_gfclk_mux",
1497	.prcm = {
1498		.omap4 = {
1499			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
1500			.context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
1501			.modulemode   = MODULEMODE_SWCTRL,
1502		},
1503	},
1504};
1505
1506/* timer5 */
1507static struct omap_hwmod dra7xx_timer5_hwmod = {
1508	.name		= "timer5",
1509	.class		= &dra7xx_timer_hwmod_class,
1510	.clkdm_name	= "ipu_clkdm",
1511	.main_clk	= "timer5_gfclk_mux",
1512	.prcm = {
1513		.omap4 = {
1514			.clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
1515			.context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
1516			.modulemode   = MODULEMODE_SWCTRL,
1517		},
1518	},
1519};
1520
1521/* timer6 */
1522static struct omap_hwmod dra7xx_timer6_hwmod = {
1523	.name		= "timer6",
1524	.class		= &dra7xx_timer_hwmod_class,
1525	.clkdm_name	= "ipu_clkdm",
1526	.main_clk	= "timer6_gfclk_mux",
1527	.prcm = {
1528		.omap4 = {
1529			.clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
1530			.context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
1531			.modulemode   = MODULEMODE_SWCTRL,
1532		},
1533	},
1534};
1535
1536/* timer7 */
1537static struct omap_hwmod dra7xx_timer7_hwmod = {
1538	.name		= "timer7",
1539	.class		= &dra7xx_timer_hwmod_class,
1540	.clkdm_name	= "ipu_clkdm",
1541	.main_clk	= "timer7_gfclk_mux",
1542	.prcm = {
1543		.omap4 = {
1544			.clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
1545			.context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
1546			.modulemode   = MODULEMODE_SWCTRL,
1547		},
1548	},
1549};
1550
1551/* timer8 */
1552static struct omap_hwmod dra7xx_timer8_hwmod = {
1553	.name		= "timer8",
1554	.class		= &dra7xx_timer_hwmod_class,
1555	.clkdm_name	= "ipu_clkdm",
1556	.main_clk	= "timer8_gfclk_mux",
1557	.prcm = {
1558		.omap4 = {
1559			.clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
1560			.context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
1561			.modulemode   = MODULEMODE_SWCTRL,
1562		},
1563	},
1564};
1565
1566/* timer9 */
1567static struct omap_hwmod dra7xx_timer9_hwmod = {
1568	.name		= "timer9",
1569	.class		= &dra7xx_timer_hwmod_class,
1570	.clkdm_name	= "l4per_clkdm",
1571	.main_clk	= "timer9_gfclk_mux",
1572	.prcm = {
1573		.omap4 = {
1574			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
1575			.context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
1576			.modulemode   = MODULEMODE_SWCTRL,
1577		},
1578	},
1579};
1580
1581/* timer10 */
1582static struct omap_hwmod dra7xx_timer10_hwmod = {
1583	.name		= "timer10",
1584	.class		= &dra7xx_timer_1ms_hwmod_class,
1585	.clkdm_name	= "l4per_clkdm",
1586	.main_clk	= "timer10_gfclk_mux",
1587	.prcm = {
1588		.omap4 = {
1589			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
1590			.context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
1591			.modulemode   = MODULEMODE_SWCTRL,
1592		},
1593	},
1594};
1595
1596/* timer11 */
1597static struct omap_hwmod dra7xx_timer11_hwmod = {
1598	.name		= "timer11",
1599	.class		= &dra7xx_timer_hwmod_class,
1600	.clkdm_name	= "l4per_clkdm",
1601	.main_clk	= "timer11_gfclk_mux",
1602	.prcm = {
1603		.omap4 = {
1604			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
1605			.context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
1606			.modulemode   = MODULEMODE_SWCTRL,
1607		},
1608	},
1609};
1610
1611/*
1612 * 'uart' class
1613 *
1614 */
1615
1616static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
1617	.rev_offs	= 0x0050,
1618	.sysc_offs	= 0x0054,
1619	.syss_offs	= 0x0058,
1620	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1621			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1622			   SYSS_HAS_RESET_STATUS),
1623	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1624			   SIDLE_SMART_WKUP),
1625	.sysc_fields	= &omap_hwmod_sysc_type1,
1626};
1627
1628static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
1629	.name	= "uart",
1630	.sysc	= &dra7xx_uart_sysc,
1631};
1632
1633/* uart1 */
1634static struct omap_hwmod dra7xx_uart1_hwmod = {
1635	.name		= "uart1",
1636	.class		= &dra7xx_uart_hwmod_class,
1637	.clkdm_name	= "l4per_clkdm",
1638	.main_clk	= "uart1_gfclk_mux",
1639	.flags		= HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
1640	.prcm = {
1641		.omap4 = {
1642			.clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
1643			.context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
1644			.modulemode   = MODULEMODE_SWCTRL,
1645		},
1646	},
1647};
1648
1649/* uart2 */
1650static struct omap_hwmod dra7xx_uart2_hwmod = {
1651	.name		= "uart2",
1652	.class		= &dra7xx_uart_hwmod_class,
1653	.clkdm_name	= "l4per_clkdm",
1654	.main_clk	= "uart2_gfclk_mux",
1655	.flags		= HWMOD_SWSUP_SIDLE_ACT,
1656	.prcm = {
1657		.omap4 = {
1658			.clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
1659			.context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
1660			.modulemode   = MODULEMODE_SWCTRL,
1661		},
1662	},
1663};
1664
1665/* uart3 */
1666static struct omap_hwmod dra7xx_uart3_hwmod = {
1667	.name		= "uart3",
1668	.class		= &dra7xx_uart_hwmod_class,
1669	.clkdm_name	= "l4per_clkdm",
1670	.main_clk	= "uart3_gfclk_mux",
1671	.flags		= HWMOD_SWSUP_SIDLE_ACT,
1672	.prcm = {
1673		.omap4 = {
1674			.clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
1675			.context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
1676			.modulemode   = MODULEMODE_SWCTRL,
1677		},
1678	},
1679};
1680
1681/* uart4 */
1682static struct omap_hwmod dra7xx_uart4_hwmod = {
1683	.name		= "uart4",
1684	.class		= &dra7xx_uart_hwmod_class,
1685	.clkdm_name	= "l4per_clkdm",
1686	.main_clk	= "uart4_gfclk_mux",
1687	.flags		= HWMOD_SWSUP_SIDLE_ACT,
1688	.prcm = {
1689		.omap4 = {
1690			.clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
1691			.context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
1692			.modulemode   = MODULEMODE_SWCTRL,
1693		},
1694	},
1695};
1696
1697/* uart5 */
1698static struct omap_hwmod dra7xx_uart5_hwmod = {
1699	.name		= "uart5",
1700	.class		= &dra7xx_uart_hwmod_class,
1701	.clkdm_name	= "l4per_clkdm",
1702	.main_clk	= "uart5_gfclk_mux",
1703	.flags		= HWMOD_SWSUP_SIDLE_ACT,
 
 
 
 
 
 
 
 
 
 
 
 
1704	.prcm = {
1705		.omap4 = {
1706			.clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
1707			.context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
1708			.modulemode   = MODULEMODE_SWCTRL,
1709		},
1710	},
1711};
1712
1713/* uart6 */
1714static struct omap_hwmod dra7xx_uart6_hwmod = {
1715	.name		= "uart6",
1716	.class		= &dra7xx_uart_hwmod_class,
1717	.clkdm_name	= "ipu_clkdm",
1718	.main_clk	= "uart6_gfclk_mux",
1719	.flags		= HWMOD_SWSUP_SIDLE_ACT,
 
 
 
 
 
 
 
 
 
 
 
 
1720	.prcm = {
1721		.omap4 = {
1722			.clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
1723			.context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
1724			.modulemode   = MODULEMODE_SWCTRL,
1725		},
1726	},
1727};
1728
1729/*
1730 * 'usb_otg_ss' class
1731 *
1732 */
1733
 
 
 
 
 
 
 
 
 
 
 
1734static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
1735	.name	= "usb_otg_ss",
 
1736};
1737
1738/* usb_otg_ss1 */
1739static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
1740	{ .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
1741};
1742
1743static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
1744	.name		= "usb_otg_ss1",
1745	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1746	.clkdm_name	= "l3init_clkdm",
1747	.main_clk	= "dpll_core_h13x2_ck",
 
1748	.prcm = {
1749		.omap4 = {
1750			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
1751			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
1752			.modulemode   = MODULEMODE_HWCTRL,
1753		},
1754	},
1755	.opt_clks	= usb_otg_ss1_opt_clks,
1756	.opt_clks_cnt	= ARRAY_SIZE(usb_otg_ss1_opt_clks),
1757};
1758
1759/* usb_otg_ss2 */
1760static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
1761	{ .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
1762};
1763
1764static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
1765	.name		= "usb_otg_ss2",
1766	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1767	.clkdm_name	= "l3init_clkdm",
1768	.main_clk	= "dpll_core_h13x2_ck",
 
1769	.prcm = {
1770		.omap4 = {
1771			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
1772			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
1773			.modulemode   = MODULEMODE_HWCTRL,
1774		},
1775	},
1776	.opt_clks	= usb_otg_ss2_opt_clks,
1777	.opt_clks_cnt	= ARRAY_SIZE(usb_otg_ss2_opt_clks),
1778};
1779
1780/* usb_otg_ss3 */
1781static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
1782	.name		= "usb_otg_ss3",
1783	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1784	.clkdm_name	= "l3init_clkdm",
1785	.main_clk	= "dpll_core_h13x2_ck",
1786	.prcm = {
1787		.omap4 = {
1788			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
1789			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
1790			.modulemode   = MODULEMODE_HWCTRL,
1791		},
1792	},
1793};
1794
1795/* usb_otg_ss4 */
1796static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
1797	.name		= "usb_otg_ss4",
1798	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1799	.clkdm_name	= "l3init_clkdm",
1800	.main_clk	= "dpll_core_h13x2_ck",
1801	.prcm = {
1802		.omap4 = {
1803			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
1804			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
1805			.modulemode   = MODULEMODE_HWCTRL,
1806		},
1807	},
1808};
1809
1810/*
1811 * 'vcp' class
1812 *
1813 */
1814
1815static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
1816	.name	= "vcp",
1817};
1818
1819/* vcp1 */
1820static struct omap_hwmod dra7xx_vcp1_hwmod = {
1821	.name		= "vcp1",
1822	.class		= &dra7xx_vcp_hwmod_class,
1823	.clkdm_name	= "l3main1_clkdm",
1824	.main_clk	= "l3_iclk_div",
1825	.prcm = {
1826		.omap4 = {
1827			.clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
1828			.context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
1829		},
1830	},
1831};
1832
1833/* vcp2 */
1834static struct omap_hwmod dra7xx_vcp2_hwmod = {
1835	.name		= "vcp2",
1836	.class		= &dra7xx_vcp_hwmod_class,
1837	.clkdm_name	= "l3main1_clkdm",
1838	.main_clk	= "l3_iclk_div",
1839	.prcm = {
1840		.omap4 = {
1841			.clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
1842			.context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
1843		},
1844	},
1845};
1846
1847/*
1848 * 'wd_timer' class
1849 *
1850 */
1851
1852static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
1853	.rev_offs	= 0x0000,
1854	.sysc_offs	= 0x0010,
1855	.syss_offs	= 0x0014,
1856	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
1857			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1858	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1859			   SIDLE_SMART_WKUP),
1860	.sysc_fields	= &omap_hwmod_sysc_type1,
1861};
1862
1863static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
1864	.name		= "wd_timer",
1865	.sysc		= &dra7xx_wd_timer_sysc,
1866	.pre_shutdown	= &omap2_wd_timer_disable,
1867	.reset		= &omap2_wd_timer_reset,
1868};
1869
1870/* wd_timer2 */
1871static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
1872	.name		= "wd_timer2",
1873	.class		= &dra7xx_wd_timer_hwmod_class,
1874	.clkdm_name	= "wkupaon_clkdm",
1875	.main_clk	= "sys_32k_ck",
1876	.prcm = {
1877		.omap4 = {
1878			.clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
1879			.context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
1880			.modulemode   = MODULEMODE_SWCTRL,
1881		},
1882	},
1883};
1884
1885
1886/*
1887 * Interfaces
1888 */
1889
 
 
 
 
 
 
 
 
1890/* l3_main_2 -> l3_instr */
1891static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
1892	.master		= &dra7xx_l3_main_2_hwmod,
1893	.slave		= &dra7xx_l3_instr_hwmod,
1894	.clk		= "l3_iclk_div",
1895	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1896};
1897
1898/* l4_cfg -> l3_main_1 */
1899static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
1900	.master		= &dra7xx_l4_cfg_hwmod,
1901	.slave		= &dra7xx_l3_main_1_hwmod,
1902	.clk		= "l3_iclk_div",
1903	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1904};
1905
1906/* mpu -> l3_main_1 */
1907static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
1908	.master		= &dra7xx_mpu_hwmod,
1909	.slave		= &dra7xx_l3_main_1_hwmod,
1910	.clk		= "l3_iclk_div",
1911	.user		= OCP_USER_MPU,
1912};
1913
1914/* l3_main_1 -> l3_main_2 */
1915static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
1916	.master		= &dra7xx_l3_main_1_hwmod,
1917	.slave		= &dra7xx_l3_main_2_hwmod,
1918	.clk		= "l3_iclk_div",
1919	.user		= OCP_USER_MPU,
1920};
1921
1922/* l4_cfg -> l3_main_2 */
1923static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
1924	.master		= &dra7xx_l4_cfg_hwmod,
1925	.slave		= &dra7xx_l3_main_2_hwmod,
1926	.clk		= "l3_iclk_div",
1927	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1928};
1929
1930/* l3_main_1 -> l4_cfg */
1931static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
1932	.master		= &dra7xx_l3_main_1_hwmod,
1933	.slave		= &dra7xx_l4_cfg_hwmod,
1934	.clk		= "l3_iclk_div",
1935	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1936};
1937
1938/* l3_main_1 -> l4_per1 */
1939static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
1940	.master		= &dra7xx_l3_main_1_hwmod,
1941	.slave		= &dra7xx_l4_per1_hwmod,
1942	.clk		= "l3_iclk_div",
1943	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1944};
1945
1946/* l3_main_1 -> l4_per2 */
1947static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
1948	.master		= &dra7xx_l3_main_1_hwmod,
1949	.slave		= &dra7xx_l4_per2_hwmod,
1950	.clk		= "l3_iclk_div",
1951	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1952};
1953
1954/* l3_main_1 -> l4_per3 */
1955static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
1956	.master		= &dra7xx_l3_main_1_hwmod,
1957	.slave		= &dra7xx_l4_per3_hwmod,
1958	.clk		= "l3_iclk_div",
1959	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1960};
1961
1962/* l3_main_1 -> l4_wkup */
1963static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
1964	.master		= &dra7xx_l3_main_1_hwmod,
1965	.slave		= &dra7xx_l4_wkup_hwmod,
1966	.clk		= "wkupaon_iclk_mux",
1967	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1968};
1969
1970/* l4_per2 -> atl */
1971static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
1972	.master		= &dra7xx_l4_per2_hwmod,
1973	.slave		= &dra7xx_atl_hwmod,
1974	.clk		= "l3_iclk_div",
1975	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1976};
1977
1978/* l3_main_1 -> bb2d */
1979static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
1980	.master		= &dra7xx_l3_main_1_hwmod,
1981	.slave		= &dra7xx_bb2d_hwmod,
1982	.clk		= "l3_iclk_div",
1983	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1984};
1985
1986/* l4_wkup -> counter_32k */
1987static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
1988	.master		= &dra7xx_l4_wkup_hwmod,
1989	.slave		= &dra7xx_counter_32k_hwmod,
1990	.clk		= "wkupaon_iclk_mux",
1991	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1992};
1993
1994/* l4_wkup -> ctrl_module_wkup */
1995static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
1996	.master		= &dra7xx_l4_wkup_hwmod,
1997	.slave		= &dra7xx_ctrl_module_wkup_hwmod,
1998	.clk		= "wkupaon_iclk_mux",
1999	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2000};
2001
2002/* l4_wkup -> dcan1 */
2003static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
2004	.master		= &dra7xx_l4_wkup_hwmod,
2005	.slave		= &dra7xx_dcan1_hwmod,
2006	.clk		= "wkupaon_iclk_mux",
2007	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2008};
2009
2010/* l4_per2 -> dcan2 */
2011static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
2012	.master		= &dra7xx_l4_per2_hwmod,
2013	.slave		= &dra7xx_dcan2_hwmod,
2014	.clk		= "l3_iclk_div",
2015	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2016};
2017
2018static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
2019	{
2020		.pa_start	= 0x4a056000,
2021		.pa_end		= 0x4a056fff,
2022		.flags		= ADDR_TYPE_RT
2023	},
2024	{ }
2025};
2026
2027/* l4_cfg -> dma_system */
2028static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
2029	.master		= &dra7xx_l4_cfg_hwmod,
2030	.slave		= &dra7xx_dma_system_hwmod,
2031	.clk		= "l3_iclk_div",
2032	.addr		= dra7xx_dma_system_addrs,
2033	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2034};
2035
2036static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
2037	{
2038		.name		= "family",
2039		.pa_start	= 0x58000000,
2040		.pa_end		= 0x5800007f,
2041		.flags		= ADDR_TYPE_RT
2042	},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2043};
2044
2045/* l3_main_1 -> dss */
2046static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
2047	.master		= &dra7xx_l3_main_1_hwmod,
2048	.slave		= &dra7xx_dss_hwmod,
2049	.clk		= "l3_iclk_div",
2050	.addr		= dra7xx_dss_addrs,
2051	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2052};
2053
2054static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = {
2055	{
2056		.name		= "dispc",
2057		.pa_start	= 0x58001000,
2058		.pa_end		= 0x58001fff,
2059		.flags		= ADDR_TYPE_RT
2060	},
2061};
2062
2063/* l3_main_1 -> dispc */
2064static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
2065	.master		= &dra7xx_l3_main_1_hwmod,
2066	.slave		= &dra7xx_dss_dispc_hwmod,
2067	.clk		= "l3_iclk_div",
2068	.addr		= dra7xx_dss_dispc_addrs,
2069	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2070};
2071
2072static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = {
2073	{
2074		.name		= "hdmi_wp",
2075		.pa_start	= 0x58040000,
2076		.pa_end		= 0x580400ff,
2077		.flags		= ADDR_TYPE_RT
2078	},
2079	{ }
2080};
2081
2082/* l3_main_1 -> dispc */
2083static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2084	.master		= &dra7xx_l3_main_1_hwmod,
2085	.slave		= &dra7xx_dss_hdmi_hwmod,
2086	.clk		= "l3_iclk_div",
2087	.addr		= dra7xx_dss_hdmi_addrs,
2088	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2089};
2090
2091static struct omap_hwmod_addr_space dra7xx_elm_addrs[] = {
2092	{
2093		.pa_start	= 0x48078000,
2094		.pa_end		= 0x48078fff,
2095		.flags		= ADDR_TYPE_RT
2096	},
2097	{ }
2098};
2099
2100/* l4_per1 -> elm */
2101static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
2102	.master		= &dra7xx_l4_per1_hwmod,
2103	.slave		= &dra7xx_elm_hwmod,
2104	.clk		= "l3_iclk_div",
2105	.addr		= dra7xx_elm_addrs,
2106	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2107};
2108
2109/* l4_wkup -> gpio1 */
2110static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
2111	.master		= &dra7xx_l4_wkup_hwmod,
2112	.slave		= &dra7xx_gpio1_hwmod,
2113	.clk		= "wkupaon_iclk_mux",
2114	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2115};
2116
2117/* l4_per1 -> gpio2 */
2118static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
2119	.master		= &dra7xx_l4_per1_hwmod,
2120	.slave		= &dra7xx_gpio2_hwmod,
2121	.clk		= "l3_iclk_div",
2122	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2123};
2124
2125/* l4_per1 -> gpio3 */
2126static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
2127	.master		= &dra7xx_l4_per1_hwmod,
2128	.slave		= &dra7xx_gpio3_hwmod,
2129	.clk		= "l3_iclk_div",
2130	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2131};
2132
2133/* l4_per1 -> gpio4 */
2134static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
2135	.master		= &dra7xx_l4_per1_hwmod,
2136	.slave		= &dra7xx_gpio4_hwmod,
2137	.clk		= "l3_iclk_div",
2138	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2139};
2140
2141/* l4_per1 -> gpio5 */
2142static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
2143	.master		= &dra7xx_l4_per1_hwmod,
2144	.slave		= &dra7xx_gpio5_hwmod,
2145	.clk		= "l3_iclk_div",
2146	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2147};
2148
2149/* l4_per1 -> gpio6 */
2150static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
2151	.master		= &dra7xx_l4_per1_hwmod,
2152	.slave		= &dra7xx_gpio6_hwmod,
2153	.clk		= "l3_iclk_div",
2154	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2155};
2156
2157/* l4_per1 -> gpio7 */
2158static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
2159	.master		= &dra7xx_l4_per1_hwmod,
2160	.slave		= &dra7xx_gpio7_hwmod,
2161	.clk		= "l3_iclk_div",
2162	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2163};
2164
2165/* l4_per1 -> gpio8 */
2166static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
2167	.master		= &dra7xx_l4_per1_hwmod,
2168	.slave		= &dra7xx_gpio8_hwmod,
2169	.clk		= "l3_iclk_div",
2170	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2171};
2172
2173static struct omap_hwmod_addr_space dra7xx_gpmc_addrs[] = {
2174	{
2175		.pa_start	= 0x50000000,
2176		.pa_end		= 0x500003ff,
2177		.flags		= ADDR_TYPE_RT
2178	},
2179	{ }
2180};
2181
2182/* l3_main_1 -> gpmc */
2183static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
2184	.master		= &dra7xx_l3_main_1_hwmod,
2185	.slave		= &dra7xx_gpmc_hwmod,
2186	.clk		= "l3_iclk_div",
2187	.addr		= dra7xx_gpmc_addrs,
2188	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2189};
2190
2191static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
2192	{
2193		.pa_start	= 0x480b2000,
2194		.pa_end		= 0x480b201f,
2195		.flags		= ADDR_TYPE_RT
2196	},
2197	{ }
2198};
2199
2200/* l4_per1 -> hdq1w */
2201static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
2202	.master		= &dra7xx_l4_per1_hwmod,
2203	.slave		= &dra7xx_hdq1w_hwmod,
2204	.clk		= "l3_iclk_div",
2205	.addr		= dra7xx_hdq1w_addrs,
2206	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2207};
2208
2209/* l4_per1 -> i2c1 */
2210static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
2211	.master		= &dra7xx_l4_per1_hwmod,
2212	.slave		= &dra7xx_i2c1_hwmod,
2213	.clk		= "l3_iclk_div",
2214	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2215};
2216
2217/* l4_per1 -> i2c2 */
2218static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
2219	.master		= &dra7xx_l4_per1_hwmod,
2220	.slave		= &dra7xx_i2c2_hwmod,
2221	.clk		= "l3_iclk_div",
2222	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2223};
2224
2225/* l4_per1 -> i2c3 */
2226static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
2227	.master		= &dra7xx_l4_per1_hwmod,
2228	.slave		= &dra7xx_i2c3_hwmod,
2229	.clk		= "l3_iclk_div",
2230	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2231};
2232
2233/* l4_per1 -> i2c4 */
2234static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
2235	.master		= &dra7xx_l4_per1_hwmod,
2236	.slave		= &dra7xx_i2c4_hwmod,
2237	.clk		= "l3_iclk_div",
2238	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2239};
2240
2241/* l4_per1 -> i2c5 */
2242static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
2243	.master		= &dra7xx_l4_per1_hwmod,
2244	.slave		= &dra7xx_i2c5_hwmod,
2245	.clk		= "l3_iclk_div",
2246	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2247};
2248
2249/* l4_per1 -> mcspi1 */
2250static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
2251	.master		= &dra7xx_l4_per1_hwmod,
2252	.slave		= &dra7xx_mcspi1_hwmod,
2253	.clk		= "l3_iclk_div",
2254	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2255};
2256
2257/* l4_per1 -> mcspi2 */
2258static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
2259	.master		= &dra7xx_l4_per1_hwmod,
2260	.slave		= &dra7xx_mcspi2_hwmod,
2261	.clk		= "l3_iclk_div",
2262	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2263};
2264
2265/* l4_per1 -> mcspi3 */
2266static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
2267	.master		= &dra7xx_l4_per1_hwmod,
2268	.slave		= &dra7xx_mcspi3_hwmod,
2269	.clk		= "l3_iclk_div",
2270	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2271};
2272
2273/* l4_per1 -> mcspi4 */
2274static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
2275	.master		= &dra7xx_l4_per1_hwmod,
2276	.slave		= &dra7xx_mcspi4_hwmod,
2277	.clk		= "l3_iclk_div",
2278	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2279};
2280
2281/* l4_per1 -> mmc1 */
2282static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
2283	.master		= &dra7xx_l4_per1_hwmod,
2284	.slave		= &dra7xx_mmc1_hwmod,
2285	.clk		= "l3_iclk_div",
2286	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2287};
2288
2289/* l4_per1 -> mmc2 */
2290static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
2291	.master		= &dra7xx_l4_per1_hwmod,
2292	.slave		= &dra7xx_mmc2_hwmod,
2293	.clk		= "l3_iclk_div",
2294	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2295};
2296
2297/* l4_per1 -> mmc3 */
2298static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
2299	.master		= &dra7xx_l4_per1_hwmod,
2300	.slave		= &dra7xx_mmc3_hwmod,
2301	.clk		= "l3_iclk_div",
2302	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2303};
2304
2305/* l4_per1 -> mmc4 */
2306static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
2307	.master		= &dra7xx_l4_per1_hwmod,
2308	.slave		= &dra7xx_mmc4_hwmod,
2309	.clk		= "l3_iclk_div",
2310	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2311};
2312
2313/* l4_cfg -> mpu */
2314static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
2315	.master		= &dra7xx_l4_cfg_hwmod,
2316	.slave		= &dra7xx_mpu_hwmod,
2317	.clk		= "l3_iclk_div",
2318	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2319};
2320
2321static struct omap_hwmod_addr_space dra7xx_ocp2scp1_addrs[] = {
2322	{
2323		.pa_start	= 0x4a080000,
2324		.pa_end		= 0x4a08001f,
2325		.flags		= ADDR_TYPE_RT
2326	},
2327	{ }
2328};
2329
2330/* l4_cfg -> ocp2scp1 */
2331static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
2332	.master		= &dra7xx_l4_cfg_hwmod,
2333	.slave		= &dra7xx_ocp2scp1_hwmod,
2334	.clk		= "l4_root_clk_div",
2335	.addr		= dra7xx_ocp2scp1_addrs,
2336	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2337};
2338
2339static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
2340	{
2341		.pa_start	= 0x4b300000,
2342		.pa_end		= 0x4b30007f,
2343		.flags		= ADDR_TYPE_RT
2344	},
2345	{ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2346};
2347
2348/* l3_main_1 -> qspi */
2349static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
2350	.master		= &dra7xx_l3_main_1_hwmod,
2351	.slave		= &dra7xx_qspi_hwmod,
2352	.clk		= "l3_iclk_div",
2353	.addr		= dra7xx_qspi_addrs,
2354	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2355};
2356
2357static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
2358	{
2359		.name		= "sysc",
2360		.pa_start	= 0x4a141100,
2361		.pa_end		= 0x4a141107,
2362		.flags		= ADDR_TYPE_RT
2363	},
2364	{ }
2365};
2366
2367/* l4_cfg -> sata */
2368static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
2369	.master		= &dra7xx_l4_cfg_hwmod,
2370	.slave		= &dra7xx_sata_hwmod,
2371	.clk		= "l3_iclk_div",
2372	.addr		= dra7xx_sata_addrs,
2373	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2374};
2375
2376static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
2377	{
2378		.pa_start	= 0x4a0dd000,
2379		.pa_end		= 0x4a0dd07f,
2380		.flags		= ADDR_TYPE_RT
2381	},
2382	{ }
2383};
2384
2385/* l4_cfg -> smartreflex_core */
2386static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
2387	.master		= &dra7xx_l4_cfg_hwmod,
2388	.slave		= &dra7xx_smartreflex_core_hwmod,
2389	.clk		= "l4_root_clk_div",
2390	.addr		= dra7xx_smartreflex_core_addrs,
2391	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2392};
2393
2394static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
2395	{
2396		.pa_start	= 0x4a0d9000,
2397		.pa_end		= 0x4a0d907f,
2398		.flags		= ADDR_TYPE_RT
2399	},
2400	{ }
2401};
2402
2403/* l4_cfg -> smartreflex_mpu */
2404static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
2405	.master		= &dra7xx_l4_cfg_hwmod,
2406	.slave		= &dra7xx_smartreflex_mpu_hwmod,
2407	.clk		= "l4_root_clk_div",
2408	.addr		= dra7xx_smartreflex_mpu_addrs,
2409	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2410};
2411
2412static struct omap_hwmod_addr_space dra7xx_spinlock_addrs[] = {
2413	{
2414		.pa_start	= 0x4a0f6000,
2415		.pa_end		= 0x4a0f6fff,
2416		.flags		= ADDR_TYPE_RT
2417	},
2418	{ }
2419};
2420
2421/* l4_cfg -> spinlock */
2422static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
2423	.master		= &dra7xx_l4_cfg_hwmod,
2424	.slave		= &dra7xx_spinlock_hwmod,
2425	.clk		= "l3_iclk_div",
2426	.addr		= dra7xx_spinlock_addrs,
2427	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2428};
2429
2430/* l4_wkup -> timer1 */
2431static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
2432	.master		= &dra7xx_l4_wkup_hwmod,
2433	.slave		= &dra7xx_timer1_hwmod,
2434	.clk		= "wkupaon_iclk_mux",
2435	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2436};
2437
2438/* l4_per1 -> timer2 */
2439static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
2440	.master		= &dra7xx_l4_per1_hwmod,
2441	.slave		= &dra7xx_timer2_hwmod,
2442	.clk		= "l3_iclk_div",
2443	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2444};
2445
2446/* l4_per1 -> timer3 */
2447static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
2448	.master		= &dra7xx_l4_per1_hwmod,
2449	.slave		= &dra7xx_timer3_hwmod,
2450	.clk		= "l3_iclk_div",
2451	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2452};
2453
2454/* l4_per1 -> timer4 */
2455static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
2456	.master		= &dra7xx_l4_per1_hwmod,
2457	.slave		= &dra7xx_timer4_hwmod,
2458	.clk		= "l3_iclk_div",
2459	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2460};
2461
2462/* l4_per3 -> timer5 */
2463static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
2464	.master		= &dra7xx_l4_per3_hwmod,
2465	.slave		= &dra7xx_timer5_hwmod,
2466	.clk		= "l3_iclk_div",
2467	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2468};
2469
2470/* l4_per3 -> timer6 */
2471static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
2472	.master		= &dra7xx_l4_per3_hwmod,
2473	.slave		= &dra7xx_timer6_hwmod,
2474	.clk		= "l3_iclk_div",
2475	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2476};
2477
2478/* l4_per3 -> timer7 */
2479static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
2480	.master		= &dra7xx_l4_per3_hwmod,
2481	.slave		= &dra7xx_timer7_hwmod,
2482	.clk		= "l3_iclk_div",
2483	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2484};
2485
2486/* l4_per3 -> timer8 */
2487static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
2488	.master		= &dra7xx_l4_per3_hwmod,
2489	.slave		= &dra7xx_timer8_hwmod,
2490	.clk		= "l3_iclk_div",
2491	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2492};
2493
2494/* l4_per1 -> timer9 */
2495static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
2496	.master		= &dra7xx_l4_per1_hwmod,
2497	.slave		= &dra7xx_timer9_hwmod,
2498	.clk		= "l3_iclk_div",
2499	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2500};
2501
2502/* l4_per1 -> timer10 */
2503static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
2504	.master		= &dra7xx_l4_per1_hwmod,
2505	.slave		= &dra7xx_timer10_hwmod,
2506	.clk		= "l3_iclk_div",
2507	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2508};
2509
2510/* l4_per1 -> timer11 */
2511static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
2512	.master		= &dra7xx_l4_per1_hwmod,
2513	.slave		= &dra7xx_timer11_hwmod,
2514	.clk		= "l3_iclk_div",
2515	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2516};
2517
2518/* l4_per1 -> uart1 */
2519static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
2520	.master		= &dra7xx_l4_per1_hwmod,
2521	.slave		= &dra7xx_uart1_hwmod,
2522	.clk		= "l3_iclk_div",
2523	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2524};
2525
2526/* l4_per1 -> uart2 */
2527static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
2528	.master		= &dra7xx_l4_per1_hwmod,
2529	.slave		= &dra7xx_uart2_hwmod,
2530	.clk		= "l3_iclk_div",
2531	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2532};
2533
2534/* l4_per1 -> uart3 */
2535static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
2536	.master		= &dra7xx_l4_per1_hwmod,
2537	.slave		= &dra7xx_uart3_hwmod,
2538	.clk		= "l3_iclk_div",
2539	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2540};
2541
2542/* l4_per1 -> uart4 */
2543static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
2544	.master		= &dra7xx_l4_per1_hwmod,
2545	.slave		= &dra7xx_uart4_hwmod,
2546	.clk		= "l3_iclk_div",
2547	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2548};
2549
2550/* l4_per1 -> uart5 */
2551static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
2552	.master		= &dra7xx_l4_per1_hwmod,
2553	.slave		= &dra7xx_uart5_hwmod,
2554	.clk		= "l3_iclk_div",
2555	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2556};
2557
2558/* l4_per1 -> uart6 */
2559static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
2560	.master		= &dra7xx_l4_per1_hwmod,
2561	.slave		= &dra7xx_uart6_hwmod,
2562	.clk		= "l3_iclk_div",
2563	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2564};
2565
 
 
 
 
 
 
 
2566/* l4_per3 -> usb_otg_ss1 */
2567static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
2568	.master		= &dra7xx_l4_per3_hwmod,
2569	.slave		= &dra7xx_usb_otg_ss1_hwmod,
2570	.clk		= "dpll_core_h13x2_ck",
2571	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2572};
2573
2574/* l4_per3 -> usb_otg_ss2 */
2575static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
2576	.master		= &dra7xx_l4_per3_hwmod,
2577	.slave		= &dra7xx_usb_otg_ss2_hwmod,
2578	.clk		= "dpll_core_h13x2_ck",
2579	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2580};
2581
2582/* l4_per3 -> usb_otg_ss3 */
2583static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
2584	.master		= &dra7xx_l4_per3_hwmod,
2585	.slave		= &dra7xx_usb_otg_ss3_hwmod,
2586	.clk		= "dpll_core_h13x2_ck",
2587	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2588};
2589
2590/* l4_per3 -> usb_otg_ss4 */
2591static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
2592	.master		= &dra7xx_l4_per3_hwmod,
2593	.slave		= &dra7xx_usb_otg_ss4_hwmod,
2594	.clk		= "dpll_core_h13x2_ck",
2595	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2596};
2597
2598/* l3_main_1 -> vcp1 */
2599static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
2600	.master		= &dra7xx_l3_main_1_hwmod,
2601	.slave		= &dra7xx_vcp1_hwmod,
2602	.clk		= "l3_iclk_div",
2603	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2604};
2605
2606/* l4_per2 -> vcp1 */
2607static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
2608	.master		= &dra7xx_l4_per2_hwmod,
2609	.slave		= &dra7xx_vcp1_hwmod,
2610	.clk		= "l3_iclk_div",
2611	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2612};
2613
2614/* l3_main_1 -> vcp2 */
2615static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
2616	.master		= &dra7xx_l3_main_1_hwmod,
2617	.slave		= &dra7xx_vcp2_hwmod,
2618	.clk		= "l3_iclk_div",
2619	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2620};
2621
2622/* l4_per2 -> vcp2 */
2623static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
2624	.master		= &dra7xx_l4_per2_hwmod,
2625	.slave		= &dra7xx_vcp2_hwmod,
2626	.clk		= "l3_iclk_div",
2627	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2628};
2629
2630/* l4_wkup -> wd_timer2 */
2631static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
2632	.master		= &dra7xx_l4_wkup_hwmod,
2633	.slave		= &dra7xx_wd_timer2_hwmod,
2634	.clk		= "wkupaon_iclk_mux",
2635	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2636};
2637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2638static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
 
2639	&dra7xx_l3_main_2__l3_instr,
2640	&dra7xx_l4_cfg__l3_main_1,
2641	&dra7xx_mpu__l3_main_1,
2642	&dra7xx_l3_main_1__l3_main_2,
2643	&dra7xx_l4_cfg__l3_main_2,
2644	&dra7xx_l3_main_1__l4_cfg,
2645	&dra7xx_l3_main_1__l4_per1,
2646	&dra7xx_l3_main_1__l4_per2,
2647	&dra7xx_l3_main_1__l4_per3,
2648	&dra7xx_l3_main_1__l4_wkup,
2649	&dra7xx_l4_per2__atl,
2650	&dra7xx_l3_main_1__bb2d,
2651	&dra7xx_l4_wkup__counter_32k,
2652	&dra7xx_l4_wkup__ctrl_module_wkup,
2653	&dra7xx_l4_wkup__dcan1,
2654	&dra7xx_l4_per2__dcan2,
2655	&dra7xx_l4_cfg__dma_system,
 
 
 
2656	&dra7xx_l3_main_1__dss,
2657	&dra7xx_l3_main_1__dispc,
2658	&dra7xx_l3_main_1__hdmi,
 
 
 
2659	&dra7xx_l4_per1__elm,
2660	&dra7xx_l4_wkup__gpio1,
2661	&dra7xx_l4_per1__gpio2,
2662	&dra7xx_l4_per1__gpio3,
2663	&dra7xx_l4_per1__gpio4,
2664	&dra7xx_l4_per1__gpio5,
2665	&dra7xx_l4_per1__gpio6,
2666	&dra7xx_l4_per1__gpio7,
2667	&dra7xx_l4_per1__gpio8,
2668	&dra7xx_l3_main_1__gpmc,
2669	&dra7xx_l4_per1__hdq1w,
2670	&dra7xx_l4_per1__i2c1,
2671	&dra7xx_l4_per1__i2c2,
2672	&dra7xx_l4_per1__i2c3,
2673	&dra7xx_l4_per1__i2c4,
2674	&dra7xx_l4_per1__i2c5,
2675	&dra7xx_l4_per1__mcspi1,
2676	&dra7xx_l4_per1__mcspi2,
2677	&dra7xx_l4_per1__mcspi3,
2678	&dra7xx_l4_per1__mcspi4,
2679	&dra7xx_l4_per1__mmc1,
2680	&dra7xx_l4_per1__mmc2,
2681	&dra7xx_l4_per1__mmc3,
2682	&dra7xx_l4_per1__mmc4,
2683	&dra7xx_l4_cfg__mpu,
2684	&dra7xx_l4_cfg__ocp2scp1,
 
 
 
 
 
2685	&dra7xx_l3_main_1__qspi,
2686	&dra7xx_l4_cfg__sata,
2687	&dra7xx_l4_cfg__smartreflex_core,
2688	&dra7xx_l4_cfg__smartreflex_mpu,
2689	&dra7xx_l4_cfg__spinlock,
2690	&dra7xx_l4_wkup__timer1,
2691	&dra7xx_l4_per1__timer2,
2692	&dra7xx_l4_per1__timer3,
2693	&dra7xx_l4_per1__timer4,
2694	&dra7xx_l4_per3__timer5,
2695	&dra7xx_l4_per3__timer6,
2696	&dra7xx_l4_per3__timer7,
2697	&dra7xx_l4_per3__timer8,
2698	&dra7xx_l4_per1__timer9,
2699	&dra7xx_l4_per1__timer10,
2700	&dra7xx_l4_per1__timer11,
2701	&dra7xx_l4_per1__uart1,
2702	&dra7xx_l4_per1__uart2,
2703	&dra7xx_l4_per1__uart3,
2704	&dra7xx_l4_per1__uart4,
2705	&dra7xx_l4_per1__uart5,
2706	&dra7xx_l4_per1__uart6,
2707	&dra7xx_l4_per3__usb_otg_ss1,
2708	&dra7xx_l4_per3__usb_otg_ss2,
2709	&dra7xx_l4_per3__usb_otg_ss3,
2710	&dra7xx_l4_per3__usb_otg_ss4,
2711	&dra7xx_l3_main_1__vcp1,
2712	&dra7xx_l4_per2__vcp1,
2713	&dra7xx_l3_main_1__vcp2,
2714	&dra7xx_l4_per2__vcp2,
2715	&dra7xx_l4_wkup__wd_timer2,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2716	NULL,
2717};
2718
2719int __init dra7xx_hwmod_init(void)
2720{
 
 
2721	omap_hwmod_init();
2722	return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2723}
v5.4
   1// SPDX-License-Identifier: GPL-2.0-only
   2/*
   3 * Hardware modules present on the DRA7xx chips
   4 *
   5 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
   6 *
   7 * Paul Walmsley
   8 * Benoit Cousson
   9 *
  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.
 
 
 
 
  15 */
  16
  17#include <linux/io.h>
 
  18#include <linux/power/smartreflex.h>
 
  19
  20#include <linux/omap-dma.h>
 
 
 
  21
  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 "wd_timer.h"
  28#include "soc.h"
  29
  30/* Base offset for all DRA7XX interrupts external to MPUSS */
  31#define DRA7XX_IRQ_GIC_START	32
  32
  33/* Base offset for all DRA7XX dma requests */
  34#define DRA7XX_DMA_REQ_START	1
  35
  36
  37/*
  38 * IP blocks
  39 */
  40
  41/*
  42 * 'dmm' class
  43 * instance(s): dmm
  44 */
  45static struct omap_hwmod_class dra7xx_dmm_hwmod_class = {
  46	.name	= "dmm",
  47};
  48
  49/* dmm */
  50static struct omap_hwmod dra7xx_dmm_hwmod = {
  51	.name		= "dmm",
  52	.class		= &dra7xx_dmm_hwmod_class,
  53	.clkdm_name	= "emif_clkdm",
  54	.prcm = {
  55		.omap4 = {
  56			.clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
  57			.context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET,
  58		},
  59	},
  60};
  61
  62/*
  63 * 'l3' class
  64 * instance(s): l3_instr, l3_main_1, l3_main_2
  65 */
  66static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
  67	.name	= "l3",
  68};
  69
  70/* l3_instr */
  71static struct omap_hwmod dra7xx_l3_instr_hwmod = {
  72	.name		= "l3_instr",
  73	.class		= &dra7xx_l3_hwmod_class,
  74	.clkdm_name	= "l3instr_clkdm",
  75	.prcm = {
  76		.omap4 = {
  77			.clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
  78			.context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
  79			.modulemode   = MODULEMODE_HWCTRL,
  80		},
  81	},
  82};
  83
  84/* l3_main_1 */
  85static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
  86	.name		= "l3_main_1",
  87	.class		= &dra7xx_l3_hwmod_class,
  88	.clkdm_name	= "l3main1_clkdm",
  89	.prcm = {
  90		.omap4 = {
  91			.clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
  92			.context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
  93		},
  94	},
  95};
  96
  97/* l3_main_2 */
  98static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
  99	.name		= "l3_main_2",
 100	.class		= &dra7xx_l3_hwmod_class,
 101	.clkdm_name	= "l3instr_clkdm",
 102	.prcm = {
 103		.omap4 = {
 104			.clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
 105			.context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
 106			.modulemode   = MODULEMODE_HWCTRL,
 107		},
 108	},
 109};
 110
 111/*
 112 * 'l4' class
 113 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
 114 */
 115static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
 116	.name	= "l4",
 117};
 118
 119/* l4_cfg */
 120static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
 121	.name		= "l4_cfg",
 122	.class		= &dra7xx_l4_hwmod_class,
 123	.clkdm_name	= "l4cfg_clkdm",
 124	.prcm = {
 125		.omap4 = {
 126			.clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
 127			.context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
 128		},
 129	},
 130};
 131
 132/* l4_per1 */
 133static struct omap_hwmod dra7xx_l4_per1_hwmod = {
 134	.name		= "l4_per1",
 135	.class		= &dra7xx_l4_hwmod_class,
 136	.clkdm_name	= "l4per_clkdm",
 137	.prcm = {
 138		.omap4 = {
 139			.clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
 140			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 141		},
 142	},
 143};
 144
 145/* l4_per2 */
 146static struct omap_hwmod dra7xx_l4_per2_hwmod = {
 147	.name		= "l4_per2",
 148	.class		= &dra7xx_l4_hwmod_class,
 149	.clkdm_name	= "l4per2_clkdm",
 150	.prcm = {
 151		.omap4 = {
 152			.clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
 153			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 154		},
 155	},
 156};
 157
 158/* l4_per3 */
 159static struct omap_hwmod dra7xx_l4_per3_hwmod = {
 160	.name		= "l4_per3",
 161	.class		= &dra7xx_l4_hwmod_class,
 162	.clkdm_name	= "l4per3_clkdm",
 163	.prcm = {
 164		.omap4 = {
 165			.clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
 166			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 167		},
 168	},
 169};
 170
 171/* l4_wkup */
 172static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
 173	.name		= "l4_wkup",
 174	.class		= &dra7xx_l4_hwmod_class,
 175	.clkdm_name	= "wkupaon_clkdm",
 176	.prcm = {
 177		.omap4 = {
 178			.clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
 179			.context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
 180		},
 181	},
 182};
 183
 184/*
 185 * 'atl' class
 186 *
 187 */
 188
 189static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
 190	.name	= "atl",
 191};
 192
 193/* atl */
 194static struct omap_hwmod dra7xx_atl_hwmod = {
 195	.name		= "atl",
 196	.class		= &dra7xx_atl_hwmod_class,
 197	.clkdm_name	= "atl_clkdm",
 198	.main_clk	= "atl_gfclk_mux",
 199	.prcm = {
 200		.omap4 = {
 201			.clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
 202			.context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
 203			.modulemode   = MODULEMODE_SWCTRL,
 204		},
 205	},
 206};
 207
 208/*
 209 * 'bb2d' class
 210 *
 211 */
 212
 213static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
 214	.name	= "bb2d",
 215};
 216
 217/* bb2d */
 218static struct omap_hwmod dra7xx_bb2d_hwmod = {
 219	.name		= "bb2d",
 220	.class		= &dra7xx_bb2d_hwmod_class,
 221	.clkdm_name	= "dss_clkdm",
 222	.main_clk	= "dpll_core_h24x2_ck",
 223	.prcm = {
 224		.omap4 = {
 225			.clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
 226			.context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
 227			.modulemode   = MODULEMODE_SWCTRL,
 228		},
 229	},
 230};
 231
 232/*
 233 * 'counter' class
 234 *
 235 */
 236
 237static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
 238	.rev_offs	= 0x0000,
 239	.sysc_offs	= 0x0010,
 240	.sysc_flags	= SYSC_HAS_SIDLEMODE,
 241	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 242			   SIDLE_SMART_WKUP),
 243	.sysc_fields	= &omap_hwmod_sysc_type1,
 244};
 245
 246static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
 247	.name	= "counter",
 248	.sysc	= &dra7xx_counter_sysc,
 249};
 250
 251/* counter_32k */
 252static struct omap_hwmod dra7xx_counter_32k_hwmod = {
 253	.name		= "counter_32k",
 254	.class		= &dra7xx_counter_hwmod_class,
 255	.clkdm_name	= "wkupaon_clkdm",
 256	.flags		= HWMOD_SWSUP_SIDLE,
 257	.main_clk	= "wkupaon_iclk_mux",
 258	.prcm = {
 259		.omap4 = {
 260			.clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
 261			.context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
 262		},
 263	},
 264};
 265
 266/*
 267 * 'ctrl_module' class
 268 *
 269 */
 270
 271static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
 272	.name	= "ctrl_module",
 273};
 274
 275/* ctrl_module_wkup */
 276static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
 277	.name		= "ctrl_module_wkup",
 278	.class		= &dra7xx_ctrl_module_hwmod_class,
 279	.clkdm_name	= "wkupaon_clkdm",
 280	.prcm = {
 281		.omap4 = {
 282			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 283		},
 284	},
 285};
 286
 287/*
 288 * 'dcan' class
 289 *
 290 */
 291
 292static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
 293	.name	= "dcan",
 294};
 295
 296/* dcan1 */
 297static struct omap_hwmod dra7xx_dcan1_hwmod = {
 298	.name		= "dcan1",
 299	.class		= &dra7xx_dcan_hwmod_class,
 300	.clkdm_name	= "wkupaon_clkdm",
 301	.main_clk	= "dcan1_sys_clk_mux",
 302	.flags		= HWMOD_CLKDM_NOAUTO,
 303	.prcm = {
 304		.omap4 = {
 305			.clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
 306			.context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
 307			.modulemode   = MODULEMODE_SWCTRL,
 308		},
 309	},
 310};
 311
 312/* dcan2 */
 313static struct omap_hwmod dra7xx_dcan2_hwmod = {
 314	.name		= "dcan2",
 315	.class		= &dra7xx_dcan_hwmod_class,
 316	.clkdm_name	= "l4per2_clkdm",
 317	.main_clk	= "sys_clkin1",
 318	.flags		= HWMOD_CLKDM_NOAUTO,
 319	.prcm = {
 320		.omap4 = {
 321			.clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
 322			.context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
 323			.modulemode   = MODULEMODE_SWCTRL,
 324		},
 325	},
 326};
 327
 328/* pwmss  */
 329static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
 330	.rev_offs	= 0x0,
 331	.sysc_offs	= 0x4,
 332	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 333			  SYSC_HAS_RESET_STATUS,
 334	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
 335	.sysc_fields	= &omap_hwmod_sysc_type2,
 336};
 337
 338/*
 339 * epwmss class
 340 */
 341static struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
 342	.name		= "epwmss",
 343	.sysc		= &dra7xx_epwmss_sysc,
 344};
 345
 346/* epwmss0 */
 347static struct omap_hwmod dra7xx_epwmss0_hwmod = {
 348	.name		= "epwmss0",
 349	.class		= &dra7xx_epwmss_hwmod_class,
 350	.clkdm_name	= "l4per2_clkdm",
 351	.main_clk	= "l4_root_clk_div",
 352	.prcm		= {
 353		.omap4	= {
 354			.modulemode	= MODULEMODE_SWCTRL,
 355			.clkctrl_offs	= DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
 356			.context_offs	= DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
 357		},
 358	},
 359};
 360
 361/* epwmss1 */
 362static struct omap_hwmod dra7xx_epwmss1_hwmod = {
 363	.name		= "epwmss1",
 364	.class		= &dra7xx_epwmss_hwmod_class,
 365	.clkdm_name	= "l4per2_clkdm",
 366	.main_clk	= "l4_root_clk_div",
 367	.prcm		= {
 368		.omap4	= {
 369			.modulemode	= MODULEMODE_SWCTRL,
 370			.clkctrl_offs	= DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
 371			.context_offs	= DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
 372		},
 373	},
 374};
 375
 376/* epwmss2 */
 377static struct omap_hwmod dra7xx_epwmss2_hwmod = {
 378	.name		= "epwmss2",
 379	.class		= &dra7xx_epwmss_hwmod_class,
 380	.clkdm_name	= "l4per2_clkdm",
 381	.main_clk	= "l4_root_clk_div",
 382	.prcm		= {
 383		.omap4	= {
 384			.modulemode	= MODULEMODE_SWCTRL,
 385			.clkctrl_offs	= DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
 386			.context_offs	= DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
 387		},
 388	},
 389};
 390
 391/*
 392 * 'dma' class
 393 *
 394 */
 395
 396static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
 397	.rev_offs	= 0x0000,
 398	.sysc_offs	= 0x002c,
 399	.syss_offs	= 0x0028,
 400	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
 401			   SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
 402			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 403			   SYSS_HAS_RESET_STATUS),
 404	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 405			   SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
 406			   MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
 407	.sysc_fields	= &omap_hwmod_sysc_type1,
 408};
 409
 410static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
 411	.name	= "dma",
 412	.sysc	= &dra7xx_dma_sysc,
 413};
 414
 415/* dma dev_attr */
 416static struct omap_dma_dev_attr dma_dev_attr = {
 417	.dev_caps	= RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
 418			  IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
 419	.lch_count	= 32,
 420};
 421
 422/* dma_system */
 
 
 
 
 
 
 
 
 423static struct omap_hwmod dra7xx_dma_system_hwmod = {
 424	.name		= "dma_system",
 425	.class		= &dra7xx_dma_hwmod_class,
 426	.clkdm_name	= "dma_clkdm",
 
 427	.main_clk	= "l3_iclk_div",
 428	.prcm = {
 429		.omap4 = {
 430			.clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
 431			.context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
 432		},
 433	},
 434	.dev_attr	= &dma_dev_attr,
 435};
 436
 437/*
 438 * 'tpcc' class
 439 *
 440 */
 441static struct omap_hwmod_class dra7xx_tpcc_hwmod_class = {
 442	.name		= "tpcc",
 443};
 444
 445static struct omap_hwmod dra7xx_tpcc_hwmod = {
 446	.name		= "tpcc",
 447	.class		= &dra7xx_tpcc_hwmod_class,
 448	.clkdm_name	= "l3main1_clkdm",
 449	.main_clk	= "l3_iclk_div",
 450	.prcm		= {
 451		.omap4	= {
 452			.clkctrl_offs = DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET,
 453			.context_offs = DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET,
 454		},
 455	},
 456};
 457
 458/*
 459 * 'tptc' class
 460 *
 461 */
 462static struct omap_hwmod_class dra7xx_tptc_hwmod_class = {
 463	.name		= "tptc",
 464};
 465
 466/* tptc0 */
 467static struct omap_hwmod dra7xx_tptc0_hwmod = {
 468	.name		= "tptc0",
 469	.class		= &dra7xx_tptc_hwmod_class,
 470	.clkdm_name	= "l3main1_clkdm",
 471	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
 472	.main_clk	= "l3_iclk_div",
 473	.prcm		= {
 474		.omap4	= {
 475			.clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET,
 476			.context_offs = DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET,
 477			.modulemode   = MODULEMODE_HWCTRL,
 478		},
 479	},
 480};
 481
 482/* tptc1 */
 483static struct omap_hwmod dra7xx_tptc1_hwmod = {
 484	.name		= "tptc1",
 485	.class		= &dra7xx_tptc_hwmod_class,
 486	.clkdm_name	= "l3main1_clkdm",
 487	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
 488	.main_clk	= "l3_iclk_div",
 489	.prcm		= {
 490		.omap4	= {
 491			.clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET,
 492			.context_offs = DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET,
 493			.modulemode   = MODULEMODE_HWCTRL,
 494		},
 495	},
 496};
 497
 498/*
 499 * 'dss' class
 500 *
 501 */
 502
 503static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
 504	.rev_offs	= 0x0000,
 505	.syss_offs	= 0x0014,
 506	.sysc_flags	= SYSS_HAS_RESET_STATUS,
 507};
 508
 509static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
 510	.name	= "dss",
 511	.sysc	= &dra7xx_dss_sysc,
 512	.reset	= omap_dss_reset,
 513};
 514
 515/* dss */
 
 
 
 
 
 516static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 517	{ .role = "dss_clk", .clk = "dss_dss_clk" },
 518	{ .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
 519	{ .role = "32khz_clk", .clk = "dss_32khz_clk" },
 520	{ .role = "video2_clk", .clk = "dss_video2_clk" },
 521	{ .role = "video1_clk", .clk = "dss_video1_clk" },
 522	{ .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
 523	{ .role = "hdcp_clk", .clk = "dss_deshdcp_clk" },
 524};
 525
 526static struct omap_hwmod dra7xx_dss_hwmod = {
 527	.name		= "dss_core",
 528	.class		= &dra7xx_dss_hwmod_class,
 529	.clkdm_name	= "dss_clkdm",
 530	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 
 531	.main_clk	= "dss_dss_clk",
 532	.prcm = {
 533		.omap4 = {
 534			.clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
 535			.context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
 536			.modulemode   = MODULEMODE_SWCTRL,
 537		},
 538	},
 539	.opt_clks	= dss_opt_clks,
 540	.opt_clks_cnt	= ARRAY_SIZE(dss_opt_clks),
 541};
 542
 543/*
 544 * 'dispc' class
 545 * display controller
 546 */
 547
 548static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
 549	.rev_offs	= 0x0000,
 550	.sysc_offs	= 0x0010,
 551	.syss_offs	= 0x0014,
 552	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
 553			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
 554			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 555			   SYSS_HAS_RESET_STATUS),
 556	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 557			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
 558	.sysc_fields	= &omap_hwmod_sysc_type1,
 559};
 560
 561static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
 562	.name	= "dispc",
 563	.sysc	= &dra7xx_dispc_sysc,
 564};
 565
 566/* dss_dispc */
 567/* dss_dispc dev_attr */
 568static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
 569	.has_framedonetv_irq	= 1,
 570	.manager_count		= 4,
 571};
 572
 573static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
 574	.name		= "dss_dispc",
 575	.class		= &dra7xx_dispc_hwmod_class,
 576	.clkdm_name	= "dss_clkdm",
 577	.main_clk	= "dss_dss_clk",
 578	.prcm = {
 579		.omap4 = {
 580			.clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
 581			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 582		},
 583	},
 584	.dev_attr	= &dss_dispc_dev_attr,
 585	.parent_hwmod	= &dra7xx_dss_hwmod,
 586};
 587
 588/*
 589 * 'hdmi' class
 590 * hdmi controller
 591 */
 592
 593static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
 594	.rev_offs	= 0x0000,
 595	.sysc_offs	= 0x0010,
 596	.sysc_flags	= (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
 597			   SYSC_HAS_SOFTRESET),
 598	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 599			   SIDLE_SMART_WKUP),
 600	.sysc_fields	= &omap_hwmod_sysc_type2,
 601};
 602
 603static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
 604	.name	= "hdmi",
 605	.sysc	= &dra7xx_hdmi_sysc,
 606};
 607
 608/* dss_hdmi */
 609
 610static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
 611	{ .role = "sys_clk", .clk = "dss_hdmi_clk" },
 612};
 613
 614static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
 615	.name		= "dss_hdmi",
 616	.class		= &dra7xx_hdmi_hwmod_class,
 617	.clkdm_name	= "dss_clkdm",
 618	.main_clk	= "dss_48mhz_clk",
 619	.prcm = {
 620		.omap4 = {
 621			.clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
 622			.flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
 623		},
 624	},
 625	.opt_clks	= dss_hdmi_opt_clks,
 626	.opt_clks_cnt	= ARRAY_SIZE(dss_hdmi_opt_clks),
 627	.parent_hwmod	= &dra7xx_dss_hwmod,
 628};
 629
 630/* AES (the 'P' (public) device) */
 631static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
 632	.rev_offs	= 0x0080,
 633	.sysc_offs	= 0x0084,
 634	.syss_offs	= 0x0088,
 635	.sysc_flags	= SYSS_HAS_RESET_STATUS,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 636};
 637
 638static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
 639	.name	= "aes",
 640	.sysc	= &dra7xx_aes_sysc,
 641};
 642
 643/* AES1 */
 644static struct omap_hwmod dra7xx_aes1_hwmod = {
 645	.name		= "aes1",
 646	.class		= &dra7xx_aes_hwmod_class,
 647	.clkdm_name	= "l4sec_clkdm",
 648	.main_clk	= "l3_iclk_div",
 649	.prcm = {
 650		.omap4 = {
 651			.clkctrl_offs = DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET,
 652			.context_offs = DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET,
 653			.modulemode   = MODULEMODE_HWCTRL,
 654		},
 655	},
 
 
 
 656};
 657
 658/* AES2 */
 659static struct omap_hwmod dra7xx_aes2_hwmod = {
 660	.name		= "aes2",
 661	.class		= &dra7xx_aes_hwmod_class,
 662	.clkdm_name	= "l4sec_clkdm",
 
 
 
 
 
 663	.main_clk	= "l3_iclk_div",
 664	.prcm = {
 665		.omap4 = {
 666			.clkctrl_offs = DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET,
 667			.context_offs = DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET,
 668			.modulemode   = MODULEMODE_HWCTRL,
 669		},
 670	},
 
 
 
 
 
 
 
 
 671};
 672
 673/* sha0 HIB2 (the 'P' (public) device) */
 674static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
 675	.rev_offs	= 0x100,
 676	.sysc_offs	= 0x110,
 677	.syss_offs	= 0x114,
 678	.sysc_flags	= SYSS_HAS_RESET_STATUS,
 
 
 
 
 
 
 
 
 
 
 679};
 680
 681static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
 682	.name		= "sham",
 683	.sysc		= &dra7xx_sha0_sysc,
 684};
 685
 686struct omap_hwmod dra7xx_sha0_hwmod = {
 687	.name		= "sham",
 688	.class		= &dra7xx_sha0_hwmod_class,
 689	.clkdm_name	= "l4sec_clkdm",
 
 690	.main_clk	= "l3_iclk_div",
 691	.prcm		= {
 692		.omap4 = {
 693			.clkctrl_offs = DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
 694			.context_offs = DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
 695			.modulemode   = MODULEMODE_HWCTRL,
 696		},
 697	},
 
 
 
 698};
 699
 700/*
 701 * 'elm' class
 702 *
 703 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 704
 705static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
 706	.rev_offs	= 0x0000,
 707	.sysc_offs	= 0x0010,
 708	.syss_offs	= 0x0014,
 709	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
 710			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
 711			   SYSS_HAS_RESET_STATUS),
 712	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 713			   SIDLE_SMART_WKUP),
 714	.sysc_fields	= &omap_hwmod_sysc_type1,
 715};
 716
 717static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
 718	.name	= "elm",
 719	.sysc	= &dra7xx_elm_sysc,
 
 
 
 
 
 
 
 
 
 
 
 
 
 720};
 721
 722/* elm */
 
 
 
 723
 724static struct omap_hwmod dra7xx_elm_hwmod = {
 725	.name		= "elm",
 726	.class		= &dra7xx_elm_hwmod_class,
 727	.clkdm_name	= "l4per_clkdm",
 
 728	.main_clk	= "l3_iclk_div",
 729	.prcm = {
 730		.omap4 = {
 731			.clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
 732			.context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
 
 733		},
 734	},
 
 
 
 735};
 736
 737/*
 738 * 'gpmc' class
 739 *
 740 */
 741
 742static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
 743	.rev_offs	= 0x0000,
 744	.sysc_offs	= 0x0010,
 745	.syss_offs	= 0x0014,
 746	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
 747			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
 748	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
 
 749	.sysc_fields	= &omap_hwmod_sysc_type1,
 750};
 751
 752static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
 753	.name	= "gpmc",
 754	.sysc	= &dra7xx_gpmc_sysc,
 755};
 756
 757/* gpmc */
 758
 759static struct omap_hwmod dra7xx_gpmc_hwmod = {
 760	.name		= "gpmc",
 761	.class		= &dra7xx_gpmc_hwmod_class,
 762	.clkdm_name	= "l3main1_clkdm",
 763	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
 764	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 765	.main_clk	= "l3_iclk_div",
 766	.prcm = {
 767		.omap4 = {
 768			.clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
 769			.context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
 770			.modulemode   = MODULEMODE_HWCTRL,
 771		},
 772	},
 773};
 774
 775/*
 776 * 'hdq1w' class
 777 *
 778 */
 779
 780static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
 781	.rev_offs	= 0x0000,
 782	.sysc_offs	= 0x0014,
 783	.syss_offs	= 0x0018,
 784	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
 785			   SYSS_HAS_RESET_STATUS),
 786	.sysc_fields	= &omap_hwmod_sysc_type1,
 787};
 788
 789static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
 790	.name	= "hdq1w",
 791	.sysc	= &dra7xx_hdq1w_sysc,
 792};
 793
 794/* hdq1w */
 795
 796static struct omap_hwmod dra7xx_hdq1w_hwmod = {
 797	.name		= "hdq1w",
 798	.class		= &dra7xx_hdq1w_hwmod_class,
 799	.clkdm_name	= "l4per_clkdm",
 800	.flags		= HWMOD_INIT_NO_RESET,
 801	.main_clk	= "func_12m_fclk",
 802	.prcm = {
 803		.omap4 = {
 804			.clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
 805			.context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
 806			.modulemode   = MODULEMODE_SWCTRL,
 807		},
 808	},
 809};
 810
 811/*
 812 * 'mailbox' class
 813 *
 814 */
 815
 816static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
 817	.rev_offs	= 0x0000,
 818	.sysc_offs	= 0x0010,
 819	.sysc_flags	= (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
 820			   SYSC_HAS_SOFTRESET),
 821	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
 822	.sysc_fields	= &omap_hwmod_sysc_type2,
 
 
 
 
 823};
 824
 825static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
 826	.name	= "mailbox",
 827	.sysc	= &dra7xx_mailbox_sysc,
 828};
 829
 830/* mailbox1 */
 831static struct omap_hwmod dra7xx_mailbox1_hwmod = {
 832	.name		= "mailbox1",
 833	.class		= &dra7xx_mailbox_hwmod_class,
 834	.clkdm_name	= "l4cfg_clkdm",
 
 
 
 
 
 
 
 
 
 835	.prcm = {
 836		.omap4 = {
 837			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
 838			.context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
 
 839		},
 840	},
 
 841};
 842
 843/* mailbox2 */
 844static struct omap_hwmod dra7xx_mailbox2_hwmod = {
 845	.name		= "mailbox2",
 846	.class		= &dra7xx_mailbox_hwmod_class,
 847	.clkdm_name	= "l4cfg_clkdm",
 
 
 848	.prcm = {
 849		.omap4 = {
 850			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
 851			.context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
 
 852		},
 853	},
 
 854};
 855
 856/* mailbox3 */
 857static struct omap_hwmod dra7xx_mailbox3_hwmod = {
 858	.name		= "mailbox3",
 859	.class		= &dra7xx_mailbox_hwmod_class,
 860	.clkdm_name	= "l4cfg_clkdm",
 
 
 861	.prcm = {
 862		.omap4 = {
 863			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
 864			.context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
 
 865		},
 866	},
 
 867};
 868
 869/* mailbox4 */
 870static struct omap_hwmod dra7xx_mailbox4_hwmod = {
 871	.name		= "mailbox4",
 872	.class		= &dra7xx_mailbox_hwmod_class,
 873	.clkdm_name	= "l4cfg_clkdm",
 
 
 874	.prcm = {
 875		.omap4 = {
 876			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
 877			.context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
 
 878		},
 879	},
 
 880};
 881
 882/* mailbox5 */
 883static struct omap_hwmod dra7xx_mailbox5_hwmod = {
 884	.name		= "mailbox5",
 885	.class		= &dra7xx_mailbox_hwmod_class,
 886	.clkdm_name	= "l4cfg_clkdm",
 
 
 887	.prcm = {
 888		.omap4 = {
 889			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
 890			.context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
 
 891		},
 892	},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 893};
 894
 895/* mailbox6 */
 896static struct omap_hwmod dra7xx_mailbox6_hwmod = {
 897	.name		= "mailbox6",
 898	.class		= &dra7xx_mailbox_hwmod_class,
 899	.clkdm_name	= "l4cfg_clkdm",
 900	.prcm = {
 901		.omap4 = {
 902			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
 903			.context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
 
 904		},
 905	},
 
 906};
 907
 908/* mailbox7 */
 909static struct omap_hwmod dra7xx_mailbox7_hwmod = {
 910	.name		= "mailbox7",
 911	.class		= &dra7xx_mailbox_hwmod_class,
 912	.clkdm_name	= "l4cfg_clkdm",
 
 
 
 
 
 
 913	.prcm = {
 914		.omap4 = {
 915			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
 916			.context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
 
 917		},
 918	},
 
 
 
 
 
 
 
 919};
 920
 921/* mailbox8 */
 922static struct omap_hwmod dra7xx_mailbox8_hwmod = {
 923	.name		= "mailbox8",
 924	.class		= &dra7xx_mailbox_hwmod_class,
 925	.clkdm_name	= "l4cfg_clkdm",
 926	.prcm = {
 927		.omap4 = {
 928			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
 929			.context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
 
 930		},
 931	},
 
 
 
 
 
 
 
 932};
 933
 934/* mailbox9 */
 935static struct omap_hwmod dra7xx_mailbox9_hwmod = {
 936	.name		= "mailbox9",
 937	.class		= &dra7xx_mailbox_hwmod_class,
 938	.clkdm_name	= "l4cfg_clkdm",
 939	.prcm = {
 940		.omap4 = {
 941			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
 942			.context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
 
 943		},
 944	},
 
 945};
 946
 947/* mailbox10 */
 948static struct omap_hwmod dra7xx_mailbox10_hwmod = {
 949	.name		= "mailbox10",
 950	.class		= &dra7xx_mailbox_hwmod_class,
 951	.clkdm_name	= "l4cfg_clkdm",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 952	.prcm = {
 953		.omap4 = {
 954			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
 955			.context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
 
 956		},
 957	},
 
 
 
 958};
 959
 960/* mailbox11 */
 961static struct omap_hwmod dra7xx_mailbox11_hwmod = {
 962	.name		= "mailbox11",
 963	.class		= &dra7xx_mailbox_hwmod_class,
 964	.clkdm_name	= "l4cfg_clkdm",
 
 
 
 
 
 965	.prcm = {
 966		.omap4 = {
 967			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
 968			.context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
 
 969		},
 970	},
 
 
 971};
 972
 973/* mailbox12 */
 974static struct omap_hwmod dra7xx_mailbox12_hwmod = {
 975	.name		= "mailbox12",
 976	.class		= &dra7xx_mailbox_hwmod_class,
 977	.clkdm_name	= "l4cfg_clkdm",
 
 
 
 
 
 978	.prcm = {
 979		.omap4 = {
 980			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
 981			.context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
 
 982		},
 983	},
 
 
 984};
 985
 986/* mailbox13 */
 987static struct omap_hwmod dra7xx_mailbox13_hwmod = {
 988	.name		= "mailbox13",
 989	.class		= &dra7xx_mailbox_hwmod_class,
 990	.clkdm_name	= "l4cfg_clkdm",
 
 
 
 
 
 991	.prcm = {
 992		.omap4 = {
 993			.clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
 994			.context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
 
 995		},
 996	},
 
 
 997};
 998
 999/*
1000 * 'mpu' class
1001 *
1002 */
1003
1004static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
1005	.name	= "mpu",
1006};
1007
1008/* mpu */
1009static struct omap_hwmod dra7xx_mpu_hwmod = {
1010	.name		= "mpu",
1011	.class		= &dra7xx_mpu_hwmod_class,
1012	.clkdm_name	= "mpu_clkdm",
1013	.flags		= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1014	.main_clk	= "dpll_mpu_m2_ck",
1015	.prcm = {
1016		.omap4 = {
1017			.clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
1018			.context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
1019		},
1020	},
1021};
1022
1023/*
1024 * 'ocp2scp' class
1025 *
1026 */
1027
1028static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
1029	.rev_offs	= 0x0000,
1030	.sysc_offs	= 0x0010,
1031	.syss_offs	= 0x0014,
1032	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1033			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1034	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
 
1035	.sysc_fields	= &omap_hwmod_sysc_type1,
1036};
1037
1038static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
1039	.name	= "ocp2scp",
1040	.sysc	= &dra7xx_ocp2scp_sysc,
1041};
1042
1043/* ocp2scp1 */
1044static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
1045	.name		= "ocp2scp1",
1046	.class		= &dra7xx_ocp2scp_hwmod_class,
1047	.clkdm_name	= "l3init_clkdm",
1048	.main_clk	= "l4_root_clk_div",
1049	.prcm = {
1050		.omap4 = {
1051			.clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
1052			.context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
1053			.modulemode   = MODULEMODE_HWCTRL,
1054		},
1055	},
1056};
1057
1058/* ocp2scp3 */
1059static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
1060	.name		= "ocp2scp3",
1061	.class		= &dra7xx_ocp2scp_hwmod_class,
1062	.clkdm_name	= "l3init_clkdm",
1063	.main_clk	= "l4_root_clk_div",
1064	.prcm = {
1065		.omap4 = {
1066			.clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
1067			.context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
1068			.modulemode   = MODULEMODE_HWCTRL,
1069		},
1070	},
1071};
1072
1073/*
1074 * 'PCIE' class
1075 *
1076 */
1077
1078/*
1079 * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
1080 * functionality of OMAP HWMOD layer does not deassert the hardreset lines
1081 * associated with an IP automatically leaving the driver to handle that
1082 * by itself. This does not work for PCIeSS which needs the reset lines
1083 * deasserted for the driver to start accessing registers.
1084 *
1085 * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
1086 * lines after asserting them.
1087 */
1088int dra7xx_pciess_reset(struct omap_hwmod *oh)
1089{
1090	int i;
1091
1092	for (i = 0; i < oh->rst_lines_cnt; i++) {
1093		omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
1094		omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
1095	}
1096
1097	return 0;
1098}
1099
1100static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
1101	.name	= "pcie",
1102	.reset	= dra7xx_pciess_reset,
1103};
1104
1105/* pcie1 */
1106static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
1107	{ .name = "pcie", .rst_shift = 0 },
1108};
1109
1110static struct omap_hwmod dra7xx_pciess1_hwmod = {
1111	.name		= "pcie1",
1112	.class		= &dra7xx_pciess_hwmod_class,
1113	.clkdm_name	= "pcie_clkdm",
1114	.rst_lines	= dra7xx_pciess1_resets,
1115	.rst_lines_cnt	= ARRAY_SIZE(dra7xx_pciess1_resets),
1116	.main_clk	= "l4_root_clk_div",
1117	.prcm = {
1118		.omap4 = {
1119			.clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
1120			.rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
1121			.context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
1122			.modulemode   = MODULEMODE_SWCTRL,
1123		},
1124	},
1125};
1126
1127/* pcie2 */
1128static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
1129	{ .name = "pcie", .rst_shift = 1 },
1130};
1131
1132/* pcie2 */
1133static struct omap_hwmod dra7xx_pciess2_hwmod = {
1134	.name		= "pcie2",
1135	.class		= &dra7xx_pciess_hwmod_class,
1136	.clkdm_name	= "pcie_clkdm",
1137	.rst_lines	= dra7xx_pciess2_resets,
1138	.rst_lines_cnt	= ARRAY_SIZE(dra7xx_pciess2_resets),
1139	.main_clk	= "l4_root_clk_div",
1140	.prcm = {
1141		.omap4 = {
1142			.clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
1143			.rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
1144			.context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
1145			.modulemode   = MODULEMODE_SWCTRL,
1146		},
1147	},
1148};
1149
1150/*
1151 * 'qspi' class
1152 *
1153 */
1154
1155static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
1156	.rev_offs	= 0,
1157	.sysc_offs	= 0x0010,
1158	.sysc_flags	= SYSC_HAS_SIDLEMODE,
1159	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1160			   SIDLE_SMART_WKUP),
1161	.sysc_fields	= &omap_hwmod_sysc_type2,
1162};
1163
1164static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
1165	.name	= "qspi",
1166	.sysc	= &dra7xx_qspi_sysc,
1167};
1168
1169/* qspi */
1170static struct omap_hwmod dra7xx_qspi_hwmod = {
1171	.name		= "qspi",
1172	.class		= &dra7xx_qspi_hwmod_class,
1173	.clkdm_name	= "l4per2_clkdm",
1174	.main_clk	= "qspi_gfclk_div",
1175	.prcm = {
1176		.omap4 = {
1177			.clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
1178			.context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
1179			.modulemode   = MODULEMODE_SWCTRL,
1180		},
1181	},
1182};
1183
1184/*
1185 * 'rtcss' class
1186 *
1187 */
1188static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
1189	.rev_offs	= 0x0074,
1190	.sysc_offs	= 0x0078,
1191	.sysc_flags	= SYSC_HAS_SIDLEMODE,
1192	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1193			   SIDLE_SMART_WKUP),
1194	.sysc_fields	= &omap_hwmod_sysc_type3,
1195};
1196
1197static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
1198	.name	= "rtcss",
1199	.sysc	= &dra7xx_rtcss_sysc,
1200	.unlock	= &omap_hwmod_rtc_unlock,
1201	.lock	= &omap_hwmod_rtc_lock,
1202};
1203
1204/* rtcss */
1205static struct omap_hwmod dra7xx_rtcss_hwmod = {
1206	.name		= "rtcss",
1207	.class		= &dra7xx_rtcss_hwmod_class,
1208	.clkdm_name	= "rtc_clkdm",
1209	.main_clk	= "sys_32k_ck",
1210	.prcm = {
1211		.omap4 = {
1212			.clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
1213			.context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
1214			.modulemode   = MODULEMODE_SWCTRL,
1215		},
1216	},
1217};
1218
1219/*
1220 * 'sata' class
1221 *
1222 */
1223
1224static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
1225	.rev_offs	= 0x00fc,
1226	.sysc_offs	= 0x0000,
1227	.sysc_flags	= (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1228	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1229			   SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1230			   MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1231	.sysc_fields	= &omap_hwmod_sysc_type2,
1232};
1233
1234static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
1235	.name	= "sata",
1236	.sysc	= &dra7xx_sata_sysc,
1237};
1238
1239/* sata */
 
 
 
1240
1241static struct omap_hwmod dra7xx_sata_hwmod = {
1242	.name		= "sata",
1243	.class		= &dra7xx_sata_hwmod_class,
1244	.clkdm_name	= "l3init_clkdm",
1245	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1246	.main_clk	= "func_48m_fclk",
1247	.mpu_rt_idx	= 1,
1248	.prcm = {
1249		.omap4 = {
1250			.clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
1251			.context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
1252			.modulemode   = MODULEMODE_SWCTRL,
1253		},
1254	},
 
 
1255};
1256
1257/*
1258 * 'smartreflex' class
1259 *
1260 */
1261
1262/* The IP is not compliant to type1 / type2 scheme */
 
 
 
 
 
1263static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
1264	.rev_offs	= -ENODEV,
1265	.sysc_offs	= 0x0038,
1266	.sysc_flags	= (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
1267	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1268			   SIDLE_SMART_WKUP),
1269	.sysc_fields	= &omap36xx_sr_sysc_fields,
1270};
1271
1272static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
1273	.name	= "smartreflex",
1274	.sysc	= &dra7xx_smartreflex_sysc,
 
1275};
1276
1277/* smartreflex_core */
1278/* smartreflex_core dev_attr */
1279static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
1280	.sensor_voltdm_name	= "core",
1281};
1282
1283static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
1284	.name		= "smartreflex_core",
1285	.class		= &dra7xx_smartreflex_hwmod_class,
1286	.clkdm_name	= "coreaon_clkdm",
1287	.main_clk	= "wkupaon_iclk_mux",
1288	.prcm = {
1289		.omap4 = {
1290			.clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
1291			.context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
1292			.modulemode   = MODULEMODE_SWCTRL,
1293		},
1294	},
1295	.dev_attr	= &smartreflex_core_dev_attr,
1296};
1297
1298/* smartreflex_mpu */
1299/* smartreflex_mpu dev_attr */
1300static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
1301	.sensor_voltdm_name	= "mpu",
1302};
1303
1304static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
1305	.name		= "smartreflex_mpu",
1306	.class		= &dra7xx_smartreflex_hwmod_class,
1307	.clkdm_name	= "coreaon_clkdm",
1308	.main_clk	= "wkupaon_iclk_mux",
1309	.prcm = {
1310		.omap4 = {
1311			.clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
1312			.context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
1313			.modulemode   = MODULEMODE_SWCTRL,
1314		},
1315	},
1316	.dev_attr	= &smartreflex_mpu_dev_attr,
1317};
1318
1319/*
1320 * 'spinlock' class
1321 *
1322 */
1323
1324static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
1325	.rev_offs	= 0x0000,
1326	.sysc_offs	= 0x0010,
1327	.syss_offs	= 0x0014,
1328	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1329			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1330			   SYSS_HAS_RESET_STATUS),
1331	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1332	.sysc_fields	= &omap_hwmod_sysc_type1,
1333};
1334
1335static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
1336	.name	= "spinlock",
1337	.sysc	= &dra7xx_spinlock_sysc,
1338};
1339
1340/* spinlock */
1341static struct omap_hwmod dra7xx_spinlock_hwmod = {
1342	.name		= "spinlock",
1343	.class		= &dra7xx_spinlock_hwmod_class,
1344	.clkdm_name	= "l4cfg_clkdm",
1345	.main_clk	= "l3_iclk_div",
1346	.prcm = {
1347		.omap4 = {
1348			.clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
1349			.context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
1350		},
1351	},
1352};
1353
1354/*
1355 * 'timer' class
1356 *
1357 * This class contains several variants: ['timer_1ms', 'timer_secure',
1358 * 'timer']
1359 */
1360
1361static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
1362	.rev_offs	= 0x0000,
1363	.sysc_offs	= 0x0010,
1364	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1365			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1366	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1367			   SIDLE_SMART_WKUP),
1368	.sysc_fields	= &omap_hwmod_sysc_type2,
1369};
1370
1371static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1372	.name	= "timer",
1373	.sysc	= &dra7xx_timer_1ms_sysc,
1374};
1375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1376static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1377	.rev_offs	= 0x0000,
1378	.sysc_offs	= 0x0010,
1379	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1380			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1381	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1382			   SIDLE_SMART_WKUP),
1383	.sysc_fields	= &omap_hwmod_sysc_type2,
1384};
1385
1386static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
1387	.name	= "timer",
1388	.sysc	= &dra7xx_timer_sysc,
1389};
1390
1391/* timer1 */
1392static struct omap_hwmod dra7xx_timer1_hwmod = {
1393	.name		= "timer1",
1394	.class		= &dra7xx_timer_1ms_hwmod_class,
1395	.clkdm_name	= "wkupaon_clkdm",
1396	.main_clk	= "timer1_gfclk_mux",
1397	.prcm = {
1398		.omap4 = {
1399			.clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
1400			.context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
1401			.modulemode   = MODULEMODE_SWCTRL,
1402		},
1403	},
1404};
1405
1406/* timer2 */
1407static struct omap_hwmod dra7xx_timer2_hwmod = {
1408	.name		= "timer2",
1409	.class		= &dra7xx_timer_1ms_hwmod_class,
1410	.clkdm_name	= "l4per_clkdm",
1411	.main_clk	= "timer2_gfclk_mux",
1412	.prcm = {
1413		.omap4 = {
1414			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
1415			.context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
1416			.modulemode   = MODULEMODE_SWCTRL,
1417		},
1418	},
1419};
1420
1421/* timer3 */
1422static struct omap_hwmod dra7xx_timer3_hwmod = {
1423	.name		= "timer3",
1424	.class		= &dra7xx_timer_hwmod_class,
1425	.clkdm_name	= "l4per_clkdm",
1426	.main_clk	= "timer3_gfclk_mux",
1427	.prcm = {
1428		.omap4 = {
1429			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
1430			.context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
1431			.modulemode   = MODULEMODE_SWCTRL,
1432		},
1433	},
1434};
1435
1436/* timer4 */
1437static struct omap_hwmod dra7xx_timer4_hwmod = {
1438	.name		= "timer4",
1439	.class		= &dra7xx_timer_hwmod_class,
1440	.clkdm_name	= "l4per_clkdm",
1441	.main_clk	= "timer4_gfclk_mux",
1442	.prcm = {
1443		.omap4 = {
1444			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
1445			.context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
1446			.modulemode   = MODULEMODE_SWCTRL,
1447		},
1448	},
1449};
1450
1451/* timer5 */
1452static struct omap_hwmod dra7xx_timer5_hwmod = {
1453	.name		= "timer5",
1454	.class		= &dra7xx_timer_hwmod_class,
1455	.clkdm_name	= "ipu_clkdm",
1456	.main_clk	= "timer5_gfclk_mux",
1457	.prcm = {
1458		.omap4 = {
1459			.clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
1460			.context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
1461			.modulemode   = MODULEMODE_SWCTRL,
1462		},
1463	},
1464};
1465
1466/* timer6 */
1467static struct omap_hwmod dra7xx_timer6_hwmod = {
1468	.name		= "timer6",
1469	.class		= &dra7xx_timer_hwmod_class,
1470	.clkdm_name	= "ipu_clkdm",
1471	.main_clk	= "timer6_gfclk_mux",
1472	.prcm = {
1473		.omap4 = {
1474			.clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
1475			.context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
1476			.modulemode   = MODULEMODE_SWCTRL,
1477		},
1478	},
1479};
1480
1481/* timer7 */
1482static struct omap_hwmod dra7xx_timer7_hwmod = {
1483	.name		= "timer7",
1484	.class		= &dra7xx_timer_hwmod_class,
1485	.clkdm_name	= "ipu_clkdm",
1486	.main_clk	= "timer7_gfclk_mux",
1487	.prcm = {
1488		.omap4 = {
1489			.clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
1490			.context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
1491			.modulemode   = MODULEMODE_SWCTRL,
1492		},
1493	},
1494};
1495
1496/* timer8 */
1497static struct omap_hwmod dra7xx_timer8_hwmod = {
1498	.name		= "timer8",
1499	.class		= &dra7xx_timer_hwmod_class,
1500	.clkdm_name	= "ipu_clkdm",
1501	.main_clk	= "timer8_gfclk_mux",
1502	.prcm = {
1503		.omap4 = {
1504			.clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
1505			.context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
1506			.modulemode   = MODULEMODE_SWCTRL,
1507		},
1508	},
1509};
1510
1511/* timer9 */
1512static struct omap_hwmod dra7xx_timer9_hwmod = {
1513	.name		= "timer9",
1514	.class		= &dra7xx_timer_hwmod_class,
1515	.clkdm_name	= "l4per_clkdm",
1516	.main_clk	= "timer9_gfclk_mux",
1517	.prcm = {
1518		.omap4 = {
1519			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
1520			.context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
1521			.modulemode   = MODULEMODE_SWCTRL,
1522		},
1523	},
1524};
1525
1526/* timer10 */
1527static struct omap_hwmod dra7xx_timer10_hwmod = {
1528	.name		= "timer10",
1529	.class		= &dra7xx_timer_1ms_hwmod_class,
1530	.clkdm_name	= "l4per_clkdm",
1531	.main_clk	= "timer10_gfclk_mux",
1532	.prcm = {
1533		.omap4 = {
1534			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
1535			.context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
1536			.modulemode   = MODULEMODE_SWCTRL,
1537		},
1538	},
1539};
1540
1541/* timer11 */
1542static struct omap_hwmod dra7xx_timer11_hwmod = {
1543	.name		= "timer11",
1544	.class		= &dra7xx_timer_hwmod_class,
1545	.clkdm_name	= "l4per_clkdm",
1546	.main_clk	= "timer11_gfclk_mux",
1547	.prcm = {
1548		.omap4 = {
1549			.clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
1550			.context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
1551			.modulemode   = MODULEMODE_SWCTRL,
1552		},
1553	},
1554};
1555
1556/* timer12 */
1557static struct omap_hwmod dra7xx_timer12_hwmod = {
1558	.name		= "timer12",
1559	.class		= &dra7xx_timer_hwmod_class,
1560	.clkdm_name	= "wkupaon_clkdm",
1561	.main_clk	= "secure_32k_clk_src_ck",
1562	.prcm = {
1563		.omap4 = {
1564			.clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET,
1565			.context_offs = DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET,
1566		},
1567	},
 
 
 
 
 
 
 
 
1568};
1569
1570/* timer13 */
1571static struct omap_hwmod dra7xx_timer13_hwmod = {
1572	.name		= "timer13",
1573	.class		= &dra7xx_timer_hwmod_class,
1574	.clkdm_name	= "l4per3_clkdm",
1575	.main_clk	= "timer13_gfclk_mux",
 
1576	.prcm = {
1577		.omap4 = {
1578			.clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
1579			.context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
1580			.modulemode   = MODULEMODE_SWCTRL,
1581		},
1582	},
1583};
1584
1585/* timer14 */
1586static struct omap_hwmod dra7xx_timer14_hwmod = {
1587	.name		= "timer14",
1588	.class		= &dra7xx_timer_hwmod_class,
1589	.clkdm_name	= "l4per3_clkdm",
1590	.main_clk	= "timer14_gfclk_mux",
 
1591	.prcm = {
1592		.omap4 = {
1593			.clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
1594			.context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
1595			.modulemode   = MODULEMODE_SWCTRL,
1596		},
1597	},
1598};
1599
1600/* timer15 */
1601static struct omap_hwmod dra7xx_timer15_hwmod = {
1602	.name		= "timer15",
1603	.class		= &dra7xx_timer_hwmod_class,
1604	.clkdm_name	= "l4per3_clkdm",
1605	.main_clk	= "timer15_gfclk_mux",
 
1606	.prcm = {
1607		.omap4 = {
1608			.clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
1609			.context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
1610			.modulemode   = MODULEMODE_SWCTRL,
1611		},
1612	},
1613};
1614
1615/* timer16 */
1616static struct omap_hwmod dra7xx_timer16_hwmod = {
1617	.name		= "timer16",
1618	.class		= &dra7xx_timer_hwmod_class,
1619	.clkdm_name	= "l4per3_clkdm",
1620	.main_clk	= "timer16_gfclk_mux",
 
1621	.prcm = {
1622		.omap4 = {
1623			.clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
1624			.context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
1625			.modulemode   = MODULEMODE_SWCTRL,
1626		},
1627	},
1628};
1629
1630/* DES (the 'P' (public) device) */
1631static struct omap_hwmod_class_sysconfig dra7xx_des_sysc = {
1632	.rev_offs	= 0x0030,
1633	.sysc_offs	= 0x0034,
1634	.syss_offs	= 0x0038,
1635	.sysc_flags	= SYSS_HAS_RESET_STATUS,
1636};
1637
1638static struct omap_hwmod_class dra7xx_des_hwmod_class = {
1639	.name	= "des",
1640	.sysc	= &dra7xx_des_sysc,
1641};
1642
1643/* DES */
1644static struct omap_hwmod dra7xx_des_hwmod = {
1645	.name		= "des",
1646	.class		= &dra7xx_des_hwmod_class,
1647	.clkdm_name	= "l4sec_clkdm",
1648	.main_clk	= "l3_iclk_div",
1649	.prcm = {
1650		.omap4 = {
1651			.clkctrl_offs = DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET,
1652			.context_offs = DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET,
1653			.modulemode   = MODULEMODE_HWCTRL,
1654		},
1655	},
1656};
1657
1658/* rng */
1659static struct omap_hwmod_class_sysconfig dra7xx_rng_sysc = {
1660	.rev_offs       = 0x1fe0,
1661	.sysc_offs      = 0x1fe4,
1662	.sysc_flags     = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
1663	.idlemodes      = SIDLE_FORCE | SIDLE_NO,
1664	.sysc_fields    = &omap_hwmod_sysc_type1,
1665};
1666
1667static struct omap_hwmod_class dra7xx_rng_hwmod_class = {
1668	.name           = "rng",
1669	.sysc           = &dra7xx_rng_sysc,
1670};
1671
1672static struct omap_hwmod dra7xx_rng_hwmod = {
1673	.name           = "rng",
1674	.class          = &dra7xx_rng_hwmod_class,
1675	.flags		= HWMOD_SWSUP_SIDLE,
1676	.clkdm_name     = "l4sec_clkdm",
1677	.prcm = {
1678		.omap4 = {
1679			.clkctrl_offs = DRA7XX_CM_L4SEC_RNG_CLKCTRL_OFFSET,
1680			.context_offs = DRA7XX_RM_L4SEC_RNG_CONTEXT_OFFSET,
1681			.modulemode   = MODULEMODE_HWCTRL,
1682		},
1683	},
1684};
1685
1686/*
1687 * 'usb_otg_ss' class
1688 *
1689 */
1690
1691static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
1692	.rev_offs	= 0x0000,
1693	.sysc_offs	= 0x0010,
1694	.sysc_flags	= (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
1695			   SYSC_HAS_SIDLEMODE),
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
1702static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
1703	.name	= "usb_otg_ss",
1704	.sysc	= &dra7xx_usb_otg_ss_sysc,
1705};
1706
1707/* usb_otg_ss1 */
1708static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
1709	{ .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
1710};
1711
1712static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
1713	.name		= "usb_otg_ss1",
1714	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1715	.clkdm_name	= "l3init_clkdm",
1716	.main_clk	= "dpll_core_h13x2_ck",
1717	.flags		= HWMOD_CLKDM_NOAUTO,
1718	.prcm = {
1719		.omap4 = {
1720			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
1721			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
1722			.modulemode   = MODULEMODE_HWCTRL,
1723		},
1724	},
1725	.opt_clks	= usb_otg_ss1_opt_clks,
1726	.opt_clks_cnt	= ARRAY_SIZE(usb_otg_ss1_opt_clks),
1727};
1728
1729/* usb_otg_ss2 */
1730static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
1731	{ .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
1732};
1733
1734static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
1735	.name		= "usb_otg_ss2",
1736	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1737	.clkdm_name	= "l3init_clkdm",
1738	.main_clk	= "dpll_core_h13x2_ck",
1739	.flags		= HWMOD_CLKDM_NOAUTO,
1740	.prcm = {
1741		.omap4 = {
1742			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
1743			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
1744			.modulemode   = MODULEMODE_HWCTRL,
1745		},
1746	},
1747	.opt_clks	= usb_otg_ss2_opt_clks,
1748	.opt_clks_cnt	= ARRAY_SIZE(usb_otg_ss2_opt_clks),
1749};
1750
1751/* usb_otg_ss3 */
1752static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
1753	.name		= "usb_otg_ss3",
1754	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1755	.clkdm_name	= "l3init_clkdm",
1756	.main_clk	= "dpll_core_h13x2_ck",
1757	.prcm = {
1758		.omap4 = {
1759			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
1760			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
1761			.modulemode   = MODULEMODE_HWCTRL,
1762		},
1763	},
1764};
1765
1766/* usb_otg_ss4 */
1767static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
1768	.name		= "usb_otg_ss4",
1769	.class		= &dra7xx_usb_otg_ss_hwmod_class,
1770	.clkdm_name	= "l3init_clkdm",
1771	.main_clk	= "dpll_core_h13x2_ck",
1772	.prcm = {
1773		.omap4 = {
1774			.clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
1775			.context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
1776			.modulemode   = MODULEMODE_HWCTRL,
1777		},
1778	},
1779};
1780
1781/*
1782 * 'vcp' class
1783 *
1784 */
1785
1786static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
1787	.name	= "vcp",
1788};
1789
1790/* vcp1 */
1791static struct omap_hwmod dra7xx_vcp1_hwmod = {
1792	.name		= "vcp1",
1793	.class		= &dra7xx_vcp_hwmod_class,
1794	.clkdm_name	= "l3main1_clkdm",
1795	.main_clk	= "l3_iclk_div",
1796	.prcm = {
1797		.omap4 = {
1798			.clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
1799			.context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
1800		},
1801	},
1802};
1803
1804/* vcp2 */
1805static struct omap_hwmod dra7xx_vcp2_hwmod = {
1806	.name		= "vcp2",
1807	.class		= &dra7xx_vcp_hwmod_class,
1808	.clkdm_name	= "l3main1_clkdm",
1809	.main_clk	= "l3_iclk_div",
1810	.prcm = {
1811		.omap4 = {
1812			.clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
1813			.context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
1814		},
1815	},
1816};
1817
1818/*
1819 * 'wd_timer' class
1820 *
1821 */
1822
1823static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
1824	.rev_offs	= 0x0000,
1825	.sysc_offs	= 0x0010,
1826	.syss_offs	= 0x0014,
1827	.sysc_flags	= (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
1828			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1829	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1830			   SIDLE_SMART_WKUP),
1831	.sysc_fields	= &omap_hwmod_sysc_type1,
1832};
1833
1834static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
1835	.name		= "wd_timer",
1836	.sysc		= &dra7xx_wd_timer_sysc,
1837	.pre_shutdown	= &omap2_wd_timer_disable,
1838	.reset		= &omap2_wd_timer_reset,
1839};
1840
1841/* wd_timer2 */
1842static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
1843	.name		= "wd_timer2",
1844	.class		= &dra7xx_wd_timer_hwmod_class,
1845	.clkdm_name	= "wkupaon_clkdm",
1846	.main_clk	= "sys_32k_ck",
1847	.prcm = {
1848		.omap4 = {
1849			.clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
1850			.context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
1851			.modulemode   = MODULEMODE_SWCTRL,
1852		},
1853	},
1854};
1855
1856
1857/*
1858 * Interfaces
1859 */
1860
1861/* l3_main_1 -> dmm */
1862static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
1863	.master		= &dra7xx_l3_main_1_hwmod,
1864	.slave		= &dra7xx_dmm_hwmod,
1865	.clk		= "l3_iclk_div",
1866	.user		= OCP_USER_SDMA,
1867};
1868
1869/* l3_main_2 -> l3_instr */
1870static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
1871	.master		= &dra7xx_l3_main_2_hwmod,
1872	.slave		= &dra7xx_l3_instr_hwmod,
1873	.clk		= "l3_iclk_div",
1874	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1875};
1876
1877/* l4_cfg -> l3_main_1 */
1878static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
1879	.master		= &dra7xx_l4_cfg_hwmod,
1880	.slave		= &dra7xx_l3_main_1_hwmod,
1881	.clk		= "l3_iclk_div",
1882	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1883};
1884
1885/* mpu -> l3_main_1 */
1886static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
1887	.master		= &dra7xx_mpu_hwmod,
1888	.slave		= &dra7xx_l3_main_1_hwmod,
1889	.clk		= "l3_iclk_div",
1890	.user		= OCP_USER_MPU,
1891};
1892
1893/* l3_main_1 -> l3_main_2 */
1894static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
1895	.master		= &dra7xx_l3_main_1_hwmod,
1896	.slave		= &dra7xx_l3_main_2_hwmod,
1897	.clk		= "l3_iclk_div",
1898	.user		= OCP_USER_MPU,
1899};
1900
1901/* l4_cfg -> l3_main_2 */
1902static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
1903	.master		= &dra7xx_l4_cfg_hwmod,
1904	.slave		= &dra7xx_l3_main_2_hwmod,
1905	.clk		= "l3_iclk_div",
1906	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1907};
1908
1909/* l3_main_1 -> l4_cfg */
1910static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
1911	.master		= &dra7xx_l3_main_1_hwmod,
1912	.slave		= &dra7xx_l4_cfg_hwmod,
1913	.clk		= "l3_iclk_div",
1914	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1915};
1916
1917/* l3_main_1 -> l4_per1 */
1918static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
1919	.master		= &dra7xx_l3_main_1_hwmod,
1920	.slave		= &dra7xx_l4_per1_hwmod,
1921	.clk		= "l3_iclk_div",
1922	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1923};
1924
1925/* l3_main_1 -> l4_per2 */
1926static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
1927	.master		= &dra7xx_l3_main_1_hwmod,
1928	.slave		= &dra7xx_l4_per2_hwmod,
1929	.clk		= "l3_iclk_div",
1930	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1931};
1932
1933/* l3_main_1 -> l4_per3 */
1934static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
1935	.master		= &dra7xx_l3_main_1_hwmod,
1936	.slave		= &dra7xx_l4_per3_hwmod,
1937	.clk		= "l3_iclk_div",
1938	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1939};
1940
1941/* l3_main_1 -> l4_wkup */
1942static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
1943	.master		= &dra7xx_l3_main_1_hwmod,
1944	.slave		= &dra7xx_l4_wkup_hwmod,
1945	.clk		= "wkupaon_iclk_mux",
1946	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1947};
1948
1949/* l4_per2 -> atl */
1950static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
1951	.master		= &dra7xx_l4_per2_hwmod,
1952	.slave		= &dra7xx_atl_hwmod,
1953	.clk		= "l3_iclk_div",
1954	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1955};
1956
1957/* l3_main_1 -> bb2d */
1958static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
1959	.master		= &dra7xx_l3_main_1_hwmod,
1960	.slave		= &dra7xx_bb2d_hwmod,
1961	.clk		= "l3_iclk_div",
1962	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1963};
1964
1965/* l4_wkup -> counter_32k */
1966static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
1967	.master		= &dra7xx_l4_wkup_hwmod,
1968	.slave		= &dra7xx_counter_32k_hwmod,
1969	.clk		= "wkupaon_iclk_mux",
1970	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1971};
1972
1973/* l4_wkup -> ctrl_module_wkup */
1974static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
1975	.master		= &dra7xx_l4_wkup_hwmod,
1976	.slave		= &dra7xx_ctrl_module_wkup_hwmod,
1977	.clk		= "wkupaon_iclk_mux",
1978	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1979};
1980
1981/* l4_wkup -> dcan1 */
1982static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
1983	.master		= &dra7xx_l4_wkup_hwmod,
1984	.slave		= &dra7xx_dcan1_hwmod,
1985	.clk		= "wkupaon_iclk_mux",
1986	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1987};
1988
1989/* l4_per2 -> dcan2 */
1990static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
1991	.master		= &dra7xx_l4_per2_hwmod,
1992	.slave		= &dra7xx_dcan2_hwmod,
1993	.clk		= "l3_iclk_div",
1994	.user		= OCP_USER_MPU | OCP_USER_SDMA,
1995};
1996
 
 
 
 
 
 
 
 
 
1997/* l4_cfg -> dma_system */
1998static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
1999	.master		= &dra7xx_l4_cfg_hwmod,
2000	.slave		= &dra7xx_dma_system_hwmod,
2001	.clk		= "l3_iclk_div",
 
2002	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2003};
2004
2005/* l3_main_1 -> tpcc */
2006static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
2007	.master		= &dra7xx_l3_main_1_hwmod,
2008	.slave		= &dra7xx_tpcc_hwmod,
2009	.clk		= "l3_iclk_div",
2010	.user		= OCP_USER_MPU,
2011};
2012
2013/* l3_main_1 -> tptc0 */
2014static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0 = {
2015	.master		= &dra7xx_l3_main_1_hwmod,
2016	.slave		= &dra7xx_tptc0_hwmod,
2017	.clk		= "l3_iclk_div",
2018	.user		= OCP_USER_MPU,
2019};
2020
2021/* l3_main_1 -> tptc1 */
2022static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1 = {
2023	.master		= &dra7xx_l3_main_1_hwmod,
2024	.slave		= &dra7xx_tptc1_hwmod,
2025	.clk		= "l3_iclk_div",
2026	.user		= OCP_USER_MPU,
2027};
2028
2029/* l3_main_1 -> dss */
2030static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
2031	.master		= &dra7xx_l3_main_1_hwmod,
2032	.slave		= &dra7xx_dss_hwmod,
2033	.clk		= "l3_iclk_div",
 
2034	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2035};
2036
 
 
 
 
 
 
 
 
 
2037/* l3_main_1 -> dispc */
2038static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
2039	.master		= &dra7xx_l3_main_1_hwmod,
2040	.slave		= &dra7xx_dss_dispc_hwmod,
2041	.clk		= "l3_iclk_div",
 
2042	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2043};
2044
 
 
 
 
 
 
 
 
 
 
2045/* l3_main_1 -> dispc */
2046static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2047	.master		= &dra7xx_l3_main_1_hwmod,
2048	.slave		= &dra7xx_dss_hdmi_hwmod,
2049	.clk		= "l3_iclk_div",
 
2050	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2051};
2052
2053/* l3_main_1 -> aes1 */
2054static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1 = {
2055	.master		= &dra7xx_l3_main_1_hwmod,
2056	.slave		= &dra7xx_aes1_hwmod,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2057	.clk		= "l3_iclk_div",
2058	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2059};
2060
2061/* l3_main_1 -> aes2 */
2062static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2 = {
2063	.master		= &dra7xx_l3_main_1_hwmod,
2064	.slave		= &dra7xx_aes2_hwmod,
2065	.clk		= "l3_iclk_div",
2066	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2067};
2068
2069/* l3_main_1 -> sha0 */
2070static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0 = {
2071	.master		= &dra7xx_l3_main_1_hwmod,
2072	.slave		= &dra7xx_sha0_hwmod,
2073	.clk		= "l3_iclk_div",
2074	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2075};
2076
2077/* l4_per1 -> elm */
2078static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
2079	.master		= &dra7xx_l4_per1_hwmod,
2080	.slave		= &dra7xx_elm_hwmod,
2081	.clk		= "l3_iclk_div",
2082	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2083};
2084
 
 
 
 
 
 
 
 
 
2085/* l3_main_1 -> gpmc */
2086static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
2087	.master		= &dra7xx_l3_main_1_hwmod,
2088	.slave		= &dra7xx_gpmc_hwmod,
2089	.clk		= "l3_iclk_div",
 
2090	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2091};
2092
 
 
 
 
 
 
 
 
 
2093/* l4_per1 -> hdq1w */
2094static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
2095	.master		= &dra7xx_l4_per1_hwmod,
2096	.slave		= &dra7xx_hdq1w_hwmod,
2097	.clk		= "l3_iclk_div",
 
2098	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2099};
2100
2101/* l4_cfg -> mailbox1 */
2102static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
2103	.master		= &dra7xx_l4_cfg_hwmod,
2104	.slave		= &dra7xx_mailbox1_hwmod,
2105	.clk		= "l3_iclk_div",
2106	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2107};
2108
2109/* l4_per3 -> mailbox2 */
2110static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
2111	.master		= &dra7xx_l4_per3_hwmod,
2112	.slave		= &dra7xx_mailbox2_hwmod,
2113	.clk		= "l3_iclk_div",
2114	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2115};
2116
2117/* l4_per3 -> mailbox3 */
2118static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
2119	.master		= &dra7xx_l4_per3_hwmod,
2120	.slave		= &dra7xx_mailbox3_hwmod,
2121	.clk		= "l3_iclk_div",
2122	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2123};
2124
2125/* l4_per3 -> mailbox4 */
2126static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
2127	.master		= &dra7xx_l4_per3_hwmod,
2128	.slave		= &dra7xx_mailbox4_hwmod,
2129	.clk		= "l3_iclk_div",
2130	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2131};
2132
2133/* l4_per3 -> mailbox5 */
2134static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
2135	.master		= &dra7xx_l4_per3_hwmod,
2136	.slave		= &dra7xx_mailbox5_hwmod,
2137	.clk		= "l3_iclk_div",
2138	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2139};
2140
2141/* l4_per3 -> mailbox6 */
2142static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
2143	.master		= &dra7xx_l4_per3_hwmod,
2144	.slave		= &dra7xx_mailbox6_hwmod,
2145	.clk		= "l3_iclk_div",
2146	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2147};
2148
2149/* l4_per3 -> mailbox7 */
2150static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
2151	.master		= &dra7xx_l4_per3_hwmod,
2152	.slave		= &dra7xx_mailbox7_hwmod,
2153	.clk		= "l3_iclk_div",
2154	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2155};
2156
2157/* l4_per3 -> mailbox8 */
2158static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
2159	.master		= &dra7xx_l4_per3_hwmod,
2160	.slave		= &dra7xx_mailbox8_hwmod,
2161	.clk		= "l3_iclk_div",
2162	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2163};
2164
2165/* l4_per3 -> mailbox9 */
2166static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
2167	.master		= &dra7xx_l4_per3_hwmod,
2168	.slave		= &dra7xx_mailbox9_hwmod,
2169	.clk		= "l3_iclk_div",
2170	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2171};
2172
2173/* l4_per3 -> mailbox10 */
2174static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
2175	.master		= &dra7xx_l4_per3_hwmod,
2176	.slave		= &dra7xx_mailbox10_hwmod,
2177	.clk		= "l3_iclk_div",
2178	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2179};
2180
2181/* l4_per3 -> mailbox11 */
2182static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
2183	.master		= &dra7xx_l4_per3_hwmod,
2184	.slave		= &dra7xx_mailbox11_hwmod,
2185	.clk		= "l3_iclk_div",
2186	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2187};
2188
2189/* l4_per3 -> mailbox12 */
2190static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
2191	.master		= &dra7xx_l4_per3_hwmod,
2192	.slave		= &dra7xx_mailbox12_hwmod,
2193	.clk		= "l3_iclk_div",
2194	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2195};
2196
2197/* l4_per3 -> mailbox13 */
2198static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
2199	.master		= &dra7xx_l4_per3_hwmod,
2200	.slave		= &dra7xx_mailbox13_hwmod,
2201	.clk		= "l3_iclk_div",
2202	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2203};
2204
2205/* l4_cfg -> mpu */
2206static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
2207	.master		= &dra7xx_l4_cfg_hwmod,
2208	.slave		= &dra7xx_mpu_hwmod,
2209	.clk		= "l3_iclk_div",
2210	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2211};
2212
 
 
 
 
 
 
 
 
 
2213/* l4_cfg -> ocp2scp1 */
2214static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
2215	.master		= &dra7xx_l4_cfg_hwmod,
2216	.slave		= &dra7xx_ocp2scp1_hwmod,
2217	.clk		= "l4_root_clk_div",
 
2218	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2219};
2220
2221/* l4_cfg -> ocp2scp3 */
2222static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
2223	.master		= &dra7xx_l4_cfg_hwmod,
2224	.slave		= &dra7xx_ocp2scp3_hwmod,
2225	.clk		= "l4_root_clk_div",
2226	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2227};
2228
2229/* l3_main_1 -> pciess1 */
2230static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
2231	.master		= &dra7xx_l3_main_1_hwmod,
2232	.slave		= &dra7xx_pciess1_hwmod,
2233	.clk		= "l3_iclk_div",
2234	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2235};
2236
2237/* l4_cfg -> pciess1 */
2238static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
2239	.master		= &dra7xx_l4_cfg_hwmod,
2240	.slave		= &dra7xx_pciess1_hwmod,
2241	.clk		= "l4_root_clk_div",
2242	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2243};
2244
2245/* l3_main_1 -> pciess2 */
2246static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
2247	.master		= &dra7xx_l3_main_1_hwmod,
2248	.slave		= &dra7xx_pciess2_hwmod,
2249	.clk		= "l3_iclk_div",
2250	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2251};
2252
2253/* l4_cfg -> pciess2 */
2254static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
2255	.master		= &dra7xx_l4_cfg_hwmod,
2256	.slave		= &dra7xx_pciess2_hwmod,
2257	.clk		= "l4_root_clk_div",
2258	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2259};
2260
2261/* l3_main_1 -> qspi */
2262static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
2263	.master		= &dra7xx_l3_main_1_hwmod,
2264	.slave		= &dra7xx_qspi_hwmod,
2265	.clk		= "l3_iclk_div",
 
2266	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2267};
2268
2269/* l4_per3 -> rtcss */
2270static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
2271	.master		= &dra7xx_l4_per3_hwmod,
2272	.slave		= &dra7xx_rtcss_hwmod,
2273	.clk		= "l4_root_clk_div",
2274	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 
 
2275};
2276
2277/* l4_cfg -> sata */
2278static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
2279	.master		= &dra7xx_l4_cfg_hwmod,
2280	.slave		= &dra7xx_sata_hwmod,
2281	.clk		= "l3_iclk_div",
 
2282	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2283};
2284
 
 
 
 
 
 
 
 
 
2285/* l4_cfg -> smartreflex_core */
2286static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
2287	.master		= &dra7xx_l4_cfg_hwmod,
2288	.slave		= &dra7xx_smartreflex_core_hwmod,
2289	.clk		= "l4_root_clk_div",
 
2290	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2291};
2292
 
 
 
 
 
 
 
 
 
2293/* l4_cfg -> smartreflex_mpu */
2294static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
2295	.master		= &dra7xx_l4_cfg_hwmod,
2296	.slave		= &dra7xx_smartreflex_mpu_hwmod,
2297	.clk		= "l4_root_clk_div",
 
2298	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2299};
2300
 
 
 
 
 
 
 
 
 
2301/* l4_cfg -> spinlock */
2302static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
2303	.master		= &dra7xx_l4_cfg_hwmod,
2304	.slave		= &dra7xx_spinlock_hwmod,
2305	.clk		= "l3_iclk_div",
 
2306	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2307};
2308
2309/* l4_wkup -> timer1 */
2310static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
2311	.master		= &dra7xx_l4_wkup_hwmod,
2312	.slave		= &dra7xx_timer1_hwmod,
2313	.clk		= "wkupaon_iclk_mux",
2314	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2315};
2316
2317/* l4_per1 -> timer2 */
2318static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
2319	.master		= &dra7xx_l4_per1_hwmod,
2320	.slave		= &dra7xx_timer2_hwmod,
2321	.clk		= "l3_iclk_div",
2322	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2323};
2324
2325/* l4_per1 -> timer3 */
2326static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
2327	.master		= &dra7xx_l4_per1_hwmod,
2328	.slave		= &dra7xx_timer3_hwmod,
2329	.clk		= "l3_iclk_div",
2330	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2331};
2332
2333/* l4_per1 -> timer4 */
2334static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
2335	.master		= &dra7xx_l4_per1_hwmod,
2336	.slave		= &dra7xx_timer4_hwmod,
2337	.clk		= "l3_iclk_div",
2338	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2339};
2340
2341/* l4_per3 -> timer5 */
2342static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
2343	.master		= &dra7xx_l4_per3_hwmod,
2344	.slave		= &dra7xx_timer5_hwmod,
2345	.clk		= "l3_iclk_div",
2346	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2347};
2348
2349/* l4_per3 -> timer6 */
2350static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
2351	.master		= &dra7xx_l4_per3_hwmod,
2352	.slave		= &dra7xx_timer6_hwmod,
2353	.clk		= "l3_iclk_div",
2354	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2355};
2356
2357/* l4_per3 -> timer7 */
2358static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
2359	.master		= &dra7xx_l4_per3_hwmod,
2360	.slave		= &dra7xx_timer7_hwmod,
2361	.clk		= "l3_iclk_div",
2362	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2363};
2364
2365/* l4_per3 -> timer8 */
2366static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
2367	.master		= &dra7xx_l4_per3_hwmod,
2368	.slave		= &dra7xx_timer8_hwmod,
2369	.clk		= "l3_iclk_div",
2370	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2371};
2372
2373/* l4_per1 -> timer9 */
2374static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
2375	.master		= &dra7xx_l4_per1_hwmod,
2376	.slave		= &dra7xx_timer9_hwmod,
2377	.clk		= "l3_iclk_div",
2378	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2379};
2380
2381/* l4_per1 -> timer10 */
2382static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
2383	.master		= &dra7xx_l4_per1_hwmod,
2384	.slave		= &dra7xx_timer10_hwmod,
2385	.clk		= "l3_iclk_div",
2386	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2387};
2388
2389/* l4_per1 -> timer11 */
2390static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
2391	.master		= &dra7xx_l4_per1_hwmod,
2392	.slave		= &dra7xx_timer11_hwmod,
2393	.clk		= "l3_iclk_div",
2394	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2395};
2396
2397/* l4_wkup -> timer12 */
2398static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12 = {
2399	.master		= &dra7xx_l4_wkup_hwmod,
2400	.slave		= &dra7xx_timer12_hwmod,
2401	.clk		= "wkupaon_iclk_mux",
2402	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2403};
2404
2405/* l4_per3 -> timer13 */
2406static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
2407	.master		= &dra7xx_l4_per3_hwmod,
2408	.slave		= &dra7xx_timer13_hwmod,
2409	.clk		= "l3_iclk_div",
2410	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2411};
2412
2413/* l4_per3 -> timer14 */
2414static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
2415	.master		= &dra7xx_l4_per3_hwmod,
2416	.slave		= &dra7xx_timer14_hwmod,
2417	.clk		= "l3_iclk_div",
2418	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2419};
2420
2421/* l4_per3 -> timer15 */
2422static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
2423	.master		= &dra7xx_l4_per3_hwmod,
2424	.slave		= &dra7xx_timer15_hwmod,
2425	.clk		= "l3_iclk_div",
2426	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2427};
2428
2429/* l4_per3 -> timer16 */
2430static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
2431	.master		= &dra7xx_l4_per3_hwmod,
2432	.slave		= &dra7xx_timer16_hwmod,
2433	.clk		= "l3_iclk_div",
2434	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2435};
2436
2437/* l4_per1 -> des */
2438static struct omap_hwmod_ocp_if dra7xx_l4_per1__des = {
2439	.master		= &dra7xx_l4_per1_hwmod,
2440	.slave		= &dra7xx_des_hwmod,
2441	.clk		= "l3_iclk_div",
2442	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2443};
2444
2445/* l4_per1 -> rng */
2446static struct omap_hwmod_ocp_if dra7xx_l4_per1__rng = {
2447	.master         = &dra7xx_l4_per1_hwmod,
2448	.slave          = &dra7xx_rng_hwmod,
2449	.user           = OCP_USER_MPU,
2450};
2451
2452/* l4_per3 -> usb_otg_ss1 */
2453static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
2454	.master		= &dra7xx_l4_per3_hwmod,
2455	.slave		= &dra7xx_usb_otg_ss1_hwmod,
2456	.clk		= "dpll_core_h13x2_ck",
2457	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2458};
2459
2460/* l4_per3 -> usb_otg_ss2 */
2461static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
2462	.master		= &dra7xx_l4_per3_hwmod,
2463	.slave		= &dra7xx_usb_otg_ss2_hwmod,
2464	.clk		= "dpll_core_h13x2_ck",
2465	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2466};
2467
2468/* l4_per3 -> usb_otg_ss3 */
2469static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
2470	.master		= &dra7xx_l4_per3_hwmod,
2471	.slave		= &dra7xx_usb_otg_ss3_hwmod,
2472	.clk		= "dpll_core_h13x2_ck",
2473	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2474};
2475
2476/* l4_per3 -> usb_otg_ss4 */
2477static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
2478	.master		= &dra7xx_l4_per3_hwmod,
2479	.slave		= &dra7xx_usb_otg_ss4_hwmod,
2480	.clk		= "dpll_core_h13x2_ck",
2481	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2482};
2483
2484/* l3_main_1 -> vcp1 */
2485static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
2486	.master		= &dra7xx_l3_main_1_hwmod,
2487	.slave		= &dra7xx_vcp1_hwmod,
2488	.clk		= "l3_iclk_div",
2489	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2490};
2491
2492/* l4_per2 -> vcp1 */
2493static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
2494	.master		= &dra7xx_l4_per2_hwmod,
2495	.slave		= &dra7xx_vcp1_hwmod,
2496	.clk		= "l3_iclk_div",
2497	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2498};
2499
2500/* l3_main_1 -> vcp2 */
2501static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
2502	.master		= &dra7xx_l3_main_1_hwmod,
2503	.slave		= &dra7xx_vcp2_hwmod,
2504	.clk		= "l3_iclk_div",
2505	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2506};
2507
2508/* l4_per2 -> vcp2 */
2509static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
2510	.master		= &dra7xx_l4_per2_hwmod,
2511	.slave		= &dra7xx_vcp2_hwmod,
2512	.clk		= "l3_iclk_div",
2513	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2514};
2515
2516/* l4_wkup -> wd_timer2 */
2517static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
2518	.master		= &dra7xx_l4_wkup_hwmod,
2519	.slave		= &dra7xx_wd_timer2_hwmod,
2520	.clk		= "wkupaon_iclk_mux",
2521	.user		= OCP_USER_MPU | OCP_USER_SDMA,
2522};
2523
2524/* l4_per2 -> epwmss0 */
2525static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
2526	.master		= &dra7xx_l4_per2_hwmod,
2527	.slave		= &dra7xx_epwmss0_hwmod,
2528	.clk		= "l4_root_clk_div",
2529	.user		= OCP_USER_MPU,
2530};
2531
2532/* l4_per2 -> epwmss1 */
2533static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
2534	.master		= &dra7xx_l4_per2_hwmod,
2535	.slave		= &dra7xx_epwmss1_hwmod,
2536	.clk		= "l4_root_clk_div",
2537	.user		= OCP_USER_MPU,
2538};
2539
2540/* l4_per2 -> epwmss2 */
2541static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
2542	.master		= &dra7xx_l4_per2_hwmod,
2543	.slave		= &dra7xx_epwmss2_hwmod,
2544	.clk		= "l4_root_clk_div",
2545	.user		= OCP_USER_MPU,
2546};
2547
2548static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
2549	&dra7xx_l3_main_1__dmm,
2550	&dra7xx_l3_main_2__l3_instr,
2551	&dra7xx_l4_cfg__l3_main_1,
2552	&dra7xx_mpu__l3_main_1,
2553	&dra7xx_l3_main_1__l3_main_2,
2554	&dra7xx_l4_cfg__l3_main_2,
2555	&dra7xx_l3_main_1__l4_cfg,
2556	&dra7xx_l3_main_1__l4_per1,
2557	&dra7xx_l3_main_1__l4_per2,
2558	&dra7xx_l3_main_1__l4_per3,
2559	&dra7xx_l3_main_1__l4_wkup,
2560	&dra7xx_l4_per2__atl,
2561	&dra7xx_l3_main_1__bb2d,
2562	&dra7xx_l4_wkup__counter_32k,
2563	&dra7xx_l4_wkup__ctrl_module_wkup,
2564	&dra7xx_l4_wkup__dcan1,
2565	&dra7xx_l4_per2__dcan2,
2566	&dra7xx_l4_cfg__dma_system,
2567	&dra7xx_l3_main_1__tpcc,
2568	&dra7xx_l3_main_1__tptc0,
2569	&dra7xx_l3_main_1__tptc1,
2570	&dra7xx_l3_main_1__dss,
2571	&dra7xx_l3_main_1__dispc,
2572	&dra7xx_l3_main_1__hdmi,
2573	&dra7xx_l3_main_1__aes1,
2574	&dra7xx_l3_main_1__aes2,
2575	&dra7xx_l3_main_1__sha0,
2576	&dra7xx_l4_per1__elm,
 
 
 
 
 
 
 
 
2577	&dra7xx_l3_main_1__gpmc,
2578	&dra7xx_l4_per1__hdq1w,
2579	&dra7xx_l4_cfg__mailbox1,
2580	&dra7xx_l4_per3__mailbox2,
2581	&dra7xx_l4_per3__mailbox3,
2582	&dra7xx_l4_per3__mailbox4,
2583	&dra7xx_l4_per3__mailbox5,
2584	&dra7xx_l4_per3__mailbox6,
2585	&dra7xx_l4_per3__mailbox7,
2586	&dra7xx_l4_per3__mailbox8,
2587	&dra7xx_l4_per3__mailbox9,
2588	&dra7xx_l4_per3__mailbox10,
2589	&dra7xx_l4_per3__mailbox11,
2590	&dra7xx_l4_per3__mailbox12,
2591	&dra7xx_l4_per3__mailbox13,
2592	&dra7xx_l4_cfg__mpu,
2593	&dra7xx_l4_cfg__ocp2scp1,
2594	&dra7xx_l4_cfg__ocp2scp3,
2595	&dra7xx_l3_main_1__pciess1,
2596	&dra7xx_l4_cfg__pciess1,
2597	&dra7xx_l3_main_1__pciess2,
2598	&dra7xx_l4_cfg__pciess2,
2599	&dra7xx_l3_main_1__qspi,
2600	&dra7xx_l4_cfg__sata,
2601	&dra7xx_l4_cfg__smartreflex_core,
2602	&dra7xx_l4_cfg__smartreflex_mpu,
2603	&dra7xx_l4_cfg__spinlock,
2604	&dra7xx_l4_wkup__timer1,
2605	&dra7xx_l4_per1__timer2,
2606	&dra7xx_l4_per1__timer3,
2607	&dra7xx_l4_per1__timer4,
2608	&dra7xx_l4_per3__timer5,
2609	&dra7xx_l4_per3__timer6,
2610	&dra7xx_l4_per3__timer7,
2611	&dra7xx_l4_per3__timer8,
2612	&dra7xx_l4_per1__timer9,
2613	&dra7xx_l4_per1__timer10,
2614	&dra7xx_l4_per1__timer11,
2615	&dra7xx_l4_per3__timer13,
2616	&dra7xx_l4_per3__timer14,
2617	&dra7xx_l4_per3__timer15,
2618	&dra7xx_l4_per3__timer16,
2619	&dra7xx_l4_per1__des,
 
2620	&dra7xx_l4_per3__usb_otg_ss1,
2621	&dra7xx_l4_per3__usb_otg_ss2,
2622	&dra7xx_l4_per3__usb_otg_ss3,
 
2623	&dra7xx_l3_main_1__vcp1,
2624	&dra7xx_l4_per2__vcp1,
2625	&dra7xx_l3_main_1__vcp2,
2626	&dra7xx_l4_per2__vcp2,
2627	&dra7xx_l4_wkup__wd_timer2,
2628	&dra7xx_l4_per2__epwmss0,
2629	&dra7xx_l4_per2__epwmss1,
2630	&dra7xx_l4_per2__epwmss2,
2631	NULL,
2632};
2633
2634/* GP-only hwmod links */
2635static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
2636	&dra7xx_l4_wkup__timer12,
2637	&dra7xx_l4_per1__rng,
2638	NULL,
2639};
2640
2641/* SoC variant specific hwmod links */
2642static struct omap_hwmod_ocp_if *dra76x_hwmod_ocp_ifs[] __initdata = {
2643	&dra7xx_l4_per3__usb_otg_ss4,
2644	NULL,
2645};
2646
2647static struct omap_hwmod_ocp_if *acd_76x_hwmod_ocp_ifs[] __initdata = {
2648	NULL,
2649};
2650
2651static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
2652	&dra7xx_l4_per3__usb_otg_ss4,
2653	NULL,
2654};
2655
2656static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
2657	NULL,
2658};
2659
2660static struct omap_hwmod_ocp_if *rtc_hwmod_ocp_ifs[] __initdata = {
2661	&dra7xx_l4_per3__rtcss,
2662	NULL,
2663};
2664
2665int __init dra7xx_hwmod_init(void)
2666{
2667	int ret;
2668
2669	omap_hwmod_init();
2670	ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
2671
2672	if (!ret && soc_is_dra74x()) {
2673		ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
2674		if (!ret)
2675			ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
2676	} else if (!ret && soc_is_dra72x()) {
2677		ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
2678		if (!ret && !of_machine_is_compatible("ti,dra718"))
2679			ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
2680	} else if (!ret && soc_is_dra76x()) {
2681		ret = omap_hwmod_register_links(dra76x_hwmod_ocp_ifs);
2682
2683		if (!ret && soc_is_dra76x_acd()) {
2684			ret = omap_hwmod_register_links(acd_76x_hwmod_ocp_ifs);
2685		} else if (!ret && soc_is_dra76x_abz()) {
2686			ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
2687		}
2688	}
2689
2690	if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
2691		ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
2692
2693	return ret;
2694}