clockdomains44xx_data.c 18.6 KB
Newer Older
1 2 3
/*
 * OMAP4 Clock domains framework
 *
4 5
 * Copyright (C) 2009-2011 Texas Instruments, Inc.
 * Copyright (C) 2009-2011 Nokia Corporation
6 7 8
 *
 * Abhijit Pagare (abhijitpagare@ti.com)
 * Benoit Cousson (b-cousson@ti.com)
9
 * Paul Walmsley (paul@pwsan.com)
10 11 12 13 14 15 16 17 18 19 20 21
 *
 * This file is automatically generated from the OMAP hardware databases.
 * We respectfully ask that any modifications to this file be coordinated
 * with the public linux-omap@vger.kernel.org mailing list and the
 * authors above to ensure that the autogeneration scripts are kept
 * up-to-date with the file contents.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

22 23
#include <linux/kernel.h>
#include <linux/io.h>
24

25
#include "clockdomain.h"
26 27
#include "cm1_44xx.h"
#include "cm2_44xx.h"
28

29
#include "cm-regbits-44xx.h"
30
#include "prm44xx.h"
31
#include "prcm44xx.h"
32 33
#include "prcm_mpu44xx.h"

34 35
/* Static Dependencies for OMAP4 Clock Domains */

36
static struct clkdm_dep d2d_wkup_sleep_deps[] = {
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
	{
		.clkdm_name	 = "abe_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "ivahd_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_1_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_2_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
54
		.clkdm_name	 = "l3_emif_clkdm",
55 56 57
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
58
		.clkdm_name	 = "l3_init_clkdm",
59 60 61
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
62
		.clkdm_name	 = "l4_cfg_clkdm",
63 64 65
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
66
		.clkdm_name	 = "l4_per_clkdm",
67 68
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
69 70 71 72
	{ NULL },
};

static struct clkdm_dep ducati_wkup_sleep_deps[] = {
73
	{
74
		.clkdm_name	 = "abe_clkdm",
75 76 77
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
78
		.clkdm_name	 = "ivahd_clkdm",
79 80 81
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
82
		.clkdm_name	 = "l3_1_clkdm",
83 84 85
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
86
		.clkdm_name	 = "l3_2_clkdm",
87 88 89
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
90
		.clkdm_name	 = "l3_dss_clkdm",
91 92 93
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
94
		.clkdm_name	 = "l3_emif_clkdm",
95 96 97
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
98
		.clkdm_name	 = "l3_gfx_clkdm",
99 100 101
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
102
		.clkdm_name	 = "l3_init_clkdm",
103 104 105
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
106
		.clkdm_name	 = "l4_cfg_clkdm",
107 108 109
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
110
		.clkdm_name	 = "l4_per_clkdm",
111 112 113
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
114
		.clkdm_name	 = "l4_secure_clkdm",
115 116 117
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
118
		.clkdm_name	 = "l4_wkup_clkdm",
119 120 121
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
122
		.clkdm_name	 = "tesla_clkdm",
123 124
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
125 126 127 128
	{ NULL },
};

static struct clkdm_dep iss_wkup_sleep_deps[] = {
129
	{
130
		.clkdm_name	 = "ivahd_clkdm",
131 132 133
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
134
		.clkdm_name	 = "l3_1_clkdm",
135 136 137
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
138
		.clkdm_name	 = "l3_emif_clkdm",
139 140
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
141 142 143 144
	{ NULL },
};

static struct clkdm_dep ivahd_wkup_sleep_deps[] = {
145
	{
146
		.clkdm_name	 = "l3_1_clkdm",
147 148 149
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
150
		.clkdm_name	 = "l3_emif_clkdm",
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};

static struct clkdm_dep l3_dma_wkup_sleep_deps[] = {
	{
		.clkdm_name	 = "abe_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "ducati_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "ivahd_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_1_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_dss_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_emif_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_init_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_cfg_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_per_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_secure_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_wkup_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};

static struct clkdm_dep l3_dss_wkup_sleep_deps[] = {
	{
		.clkdm_name	 = "ivahd_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_2_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_emif_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};

static struct clkdm_dep l3_gfx_wkup_sleep_deps[] = {
	{
		.clkdm_name	 = "ivahd_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_1_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_emif_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};

static struct clkdm_dep l3_init_wkup_sleep_deps[] = {
	{
		.clkdm_name	 = "abe_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "ivahd_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_emif_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_cfg_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_per_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_secure_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_wkup_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};

static struct clkdm_dep l4_secure_wkup_sleep_deps[] = {
	{
		.clkdm_name	 = "l3_1_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_emif_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_per_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};

284
static struct clkdm_dep mpu_wkup_sleep_deps[] = {
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382
	{
		.clkdm_name	 = "abe_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "ducati_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "ivahd_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_1_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_2_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_dss_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_emif_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_gfx_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_init_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_cfg_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_per_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_secure_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_wkup_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "tesla_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};

static struct clkdm_dep tesla_wkup_sleep_deps[] = {
	{
		.clkdm_name	 = "abe_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "ivahd_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_1_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_2_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_emif_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l3_init_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_cfg_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_per_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{
		.clkdm_name	 = "l4_wkup_clkdm",
		.omap_chip	 = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
	},
	{ NULL },
};
383 384 385 386

static struct clockdomain l4_cefuse_44xx_clkdm = {
	.name		  = "l4_cefuse_clkdm",
	.pwrdm		  = { .name = "cefuse_pwrdm" },
387 388 389
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CEFUSE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS,
390 391 392 393 394 395 396
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l4_cfg_44xx_clkdm = {
	.name		  = "l4_cfg_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
397 398 399
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_L4CFG_CDOFFS,
400
	.dep_bit	  = OMAP4430_L4CFG_STATDEP_SHIFT,
401 402 403 404 405 406 407
	.flags		  = CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain tesla_44xx_clkdm = {
	.name		  = "tesla_clkdm",
	.pwrdm		  = { .name = "tesla_pwrdm" },
408 409 410
	.prcm_partition	  = OMAP4430_CM1_PARTITION,
	.cm_inst	  = OMAP4430_CM1_TESLA_INST,
	.clkdm_offs	  = OMAP4430_CM1_TESLA_TESLA_CDOFFS,
411 412 413
	.dep_bit	  = OMAP4430_TESLA_STATDEP_SHIFT,
	.wkdep_srcs	  = tesla_wkup_sleep_deps,
	.sleepdep_srcs	  = tesla_wkup_sleep_deps,
414 415 416 417 418 419 420
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l3_gfx_44xx_clkdm = {
	.name		  = "l3_gfx_clkdm",
	.pwrdm		  = { .name = "gfx_pwrdm" },
421 422 423
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_GFX_INST,
	.clkdm_offs	  = OMAP4430_CM2_GFX_GFX_CDOFFS,
424 425 426
	.dep_bit	  = OMAP4430_GFX_STATDEP_SHIFT,
	.wkdep_srcs	  = l3_gfx_wkup_sleep_deps,
	.sleepdep_srcs	  = l3_gfx_wkup_sleep_deps,
427 428 429 430 431 432 433
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain ivahd_44xx_clkdm = {
	.name		  = "ivahd_clkdm",
	.pwrdm		  = { .name = "ivahd_pwrdm" },
434 435 436
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_IVAHD_INST,
	.clkdm_offs	  = OMAP4430_CM2_IVAHD_IVAHD_CDOFFS,
437 438 439
	.dep_bit	  = OMAP4430_IVAHD_STATDEP_SHIFT,
	.wkdep_srcs	  = ivahd_wkup_sleep_deps,
	.sleepdep_srcs	  = ivahd_wkup_sleep_deps,
440 441 442 443 444 445 446
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l4_secure_44xx_clkdm = {
	.name		  = "l4_secure_clkdm",
	.pwrdm		  = { .name = "l4per_pwrdm" },
447 448 449
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_L4PER_INST,
	.clkdm_offs	  = OMAP4430_CM2_L4PER_L4SEC_CDOFFS,
450 451 452
	.dep_bit	  = OMAP4430_L4SEC_STATDEP_SHIFT,
	.wkdep_srcs	  = l4_secure_wkup_sleep_deps,
	.sleepdep_srcs	  = l4_secure_wkup_sleep_deps,
453 454 455 456 457 458 459
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l4_per_44xx_clkdm = {
	.name		  = "l4_per_clkdm",
	.pwrdm		  = { .name = "l4per_pwrdm" },
460 461 462
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_L4PER_INST,
	.clkdm_offs	  = OMAP4430_CM2_L4PER_L4PER_CDOFFS,
463
	.dep_bit	  = OMAP4430_L4PER_STATDEP_SHIFT,
464 465 466 467 468 469 470
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain abe_44xx_clkdm = {
	.name		  = "abe_clkdm",
	.pwrdm		  = { .name = "abe_pwrdm" },
471 472 473
	.prcm_partition	  = OMAP4430_CM1_PARTITION,
	.cm_inst	  = OMAP4430_CM1_ABE_INST,
	.clkdm_offs	  = OMAP4430_CM1_ABE_ABE_CDOFFS,
474
	.dep_bit	  = OMAP4430_ABE_STATDEP_SHIFT,
475 476 477 478
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

479 480 481
static struct clockdomain l3_instr_44xx_clkdm = {
	.name		  = "l3_instr_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
482 483 484
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_L3INSTR_CDOFFS,
485 486 487
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

488 489 490
static struct clockdomain l3_init_44xx_clkdm = {
	.name		  = "l3_init_clkdm",
	.pwrdm		  = { .name = "l3init_pwrdm" },
491 492 493
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_L3INIT_INST,
	.clkdm_offs	  = OMAP4430_CM2_L3INIT_L3INIT_CDOFFS,
494 495 496
	.dep_bit	  = OMAP4430_L3INIT_STATDEP_SHIFT,
	.wkdep_srcs	  = l3_init_wkup_sleep_deps,
	.sleepdep_srcs	  = l3_init_wkup_sleep_deps,
497 498 499 500
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

501 502 503 504 505 506 507 508
static struct clockdomain d2d_44xx_clkdm = {
	.name		  = "d2d_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_D2D_CDOFFS,
	.wkdep_srcs	  = d2d_wkup_sleep_deps,
	.sleepdep_srcs	  = d2d_wkup_sleep_deps,
509 510 511 512 513 514 515
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain mpu0_44xx_clkdm = {
	.name		  = "mpu0_clkdm",
	.pwrdm		  = { .name = "cpu0_pwrdm" },
516 517
	.prcm_partition	  = OMAP4430_PRCM_MPU_PARTITION,
	.cm_inst	  = OMAP4430_PRCM_MPU_CPU0_INST,
518
	.clkdm_offs	  = OMAP4430_PRCM_MPU_CPU0_CPU0_CDOFFS,
519 520 521 522 523 524 525
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain mpu1_44xx_clkdm = {
	.name		  = "mpu1_clkdm",
	.pwrdm		  = { .name = "cpu1_pwrdm" },
526 527
	.prcm_partition	  = OMAP4430_PRCM_MPU_PARTITION,
	.cm_inst	  = OMAP4430_PRCM_MPU_CPU1_INST,
528
	.clkdm_offs	  = OMAP4430_PRCM_MPU_CPU1_CPU1_CDOFFS,
529 530 531 532 533 534 535
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l3_emif_44xx_clkdm = {
	.name		  = "l3_emif_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
536 537 538
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_MEMIF_CDOFFS,
539
	.dep_bit	  = OMAP4430_MEMIF_STATDEP_SHIFT,
540 541 542 543 544 545 546
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l4_ao_44xx_clkdm = {
	.name		  = "l4_ao_clkdm",
	.pwrdm		  = { .name = "always_on_core_pwrdm" },
547 548 549
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_ALWAYS_ON_INST,
	.clkdm_offs	  = OMAP4430_CM2_ALWAYS_ON_ALWON_CDOFFS,
550 551 552 553 554 555 556
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain ducati_44xx_clkdm = {
	.name		  = "ducati_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
557 558 559
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_DUCATI_CDOFFS,
560 561 562
	.dep_bit	  = OMAP4430_DUCATI_STATDEP_SHIFT,
	.wkdep_srcs	  = ducati_wkup_sleep_deps,
	.sleepdep_srcs	  = ducati_wkup_sleep_deps,
563 564 565 566
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

567
static struct clockdomain mpu_44xx_clkdm = {
568
	.name		  = "mpuss_clkdm",
569 570 571 572 573 574 575 576 577 578
	.pwrdm		  = { .name = "mpu_pwrdm" },
	.prcm_partition	  = OMAP4430_CM1_PARTITION,
	.cm_inst	  = OMAP4430_CM1_MPU_INST,
	.clkdm_offs	  = OMAP4430_CM1_MPU_MPU_CDOFFS,
	.wkdep_srcs	  = mpu_wkup_sleep_deps,
	.sleepdep_srcs	  = mpu_wkup_sleep_deps,
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

579 580 581
static struct clockdomain l3_2_44xx_clkdm = {
	.name		  = "l3_2_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
582 583 584
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_L3_2_CDOFFS,
585
	.dep_bit	  = OMAP4430_L3_2_STATDEP_SHIFT,
586 587 588 589 590 591 592
	.flags		  = CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l3_1_44xx_clkdm = {
	.name		  = "l3_1_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
593 594 595
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_L3_1_CDOFFS,
596
	.dep_bit	  = OMAP4430_L3_1_STATDEP_SHIFT,
597 598 599 600 601 602 603
	.flags		  = CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain iss_44xx_clkdm = {
	.name		  = "iss_clkdm",
	.pwrdm		  = { .name = "cam_pwrdm" },
604 605 606
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CAM_INST,
	.clkdm_offs	  = OMAP4430_CM2_CAM_CAM_CDOFFS,
607 608
	.wkdep_srcs	  = iss_wkup_sleep_deps,
	.sleepdep_srcs	  = iss_wkup_sleep_deps,
609 610 611 612 613 614 615
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l3_dss_44xx_clkdm = {
	.name		  = "l3_dss_clkdm",
	.pwrdm		  = { .name = "dss_pwrdm" },
616 617 618
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_DSS_INST,
	.clkdm_offs	  = OMAP4430_CM2_DSS_DSS_CDOFFS,
619 620 621
	.dep_bit	  = OMAP4430_DSS_STATDEP_SHIFT,
	.wkdep_srcs	  = l3_dss_wkup_sleep_deps,
	.sleepdep_srcs	  = l3_dss_wkup_sleep_deps,
622 623 624 625 626 627 628
	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l4_wkup_44xx_clkdm = {
	.name		  = "l4_wkup_clkdm",
	.pwrdm		  = { .name = "wkup_pwrdm" },
629 630 631
	.prcm_partition	  = OMAP4430_PRM_PARTITION,
	.cm_inst	  = OMAP4430_PRM_WKUP_CM_INST,
	.clkdm_offs	  = OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS,
632
	.dep_bit	  = OMAP4430_L4WKUP_STATDEP_SHIFT,
633 634 635 636 637 638 639
	.flags		  = CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain emu_sys_44xx_clkdm = {
	.name		  = "emu_sys_clkdm",
	.pwrdm		  = { .name = "emu_pwrdm" },
640 641 642
	.prcm_partition	  = OMAP4430_PRM_PARTITION,
	.cm_inst	  = OMAP4430_PRM_EMU_CM_INST,
	.clkdm_offs	  = OMAP4430_PRM_EMU_CM_EMU_CDOFFS,
643 644 645 646 647 648 649
	.flags		  = CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

static struct clockdomain l3_dma_44xx_clkdm = {
	.name		  = "l3_dma_clkdm",
	.pwrdm		  = { .name = "core_pwrdm" },
650 651 652
	.prcm_partition	  = OMAP4430_CM2_PARTITION,
	.cm_inst	  = OMAP4430_CM2_CORE_INST,
	.clkdm_offs	  = OMAP4430_CM2_CORE_SDMA_CDOFFS,
653 654
	.wkdep_srcs	  = l3_dma_wkup_sleep_deps,
	.sleepdep_srcs	  = l3_dma_wkup_sleep_deps,
655 656 657 658
	.flags		  = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

659
/* As clockdomains are added or removed above, this list must also be changed */
660 661 662 663 664 665 666 667 668 669 670
static struct clockdomain *clockdomains_omap44xx[] __initdata = {
	&l4_cefuse_44xx_clkdm,
	&l4_cfg_44xx_clkdm,
	&tesla_44xx_clkdm,
	&l3_gfx_44xx_clkdm,
	&ivahd_44xx_clkdm,
	&l4_secure_44xx_clkdm,
	&l4_per_44xx_clkdm,
	&abe_44xx_clkdm,
	&l3_instr_44xx_clkdm,
	&l3_init_44xx_clkdm,
671
	&d2d_44xx_clkdm,
672 673 674 675 676
	&mpu0_44xx_clkdm,
	&mpu1_44xx_clkdm,
	&l3_emif_44xx_clkdm,
	&l4_ao_44xx_clkdm,
	&ducati_44xx_clkdm,
677
	&mpu_44xx_clkdm,
678 679 680 681 682 683 684
	&l3_2_44xx_clkdm,
	&l3_1_44xx_clkdm,
	&iss_44xx_clkdm,
	&l3_dss_44xx_clkdm,
	&l4_wkup_44xx_clkdm,
	&emu_sys_44xx_clkdm,
	&l3_dma_44xx_clkdm,
685
	NULL
686
};
687

688 689
void __init omap44xx_clockdomains_init(void)
{
690
	clkdm_init(clockdomains_omap44xx, NULL, &omap4_clkdm_operations);
691
}