[ARM] 3138/1: SMDK2440 - fix map_desc initialisation (and ISA memory space)
[powerpc.git] / arch / arm / mach-s3c2410 / mach-anubis.c
index f87aa0b..0f81fc0 100644 (file)
@@ -12,6 +12,7 @@
  *
  * Modifications:
  *     02-May-2005 BJD  Copied from mach-bast.c
+ *     20-Sep-2005 BJD  Added static to non-exported items
 */
 
 #include <linux/kernel.h>
@@ -20,7 +21,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 static struct map_desc anubis_iodesc[] __initdata = {
   /* ISA IO areas */
 
-  { (u32)S3C24XX_VA_ISA_BYTE, 0x0,        SZ_16M, MT_DEVICE },
-  { (u32)S3C24XX_VA_ISA_WORD, 0x0,        SZ_16M, MT_DEVICE },
+  {
+       .virtual        = (u32)S3C24XX_VA_ISA_BYTE,
+       .pfn            = __phys_to_pfn(0x0),
+       .length         = SZ_4M,
+       .type           = MT_DEVICE
+  }, {
+       .virtual        = (u32)S3C24XX_VA_ISA_WORD,
+       .pfn            = __phys_to_pfn(0x0),
+       .length         = SZ_4M, MT_DEVICE
+  },
 
   /* we could possibly compress the next set down into a set of smaller tables
    * pagetables, but that would mean using an L2 section, and it still means
@@ -65,16 +74,41 @@ static struct map_desc anubis_iodesc[] __initdata = {
 
   /* CPLD control registers */
 
-  { (u32)ANUBIS_VA_CTRL1,      ANUBIS_PA_CTRL1,        SZ_4K, MT_DEVICE },
-  { (u32)ANUBIS_VA_CTRL2,      ANUBIS_PA_CTRL2,        SZ_4K, MT_DEVICE },
+  {
+       .virtual        = (u32)ANUBIS_VA_CTRL1,
+       .pfn            = __phys_to_pfn(ANUBIS_PA_CTRL1),
+       .length         = SZ_4K,
+       .type           = MT_DEVICE
+  }, {
+       .virtual        = (u32)ANUBIS_VA_CTRL2,
+       .pfn            = __phys_to_pfn(ANUBIS_PA_CTRL2),
+       .length         = SZ_4K,
+       .type           =MT_DEVICE
+  },
 
   /* IDE drives */
 
-  { (u32)ANUBIS_IDEPRI,                S3C2410_CS3,            SZ_1M, MT_DEVICE },
-  { (u32)ANUBIS_IDEPRIAUX,     S3C2410_CS3+(1<<26),    SZ_1M, MT_DEVICE },
-
-  { (u32)ANUBIS_IDESEC,                S3C2410_CS4,            SZ_1M, MT_DEVICE },
-  { (u32)ANUBIS_IDESECAUX,     S3C2410_CS4+(1<<26),    SZ_1M, MT_DEVICE },
+  {
+       .virtual        = (u32)ANUBIS_IDEPRI,
+       .pfn            = __phys_to_pfn(S3C2410_CS3),
+       .length         = SZ_1M,
+       .type           = MT_DEVICE
+  }, {
+       .virtual        = (u32)ANUBIS_IDEPRIAUX,
+       .pfn            = __phys_to_pfn(S3C2410_CS3+(1<<26)),
+       .length         = SZ_1M,
+       .type           = MT_DEVICE
+  }, {
+       .virtual        = (u32)ANUBIS_IDESEC,
+       .pfn            = __phys_to_pfn(S3C2410_CS4),
+       .length         = SZ_1M,
+       .type           = MT_DEVICE
+  }, {
+       .virtual        = (u32)ANUBIS_IDESECAUX,
+       .pfn            = __phys_to_pfn(S3C2410_CS4+(1<<26)),
+       .length         = SZ_1M,
+       .type           = MT_DEVICE
+  },
 };
 
 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
@@ -124,7 +158,7 @@ static int external_map[]   = { 2 };
 static int chip0_map[]      = { 0 };
 static int chip1_map[]      = { 1 };
 
-struct mtd_partition anubis_default_nand_part[] = {
+static struct mtd_partition anubis_default_nand_part[] = {
        [0] = {
                .name   = "Boot Agent",
                .size   = SZ_16K,
@@ -232,7 +266,7 @@ static struct s3c24xx_board anubis_board __initdata = {
        .clocks_count  = ARRAY_SIZE(anubis_clocks)
 };
 
-void __init anubis_map_io(void)
+static void __init anubis_map_io(void)
 {
        /* initialise the clocks */