Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=732ce16066964bb7b60947750e48374cc32bd310
Commit:     732ce16066964bb7b60947750e48374cc32bd310
Parent:     5a1f21b1e546fafe840944f02949c1a8a8725132
Author:     eric miao <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 23 14:55:59 2007 +0800
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Sat Jan 26 15:07:53 2008 +0000

    [ARM] pxa: ensure SSP TX FIFO is empty instead of not full for pxa3xx
    
    Signed-off-by: eric miao <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 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 575b662..4954da9 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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to