ARM: 6712/1: SPEAr: replace readl(), writel() with relaxed versions in uncompress.h
authorviresh kumar <viresh.kumar@st.com>
Wed, 16 Feb 2011 06:41:06 +0000 (07:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 21 Feb 2011 19:29:23 +0000 (19:29 +0000)
readl() and writel() calls the outer cache maintainance operations
which are not available during Linux uncompression. This patch replaces
readl() and writel() with readl_relaxed() and writel_relaxed() to avoid
the link time errors.

Reviewed-by: Stanley Miao <stanley.miao@windriver.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/plat-spear/include/plat/uncompress.h

index 99ba678..6dd455b 100644 (file)
@@ -24,10 +24,10 @@ static inline void putc(int c)
 {
        void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE;
 
-       while (readl(base + UART01x_FR) & UART01x_FR_TXFF)
+       while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF)
                barrier();
 
-       writel(c, base + UART01x_DR);
+       writel_relaxed(c, base + UART01x_DR);
 }
 
 static inline void flush(void)