mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 17:51:43 +00:00
mtd: spear_smi: clear status register on init
It was observed that sometimes smi returned errors while resume from suspend. For safety reasons clear status register for any errors during init. In absence of it smi can return failures during command transmissions. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
770daa4337
commit
4dc48c37d1
@ -336,6 +336,9 @@ static void spear_smi_hw_init(struct spear_smi *dev)
|
|||||||
val = HOLD1 | BANK_EN | DSEL_TIME | (prescale << 8);
|
val = HOLD1 | BANK_EN | DSEL_TIME | (prescale << 8);
|
||||||
|
|
||||||
mutex_lock(&dev->lock);
|
mutex_lock(&dev->lock);
|
||||||
|
/* clear all interrupt conditions */
|
||||||
|
writel(0, dev->io_base + SMI_SR);
|
||||||
|
|
||||||
writel(val, dev->io_base + SMI_CR1);
|
writel(val, dev->io_base + SMI_CR1);
|
||||||
mutex_unlock(&dev->lock);
|
mutex_unlock(&dev->lock);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user