Skip to content

Commit

Permalink
[ARM] pxa: ensure SSP TX FIFO is empty instead of not full for pxa3xx
Browse files Browse the repository at this point in the history
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
eric miao authored and Russell King committed Jan 26, 2008
1 parent 5a1f21b commit 732ce16
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/mach-pxa/ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ int ssp_flush(struct ssp_dev *dev)
struct ssp_device *ssp = dev->ssp;
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 {
while (__raw_readl(ssp->mmio_base + SSSR) & SSSR_RNE) {
if (!--timeout)
Expand Down

0 comments on commit 732ce16

Please sign in to comment.