diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2010-01-26 22:13:03 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-01-26 22:13:03 -0500 |
commit | 46273e6f37bdf3801363986e2228350ecad19059 (patch) | |
tree | f115af81da2b8a8289a84b7a535d60c800784b44 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 9799aca2032ad53418ff4bc0d1a6f2cb4f79b6c0 (diff) |
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.c | 17 |
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 ad884c0aaa42..70912d1c71e0 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) | |||
992 | __raw_writel(v, oh->_rt_va + reg_offs); | 992 | __raw_writel(v, oh->_rt_va + reg_offs); |
993 | } | 993 | } |
994 | 994 | ||
995 | int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode) | ||
996 | { | ||
997 | u32 v; | ||
998 | int retval = 0; | ||
999 | |||
1000 | if (!oh) | ||
1001 | return -EINVAL; | ||
1002 | |||
1003 | v = oh->_sysc_cache; | ||
1004 | |||
1005 | retval = _set_slave_idlemode(oh, idlemode, &v); | ||
1006 | if (!retval) | ||
1007 | _write_sysconfig(v, oh); | ||
1008 | |||
1009 | return retval; | ||
1010 | } | ||
1011 | |||
995 | /** | 1012 | /** |
996 | * omap_hwmod_register - register a struct omap_hwmod | 1013 | * omap_hwmod_register - register a struct omap_hwmod |
997 | * @oh: struct omap_hwmod * | 1014 | * @oh: struct omap_hwmod * |