/* Return: 0 on success, -1 on failure or timeout.  */
int psc_disable_module(u32 mod_num)
/* Return: 0 on success, -1 on failure or timeout.  */
int psc_disable_module(u32 mod_num)
{
	u32 mdctl;
	mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num));
	if ((mdctl & 0x3f) == 0)
		return 0;
	mdctl = PSC_REG_MDCTL_SET_LRSTZ(mdctl, 0);
	__raw_writel(mdctl, KS2_PSC_BASE + PSC_REG_MDCTL(mod_num));
	return psc_set_state(mod_num, PSC_REG_VAL_MDCTL_NEXT_SWRSTDISABLE);
}