diff options
author | 2013-03-28 11:56:15 +0100 | |
---|---|---|
committer | 2013-03-28 11:56:15 +0100 | |
commit | d5b1598c127d2cbe87e2459909fb9e71f395f682 (patch) | |
tree | 3fbc94a75d3be31f0a2cd776664a689de1ee410c | |
parent | Merge tag 'imx-fixes-3.9-4' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes (diff) | |
parent | ARM: ep93xx: Fix wait for UART FIFO to be empty (diff) | |
download | wireguard-linux-d5b1598c127d2cbe87e2459909fb9e71f395f682.tar.xz wireguard-linux-d5b1598c127d2cbe87e2459909fb9e71f395f682.zip |
Merge tag 'ep93xx-fixes-for-3.9-rc5' of git://github.com/RyanMallon/linux-ep93xx into fixes
From Ryan Mallon <rmallon@gmail.com>:
It is a regression fix for some ep93xx boards which are failing to boot
on current mainline. The patch has been tested in next over the last
few days.
* tag 'ep93xx-fixes-for-3.9-rc5' of git://github.com/RyanMallon/linux-ep93xx:
ARM: ep93xx: Fix wait for UART FIFO to be empty
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to '')
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/uncompress.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h index d2afb4dd82ab..b5cc77d2380b 100644 --- a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h @@ -47,9 +47,13 @@ static void __raw_writel(unsigned int value, unsigned int ptr) static inline void putc(int c) { - /* Transmit fifo not full? */ - while (__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF) - ; + int i; + + for (i = 0; i < 10000; i++) { + /* Transmit fifo not full? */ + if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF)) + break; + } __raw_writeb(c, PHYS_UART_DATA); } |