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>
This commit is contained in:
committed by
Paul Walmsley
parent
9799aca203
commit
46273e6f37
@ -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 *
|
||||
|
Reference in New Issue
Block a user