aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2012-09-23 19:28:19 -0400
committerPaul Walmsley <paul@pwsan.com>2012-09-23 19:28:19 -0400
commitce80979aedfce937926a8dd40a1f92fd4bc2fd53 (patch)
tree1f114f8e0b134322d52f8d506fac974b464d5127 /arch/arm/plat-omap
parent5b8a14be513ca1172c72ec181a5e22ec18fb7bf5 (diff)
ARM: OMAP4: hwmod data: add support for lostcontext_mask
Currently hwmod only provides the offset for the context lose register, and if we attempt to share the same register between two or more hwmods, the resulting context loss counts get wrong. Thus, we need a way to specify which bits are used for the context loss information for each. This is accomplished by adding a new field to the omap4 prcm struct, 'lostcontext_mask', which specifies a bit-mask to use for filtering the register. Mark the affected hwmods appropriately. 'l4_abe' hwmod uses the LOSTMEM_AESSMEM bit of RM_ABE_AESS_CONTEXT register, as l4_abe doesn't have its own dedicated register for this purpose. This register is shared with 'aess' hwmod, thus both hwmods must also specify which bits of the register are used for them. This patch only adds the hwmod data, but a future patch should add code support such that only the specified bits are read and cleared by the context lose counter update code. If a hwmod doesn't specify 'lostcontext_mask' (default behavior), the whole contents of the context register should be used without any filtering. Signed-off-by: Tero Kristo <t-kristo@ti.com> [paul@pwsan.com: updated to apply after conversion to use flag bit for missing module context-loss register; combined data and code patches; dropped code change due to serial driver breakage] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 6eedb366dc1..86b6a4e7082 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -389,14 +389,21 @@ struct omap_hwmod_omap2_prcm {
389 * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data 389 * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data
390 * @clkctrl_reg: PRCM address of the clock control register 390 * @clkctrl_reg: PRCM address of the clock control register
391 * @rstctrl_reg: address of the XXX_RSTCTRL register located in the PRM 391 * @rstctrl_reg: address of the XXX_RSTCTRL register located in the PRM
392 * @lostcontext_mask: bitmask for selecting bits from RM_*_CONTEXT register
392 * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM 393 * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM
393 * @submodule_wkdep_bit: bit shift of the WKDEP range 394 * @submodule_wkdep_bit: bit shift of the WKDEP range
395 *
396 * If @lostcontext_mask is not defined, context loss check code uses
397 * whole register without masking. @lostcontext_mask should only be
398 * defined in cases where @context_offs register is shared by two or
399 * more hwmods.
394 */ 400 */
395struct omap_hwmod_omap4_prcm { 401struct omap_hwmod_omap4_prcm {
396 u16 clkctrl_offs; 402 u16 clkctrl_offs;
397 u16 rstctrl_offs; 403 u16 rstctrl_offs;
398 u16 rstst_offs; 404 u16 rstst_offs;
399 u16 context_offs; 405 u16 context_offs;
406 u32 lostcontext_mask;
400 u8 submodule_wkdep_bit; 407 u8 submodule_wkdep_bit;
401 u8 modulemode; 408 u8 modulemode;
402}; 409};