Commit 732ce160 authored by eric miao's avatar eric miao Committed by Russell King

[ARM] pxa: ensure SSP TX FIFO is empty instead of not full for pxa3xx

Signed-off-by: default avatareric miao <eric.miao@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 5a1f21b1
...@@ -138,6 +138,16 @@ int ssp_flush(struct ssp_dev *dev) ...@@ -138,6 +138,16 @@ int ssp_flush(struct ssp_dev *dev)
struct ssp_device *ssp = dev->ssp; struct ssp_device *ssp = dev->ssp;
int timeout = TIMEOUT * 2; int timeout = TIMEOUT * 2;
/* ensure TX FIFO is empty instead of not full */
if (cpu_is_pxa3xx()) {
while (__raw_readl(ssp->mmio_base + SSSR) & 0xf00) {
if (!--timeout)
return -ETIMEDOUT;
cpu_relax();
}
timeout = TIMEOUT * 2;
}
do { do {
while (__raw_readl(ssp->mmio_base + SSSR) & SSSR_RNE) { while (__raw_readl(ssp->mmio_base + SSSR) & SSSR_RNE) {
if (!--timeout) if (!--timeout)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment