summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2010-01-26 20:13:03 -0700
committerPaul Walmsley <paul@pwsan.com>2010-01-26 20:13:03 -0700
commit46273e6f37bdf3801363986e2228350ecad19059 (patch)
treef115af81da2b8a8289a84b7a535d60c800784b44 /arch/arm/mach-omap2/omap_hwmod.c
parent9799aca2032ad53418ff4bc0d1a6f2cb4f79b6c0 (diff)
downloadop-kernel-dev-46273e6f37bdf3801363986e2228350ecad19059.zip
op-kernel-dev-46273e6f37bdf3801363986e2228350ecad19059.tar.gz
OMAP: hwmod: add API for slave idlemode setting
Some HW blocks have errata which requires specific slave idle mode under certain conditions. This patch adds an hwmod API to allow setting slave idlemode ensuring that any SYSCONFIG register updates go through hwmod. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index ad884c0..70912d1 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -992,6 +992,23 @@ void omap_hwmod_writel(u32 v, struct omap_hwmod *oh, u16 reg_offs)
__raw_writel(v, oh->_rt_va + reg_offs);
}
+int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode)
+{
+ u32 v;
+ int retval = 0;
+
+ if (!oh)
+ return -EINVAL;
+
+ v = oh->_sysc_cache;
+
+ retval = _set_slave_idlemode(oh, idlemode, &v);
+ if (!retval)
+ _write_sysconfig(v, oh);
+
+ return retval;
+}
+
/**
* omap_hwmod_register - register a struct omap_hwmod
* @oh: struct omap_hwmod *
OpenPOWER on IntegriCloud