aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2007-11-23 01:55:59 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 10:07:53 -0500
commit732ce16066964bb7b60947750e48374cc32bd310 (patch)
tree47f24dd7e8dbf11763c7d8329164cc0579b1e9f1 /arch/arm/mach-pxa
parent5a1f21b1e546fafe840944f02949c1a8a8725132 (diff)
[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)
138 struct ssp_device *ssp = dev->ssp; 138 struct ssp_device *ssp = dev->ssp;
139 int timeout = TIMEOUT * 2; 139 int timeout = TIMEOUT * 2;
140 140
141 /* ensure TX FIFO is empty instead of not full */
142 if (cpu_is_pxa3xx()) {
143 while (__raw_readl(ssp->mmio_base + SSSR) & 0xf00) {
144 if (!--timeout)
145 return -ETIMEDOUT;
146 cpu_relax();
147 }
148 timeout = TIMEOUT * 2;
149 }
150
141 do { 151 do {
142 while (__raw_readl(ssp->mmio_base + SSSR) & SSSR_RNE) { 152 while (__raw_readl(ssp->mmio_base + SSSR) & SSSR_RNE) {
143 if (!--timeout) 153 if (!--timeout)