From 2099b158881802a3dbc0bc09835ff5e3ce3b7004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 23 Jul 2010 10:46:52 +0100 Subject: [PATCH] --- yaml --- r: 201236 b: refs/heads/master c: 51aa87beb9dff42ccc3612811e83d1ad98141e0b h: refs/heads/master v: v3 --- [refs] | 2 +- .../arm/mach-ns9xxx/include/mach/uncompress.h | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 3f62d6935c9f..e1592b5e6c98 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 73bcc76aeee6afb21471ad9ec33341c7452b4d6f +refs/heads/master: 51aa87beb9dff42ccc3612811e83d1ad98141e0b diff --git a/trunk/arch/arm/mach-ns9xxx/include/mach/uncompress.h b/trunk/arch/arm/mach-ns9xxx/include/mach/uncompress.h index 1b12d324b087..770a68c46e81 100644 --- a/trunk/arch/arm/mach-ns9xxx/include/mach/uncompress.h +++ b/trunk/arch/arm/mach-ns9xxx/include/mach/uncompress.h @@ -20,50 +20,49 @@ static void putc_dummy(char c, void __iomem *base) /* nothing */ } +static int timeout; + static void putc_ns9360(char c, void __iomem *base) { - static int t = 0x10000; do { - if (t) - --t; + if (timeout) + --timeout; if (__raw_readl(base + 8) & (1 << 3)) { __raw_writeb(c, base + 16); - t = 0x10000; + timeout = 0x10000; break; } - } while (t); + } while (timeout); } static void putc_a9m9750dev(char c, void __iomem *base) { - static int t = 0x10000; do { - if (t) - --t; + if (timeout) + --timeout; if (__raw_readb(base + 5) & (1 << 5)) { __raw_writeb(c, base); - t = 0x10000; + timeout = 0x10000; break; } - } while (t); + } while (timeout); } static void putc_ns921x(char c, void __iomem *base) { - static int t = 0x10000; do { - if (t) - --t; + if (timeout) + --timeout; if (!(__raw_readl(base) & (1 << 11))) { __raw_writeb(c, base + 0x0028); - t = 0x10000; + timeout = 0x10000; break; } - } while (t); + } while (timeout); } #define MSCS __REG(0xA0900184) @@ -89,6 +88,7 @@ static void putc_ns921x(char c, void __iomem *base) static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) { + timeout = 0x10000; if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { /* ns9360 or ns9750 */ if (NS9360_UART_ENABLED(NS9360_UARTA)) {