diff options
author | eric miao <eric.miao@marvell.com> | 2007-11-23 01:55:59 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 10:07:53 -0500 |
commit | 732ce16066964bb7b60947750e48374cc32bd310 (patch) | |
tree | 47f24dd7e8dbf11763c7d8329164cc0579b1e9f1 | |
parent | 5a1f21b1e546fafe840944f02949c1a8a8725132 (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>
-rw-r--r-- | arch/arm/mach-pxa/ssp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 575b662200a..4954da907d4 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) |