aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.h
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2015-06-10 05:26:24 -0400
committerPaul Walmsley <paul@pwsan.com>2015-07-15 20:16:16 -0400
commitaaf2c0fbbbb1ec56936e726eec6c253bc4bd469f (patch)
tree831f8fcc7dac140a0db9a2e7c961e35935e4d8d1 /arch/arm/mach-omap2/omap_hwmod.h
parentb9e23f321940d2db2c9def8ff723b8464fb86343 (diff)
ARM: OMAP2+: hwmod: add support for lock and unlock hooks
Some IP blocks like RTC, needs an additional setting for writing to its registers. This is to prevent any spurious writes from changing the register values. This patch adds optional lock and unlock function pointers to the IP block's hwmod data. These unlock and lock function pointers are called by hwmod code before and after writing sysconfig registers. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> [paul@pwsan.com: fixed indentation level to conform with the rest of the structure members] Reviewed-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.h')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index b5d27ec81610..13f390202c60 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -576,6 +576,8 @@ struct omap_hwmod_omap4_prcm {
576 * @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown 576 * @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown
577 * @reset: ptr to fn to be executed in place of the standard hwmod reset fn 577 * @reset: ptr to fn to be executed in place of the standard hwmod reset fn
578 * @enable_preprogram: ptr to fn to be executed during device enable 578 * @enable_preprogram: ptr to fn to be executed during device enable
579 * @lock: ptr to fn to be executed to lock IP registers
580 * @unlock: ptr to fn to be executed to unlock IP registers
579 * 581 *
580 * Represent the class of a OMAP hardware "modules" (e.g. timer, 582 * Represent the class of a OMAP hardware "modules" (e.g. timer,
581 * smartreflex, gpio, uart...) 583 * smartreflex, gpio, uart...)
@@ -600,6 +602,8 @@ struct omap_hwmod_class {
600 int (*pre_shutdown)(struct omap_hwmod *oh); 602 int (*pre_shutdown)(struct omap_hwmod *oh);
601 int (*reset)(struct omap_hwmod *oh); 603 int (*reset)(struct omap_hwmod *oh);
602 int (*enable_preprogram)(struct omap_hwmod *oh); 604 int (*enable_preprogram)(struct omap_hwmod *oh);
605 void (*lock)(struct omap_hwmod *oh);
606 void (*unlock)(struct omap_hwmod *oh);
603}; 607};
604 608
605/** 609/**