Updated from Linux LTS 3.10.24 to 3.10.25
This commit is contained in:
@@ -399,7 +399,7 @@ static int _set_clockactivity(struct omap_hwmod *oh, u8 clockact, u32 *v)
|
||||
}
|
||||
|
||||
/**
|
||||
* _set_softreset: set OCP_SYSCONFIG.CLOCKACTIVITY bits in @v
|
||||
* _set_softreset: set OCP_SYSCONFIG.SOFTRESET bit in @v
|
||||
* @oh: struct omap_hwmod *
|
||||
* @v: pointer to register contents to modify
|
||||
*
|
||||
@@ -426,6 +426,36 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* _clear_softreset: clear OCP_SYSCONFIG.SOFTRESET bit in @v
|
||||
* @oh: struct omap_hwmod *
|
||||
* @v: pointer to register contents to modify
|
||||
*
|
||||
* Clear the SOFTRESET bit in @v for hwmod @oh. Returns -EINVAL upon
|
||||
* error or 0 upon success.
|
||||
*/
|
||||
static int _clear_softreset(struct omap_hwmod *oh, u32 *v)
|
||||
{
|
||||
u32 softrst_mask;
|
||||
|
||||
if (!oh->class->sysc ||
|
||||
!(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET))
|
||||
return -EINVAL;
|
||||
|
||||
if (!oh->class->sysc->sysc_fields) {
|
||||
WARN(1,
|
||||
"omap_hwmod: %s: sysc_fields absent for sysconfig class\n",
|
||||
oh->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift);
|
||||
|
||||
*v &= ~softrst_mask;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* _wait_softreset_complete - wait for an OCP softreset to complete
|
||||
* @oh: struct omap_hwmod * to wait on
|
||||
@@ -1909,6 +1939,12 @@ static int _ocp_softreset(struct omap_hwmod *oh)
|
||||
ret = _set_softreset(oh, &v);
|
||||
if (ret)
|
||||
goto dis_opt_clks;
|
||||
|
||||
_write_sysconfig(v, oh);
|
||||
ret = _clear_softreset(oh, &v);
|
||||
if (ret)
|
||||
goto dis_opt_clks;
|
||||
|
||||
_write_sysconfig(v, oh);
|
||||
|
||||
if (oh->class->sysc->srst_udelay)
|
||||
@@ -3148,6 +3184,11 @@ int omap_hwmod_softreset(struct omap_hwmod *oh)
|
||||
goto error;
|
||||
_write_sysconfig(v, oh);
|
||||
|
||||
ret = _clear_softreset(oh, &v);
|
||||
if (ret)
|
||||
goto error;
|
||||
_write_sysconfig(v, oh);
|
||||
|
||||
error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1930,7 +1930,8 @@ static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
|
||||
.syss_offs = 0x0014,
|
||||
.sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
|
||||
SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
|
||||
SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
|
||||
SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
|
||||
SYSS_HAS_RESET_STATUS),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
@@ -2008,15 +2009,7 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
|
||||
* hence HWMOD_SWSUP_MSTANDBY
|
||||
*/
|
||||
|
||||
/*
|
||||
* During system boot; If the hwmod framework resets the module
|
||||
* the module will have smart idle settings; which can lead to deadlock
|
||||
* (above Errata Id:i660); so, dont reset the module during boot;
|
||||
* Use HWMOD_INIT_NO_RESET.
|
||||
*/
|
||||
|
||||
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
|
||||
HWMOD_INIT_NO_RESET,
|
||||
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user