summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2007-11-23 14:55:59 +0800
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 15:07:53 +0000
commit732ce16066964bb7b60947750e48374cc32bd310 (patch)
tree47f24dd7e8dbf11763c7d8329164cc0579b1e9f1 /arch/arm/mach-pxa
parent5a1f21b1e546fafe840944f02949c1a8a8725132 (diff)
downloadblackbird-op-linux-732ce16066964bb7b60947750e48374cc32bd310.tar.gz
blackbird-op-linux-732ce16066964bb7b60947750e48374cc32bd310.zip
[ARM] pxa: ensure SSP TX FIFO is empty instead of not full for pxa3xx
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/ssp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 575b662200a7..4954da907d42 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -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)
OpenPOWER on IntegriCloud