ARM: ks8695: use __iomem pointers for MMIO
authorArnd Bergmann <arnd@arndb.de>
Fri, 14 Sep 2012 20:20:02 +0000 (20:20 +0000)
committerArnd Bergmann <arnd@arndb.de>
Wed, 19 Sep 2012 13:19:13 +0000 (15:19 +0200)
ARM is moving to stricter checks on readl/write functions,
so we need to use the correct types everywhere.

Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-ks8695/cpu.c
arch/arm/mach-ks8695/include/mach/hardware.h
arch/arm/mach-ks8695/include/mach/uncompress.h

index 7f3f24053a00978b06014e3592a4685f33bbfc0d..ddb24222918ecaf0319d23a8cf5a1c903a6ea2eb 100644 (file)
@@ -36,7 +36,7 @@
 
 static struct __initdata map_desc ks8695_io_desc[] = {
        {
-               .virtual        = KS8695_IO_VA,
+               .virtual        = (unsigned long)KS8695_IO_VA,
                .pfn            = __phys_to_pfn(KS8695_IO_PA),
                .length         = KS8695_IO_SIZE,
                .type           = MT_DEVICE,
index 5e0c388143da4a61e1b4ebf228a86da3164f3d8e..5090338c0db2d927543096f5f5ad303e1f5e24d2 100644 (file)
@@ -33,7 +33,7 @@
  * head debug code as the initial MMU setup only deals in L1 sections.
  */
 #define KS8695_IO_PA           0x03F00000
-#define KS8695_IO_VA           0xF0000000
+#define KS8695_IO_VA           IOMEM(0xF0000000)
 #define KS8695_IO_SIZE         SZ_1M
 
 #define KS8695_PCIMEM_PA       0x60000000
index 9495cb4d701a074e81a1194b8dbe63e315c4222d..8879d610308a4333785b3e3c779b85ba9ebdd232 100644 (file)
 
 static void putc(char c)
 {
-       while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTHRE))
+       while (!(__raw_readl((void __iomem*)KS8695_UART_PA + KS8695_URLS) & URLS_URTHRE))
                barrier();
 
-       __raw_writel(c, KS8695_UART_PA + KS8695_URTH);
+       __raw_writel(c, (void __iomem*)KS8695_UART_PA + KS8695_URTH);
 }
 
 static inline void flush(void)
 {
-       while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTE))
+       while (!(__raw_readl((void __iomem*)KS8695_UART_PA + KS8695_URLS) & URLS_URTE))
                barrier();
 }