soc: swr-mstr: Avoid overflow during swr fifo read/write

Avoid swr fifo overflow by checking no. of outstanding
commands in fifo and comparing with fifo depth before
every read/write. If no. of commands is equal to fifo
depth then give some delay and retry. If no of outstanding
commands are still equal to fifo depth then flush fifo
and try writing/reading from fifo again.

Change-Id: Ifd986c7affb70a61f8a90e4960a2779273a7d4d2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2 files changed