soc: swr-mstr: Add delay between fifo writes to avoid overflow/underflow
Overflow/Underflow errors are observed sometimes while doing fifo write.
Add delay between writes to resolve error.
Change-Id: Id460e17753001a0dd52acd01a181d91132c36048
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c
index 4aa5c0c..17fca51 100644
--- a/soc/swr-mstr-ctrl.c
+++ b/soc/swr-mstr-ctrl.c
@@ -615,10 +615,10 @@
for (i = 0; i < length; i++) {
/* wait for FIFO WR command to complete to avoid overflow */
/*
- * Reduce sleep from 100us to 10us to meet KPIs
+ * Reduce sleep from 100us to 50us to meet KPIs
* This still meets the hardware spec
*/
- usleep_range(10, 12);
+ usleep_range(50, 55);
swr_master_write(swrm, reg_addr[i], val[i]);
}
mutex_unlock(&swrm->iolock);