diff options
author | Tero Kristo <t-kristo@ti.com> | 2012-09-23 19:28:20 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-09-23 19:28:20 -0400 |
commit | 46b3af27894a3b414712bef313c4aacb605fccf7 (patch) | |
tree | 7f0e36e424c196bc9a7a14a773560d587fa3e3a8 | |
parent | ce80979aedfce937926a8dd40a1f92fd4bc2fd53 (diff) |
ARM: OMAP4: hwmod: flag hwmods/modules not supporting module level context status
On OMAP4 most modules/hwmods support module level context status. On
OMAP3 and earlier, we relied on the power domain level context status.
Identify all modules that don't support 'context_offs' by adding a
flag bit, HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT. Rest have a valid
'context_offs' populated in .prcm structure already.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
[paul@pwsan.com: add flag bit rather than overloading .context_offs;
update changelog message]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 46 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 12 |
2 files changed, 57 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index d3f045bf810a..0d9f1fe0534e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -204,6 +204,7 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = { | |||
204 | .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, | 204 | .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, |
205 | .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET, | 205 | .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET, |
206 | .lostcontext_mask = OMAP4430_LOSTMEM_AESSMEM_MASK, | 206 | .lostcontext_mask = OMAP4430_LOSTMEM_AESSMEM_MASK, |
207 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
207 | }, | 208 | }, |
208 | }, | 209 | }, |
209 | }; | 210 | }; |
@@ -260,6 +261,11 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
260 | .name = "mpu_private", | 261 | .name = "mpu_private", |
261 | .class = &omap44xx_mpu_bus_hwmod_class, | 262 | .class = &omap44xx_mpu_bus_hwmod_class, |
262 | .clkdm_name = "mpuss_clkdm", | 263 | .clkdm_name = "mpuss_clkdm", |
264 | .prcm = { | ||
265 | .omap4 = { | ||
266 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
267 | }, | ||
268 | }, | ||
263 | }; | 269 | }; |
264 | 270 | ||
265 | /* | 271 | /* |
@@ -449,6 +455,11 @@ static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = { | |||
449 | .class = &omap44xx_ctrl_module_hwmod_class, | 455 | .class = &omap44xx_ctrl_module_hwmod_class, |
450 | .clkdm_name = "l4_cfg_clkdm", | 456 | .clkdm_name = "l4_cfg_clkdm", |
451 | .mpu_irqs = omap44xx_ctrl_module_core_irqs, | 457 | .mpu_irqs = omap44xx_ctrl_module_core_irqs, |
458 | .prcm = { | ||
459 | .omap4 = { | ||
460 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
461 | }, | ||
462 | }, | ||
452 | }; | 463 | }; |
453 | 464 | ||
454 | /* ctrl_module_pad_core */ | 465 | /* ctrl_module_pad_core */ |
@@ -456,6 +467,11 @@ static struct omap_hwmod omap44xx_ctrl_module_pad_core_hwmod = { | |||
456 | .name = "ctrl_module_pad_core", | 467 | .name = "ctrl_module_pad_core", |
457 | .class = &omap44xx_ctrl_module_hwmod_class, | 468 | .class = &omap44xx_ctrl_module_hwmod_class, |
458 | .clkdm_name = "l4_cfg_clkdm", | 469 | .clkdm_name = "l4_cfg_clkdm", |
470 | .prcm = { | ||
471 | .omap4 = { | ||
472 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
473 | }, | ||
474 | }, | ||
459 | }; | 475 | }; |
460 | 476 | ||
461 | /* ctrl_module_wkup */ | 477 | /* ctrl_module_wkup */ |
@@ -463,6 +479,11 @@ static struct omap_hwmod omap44xx_ctrl_module_wkup_hwmod = { | |||
463 | .name = "ctrl_module_wkup", | 479 | .name = "ctrl_module_wkup", |
464 | .class = &omap44xx_ctrl_module_hwmod_class, | 480 | .class = &omap44xx_ctrl_module_hwmod_class, |
465 | .clkdm_name = "l4_wkup_clkdm", | 481 | .clkdm_name = "l4_wkup_clkdm", |
482 | .prcm = { | ||
483 | .omap4 = { | ||
484 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
485 | }, | ||
486 | }, | ||
466 | }; | 487 | }; |
467 | 488 | ||
468 | /* ctrl_module_pad_wkup */ | 489 | /* ctrl_module_pad_wkup */ |
@@ -470,6 +491,11 @@ static struct omap_hwmod omap44xx_ctrl_module_pad_wkup_hwmod = { | |||
470 | .name = "ctrl_module_pad_wkup", | 491 | .name = "ctrl_module_pad_wkup", |
471 | .class = &omap44xx_ctrl_module_hwmod_class, | 492 | .class = &omap44xx_ctrl_module_hwmod_class, |
472 | .clkdm_name = "l4_wkup_clkdm", | 493 | .clkdm_name = "l4_wkup_clkdm", |
494 | .prcm = { | ||
495 | .omap4 = { | ||
496 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
497 | }, | ||
498 | }, | ||
473 | }; | 499 | }; |
474 | 500 | ||
475 | /* | 501 | /* |
@@ -2539,18 +2565,33 @@ static struct omap_hwmod omap44xx_prcm_mpu_hwmod = { | |||
2539 | .name = "prcm_mpu", | 2565 | .name = "prcm_mpu", |
2540 | .class = &omap44xx_prcm_hwmod_class, | 2566 | .class = &omap44xx_prcm_hwmod_class, |
2541 | .clkdm_name = "l4_wkup_clkdm", | 2567 | .clkdm_name = "l4_wkup_clkdm", |
2568 | .prcm = { | ||
2569 | .omap4 = { | ||
2570 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2571 | }, | ||
2572 | }, | ||
2542 | }; | 2573 | }; |
2543 | 2574 | ||
2544 | /* cm_core_aon */ | 2575 | /* cm_core_aon */ |
2545 | static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { | 2576 | static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { |
2546 | .name = "cm_core_aon", | 2577 | .name = "cm_core_aon", |
2547 | .class = &omap44xx_prcm_hwmod_class, | 2578 | .class = &omap44xx_prcm_hwmod_class, |
2579 | .prcm = { | ||
2580 | .omap4 = { | ||
2581 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2582 | }, | ||
2583 | }, | ||
2548 | }; | 2584 | }; |
2549 | 2585 | ||
2550 | /* cm_core */ | 2586 | /* cm_core */ |
2551 | static struct omap_hwmod omap44xx_cm_core_hwmod = { | 2587 | static struct omap_hwmod omap44xx_cm_core_hwmod = { |
2552 | .name = "cm_core", | 2588 | .name = "cm_core", |
2553 | .class = &omap44xx_prcm_hwmod_class, | 2589 | .class = &omap44xx_prcm_hwmod_class, |
2590 | .prcm = { | ||
2591 | .omap4 = { | ||
2592 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2593 | }, | ||
2594 | }, | ||
2554 | }; | 2595 | }; |
2555 | 2596 | ||
2556 | /* prm */ | 2597 | /* prm */ |
@@ -2586,6 +2627,11 @@ static struct omap_hwmod omap44xx_scrm_hwmod = { | |||
2586 | .name = "scrm", | 2627 | .name = "scrm", |
2587 | .class = &omap44xx_scrm_hwmod_class, | 2628 | .class = &omap44xx_scrm_hwmod_class, |
2588 | .clkdm_name = "l4_wkup_clkdm", | 2629 | .clkdm_name = "l4_wkup_clkdm", |
2630 | .prcm = { | ||
2631 | .omap4 = { | ||
2632 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2633 | }, | ||
2634 | }, | ||
2589 | }; | 2635 | }; |
2590 | 2636 | ||
2591 | /* | 2637 | /* |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 86b6a4e70824..09e14ce3ec57 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * omap_hwmod macros, structures | 2 | * omap_hwmod macros, structures |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Copyright (C) 2011 Texas Instruments, Inc. | 5 | * Copyright (C) 2012 Texas Instruments, Inc. |
6 | * Paul Walmsley | 6 | * Paul Walmsley |
7 | * | 7 | * |
8 | * Created in collaboration with (alphabetical order): Benoît Cousson, | 8 | * Created in collaboration with (alphabetical order): Benoît Cousson, |
@@ -384,6 +384,14 @@ struct omap_hwmod_omap2_prcm { | |||
384 | u8 idlest_stdby_bit; | 384 | u8 idlest_stdby_bit; |
385 | }; | 385 | }; |
386 | 386 | ||
387 | /* | ||
388 | * Possible values for struct omap_hwmod_omap4_prcm.flags | ||
389 | * | ||
390 | * HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM | ||
391 | * module-level context loss register associated with them; this | ||
392 | * flag bit should be set in those cases | ||
393 | */ | ||
394 | #define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0) | ||
387 | 395 | ||
388 | /** | 396 | /** |
389 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data | 397 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data |
@@ -392,6 +400,7 @@ struct omap_hwmod_omap2_prcm { | |||
392 | * @lostcontext_mask: bitmask for selecting bits from RM_*_CONTEXT register | 400 | * @lostcontext_mask: bitmask for selecting bits from RM_*_CONTEXT register |
393 | * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM | 401 | * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM |
394 | * @submodule_wkdep_bit: bit shift of the WKDEP range | 402 | * @submodule_wkdep_bit: bit shift of the WKDEP range |
403 | * @flags: PRCM register capabilities for this IP block | ||
395 | * | 404 | * |
396 | * If @lostcontext_mask is not defined, context loss check code uses | 405 | * If @lostcontext_mask is not defined, context loss check code uses |
397 | * whole register without masking. @lostcontext_mask should only be | 406 | * whole register without masking. @lostcontext_mask should only be |
@@ -406,6 +415,7 @@ struct omap_hwmod_omap4_prcm { | |||
406 | u32 lostcontext_mask; | 415 | u32 lostcontext_mask; |
407 | u8 submodule_wkdep_bit; | 416 | u8 submodule_wkdep_bit; |
408 | u8 modulemode; | 417 | u8 modulemode; |
418 | u8 flags; | ||
409 | }; | 419 | }; |
410 | 420 | ||
411 | 421 | ||