]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: S5P: Moves initial map for merging S5P64X0
authorKukjin Kim <kgene.kim@samsung.com>
Tue, 31 Aug 2010 07:30:51 +0000 (16:30 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Mon, 18 Oct 2010 01:33:34 +0000 (10:33 +0900)
This patch moves some initial maps from plat-s5p to machine,
so that can merge mach-s5p6440 and mach-s5p6450.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s5p6440/cpu.c
arch/arm/mach-s5p6440/include/mach/map.h
arch/arm/mach-s5p6442/cpu.c
arch/arm/mach-s5p6442/include/mach/map.h
arch/arm/mach-s5pc100/cpu.c
arch/arm/mach-s5pc100/include/mach/map.h
arch/arm/mach-s5pv210/cpu.c
arch/arm/mach-s5pv210/include/mach/map.h
arch/arm/mach-s5pv310/cpu.c
arch/arm/plat-s5p/cpu.c

index ec592e8660547a45956bcddc4bb6426523973b30..8a09e0fc2730cd6edaff09cdd839d7c4ee41023f 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/arch/arm/mach-s5p6440/cpu.c
  *
- * Copyright (c) 2009 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com/
+ * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
+ *             http://www.samsung.com
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 #include <plat/s5p6440.h>
 #include <plat/adc-core.h>
 
+/* Initial IO mappings */
+
+static struct map_desc s5p6440_iodesc[] __initdata = {
+       {
+               .virtual        = (unsigned long)S5P_VA_GPIO,
+               .pfn            = __phys_to_pfn(S5P6440_PA_GPIO),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC0,
+               .pfn            = __phys_to_pfn(S5P6440_PA_VIC0),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC1,
+               .pfn            = __phys_to_pfn(S5P6440_PA_VIC1),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S3C_VA_UART,
+               .pfn            = __phys_to_pfn(S3C_PA_UART),
+               .length         = SZ_512K,
+               .type           = MT_DEVICE,
+       }
+};
+
 static void s5p6440_idle(void)
 {
        unsigned long val;
@@ -55,15 +81,18 @@ static void s5p6440_idle(void)
        local_irq_enable();
 }
 
-/* s5p6440_map_io
+/*
+ * s5p6440_map_io
  *
  * register the standard cpu IO areas
-*/
+ */
 
 void __init s5p6440_map_io(void)
 {
        /* initialize any device information early */
        s3c_adc_setname("s3c64xx-adc");
+
+       iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc));
 }
 
 void __init s5p6440_init_clocks(int xtal)
index 6cc5cbc88ffb701af01c056ba297427070988826..11d31fe87ccf44bd2b8d5b67c595b1a717abe5de 100644 (file)
 #define S5P_PA_SYSCON          S5P6440_PA_SYSCON
 
 #define S5P6440_PA_GPIO                (0xE0308000)
-#define S5P_PA_GPIO            S5P6440_PA_GPIO
 
 #define S5P6440_PA_VIC0                (0xE4000000)
-#define S5P_PA_VIC0            S5P6440_PA_VIC0
+#define S5P6440_PA_VIC1                (0xE4100000)
 
 #define S5P6440_PA_PDMA                0xE9000000
 
-#define S5P6440_PA_VIC1                (0xE4100000)
-#define S5P_PA_VIC1            S5P6440_PA_VIC1
-
 #define S5P6440_PA_TIMER       (0xEA000000)
 #define S5P_PA_TIMER           S5P6440_PA_TIMER
 
 #define S5P6440_PA_RTC         (0xEA100000)
 
 #define S5P6440_PA_WDT         (0xEA200000)
-#define S5P_PA_WDT             S5P6440_PA_WDT
 
 #define S5P6440_PA_UART                (0xEC000000)
 
index 70ac681af72bc7a1a9ce5434c164e5b86e1fdf55..842af86bda6def3db35fcab32bd36127f5e14aad 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/arch/arm/mach-s5p6442/cpu.c
  *
  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com/
+ *             http://www.samsung.com
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -47,11 +47,31 @@ static struct map_desc s5p6442_iodesc[] __initdata = {
                .pfn            = __phys_to_pfn(S5P6442_PA_SYSTIMER),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S5P_VA_GPIO,
+               .pfn            = __phys_to_pfn(S5P6442_PA_GPIO),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC0,
+               .pfn            = __phys_to_pfn(S5P6442_PA_VIC0),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC1,
+               .pfn            = __phys_to_pfn(S5P6442_PA_VIC1),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)VA_VIC2,
                .pfn            = __phys_to_pfn(S5P6442_PA_VIC2),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S3C_VA_UART,
+               .pfn            = __phys_to_pfn(S3C_PA_UART),
+               .length         = SZ_512K,
+               .type           = MT_DEVICE,
        }
 };
 
@@ -63,10 +83,11 @@ static void s5p6442_idle(void)
        local_irq_enable();
 }
 
-/* s5p6442_map_io
+/*
+ * s5p6442_map_io
  *
  * register the standard cpu IO areas
-*/
+ */
 
 void __init s5p6442_map_io(void)
 {
index 281d256faafb0d6e4e817261ac78e5b091a4078d..31fb2e68d527915080df5f9ff498c835218f972c 100644 (file)
 #define S5P_PA_SYSCON          S5P6442_PA_SYSCON
 
 #define S5P6442_PA_GPIO                (0xE0200000)
-#define S5P_PA_GPIO            S5P6442_PA_GPIO
 
 #define S5P6442_PA_VIC0                (0xE4000000)
-#define S5P_PA_VIC0            S5P6442_PA_VIC0
-
 #define S5P6442_PA_VIC1                (0xE4100000)
-#define S5P_PA_VIC1            S5P6442_PA_VIC1
-
 #define S5P6442_PA_VIC2                (0xE4200000)
-#define S5P_PA_VIC2            S5P6442_PA_VIC2
 
 #define S5P6442_PA_MDMA                0xE8000000
 #define S5P6442_PA_PDMA                0xE9000000
index cd1afbce83e2cfa6d006d6084e384e1705408be8..fd2708e7d8a9f4aa61bf645abad7f644149720e7 100644 (file)
@@ -1,4 +1,7 @@
 /* linux/arch/arm/mach-s5pc100/cpu.c
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ *             http://www.samsung.com
  *
  * Copyright 2009 Samsung Electronics Co.
  *     Byungho Min <bhmin@samsung.com>
@@ -56,11 +59,31 @@ static struct map_desc s5pc100_iodesc[] __initdata = {
                .pfn            = __phys_to_pfn(S5PC100_PA_SYSTIMER),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S5P_VA_GPIO,
+               .pfn            = __phys_to_pfn(S5PC100_PA_GPIO),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC0,
+               .pfn            = __phys_to_pfn(S5PC100_PA_VIC0),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC1,
+               .pfn            = __phys_to_pfn(S5PC100_PA_VIC1),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)VA_VIC2,
-               .pfn            = __phys_to_pfn(S5P_PA_VIC2),
+               .pfn            = __phys_to_pfn(S5PC100_PA_VIC2),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S3C_VA_UART,
+               .pfn            = __phys_to_pfn(S3C_PA_UART),
+               .length         = SZ_512K,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)S5PC100_VA_OTHERS,
                .pfn            = __phys_to_pfn(S5PC100_PA_OTHERS),
index 01b9134feff0d055fd33418f7b07bc68c000b885..8751ef4a6804d481d3f1d4ae2c5842dd88f4635a 100644 (file)
 #define S5PC100_PA_OTHERS      (0xE0200000)
 #define S5PC100_VA_OTHERS      (S3C_VA_SYS + 0x10000)
 
-#define S5P_PA_GPIO            (0xE0300000)
+#define S5PC100_PA_GPIO                (0xE0300000)
 #define S5PC1XX_VA_GPIO                S3C_ADDR(0x00500000)
 
 /* Interrupt */
-#define S5PC100_PA_VIC         (0xE4000000)
+#define S5PC100_PA_VIC0                (0xE4000000)
+#define S5PC100_PA_VIC1                (0xE4100000)
+#define S5PC100_PA_VIC2                (0xE4200000)
 #define S5PC100_VA_VIC         S3C_VA_IRQ
-#define S5PC100_PA_VIC_OFFSET  0x100000
 #define S5PC100_VA_VIC_OFFSET  0x10000
-#define S5PC1XX_PA_VIC(x)      (S5PC100_PA_VIC + ((x) * S5PC100_PA_VIC_OFFSET))
 #define S5PC1XX_VA_VIC(x)      (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET))
-#define S5P_PA_VIC0            S5PC1XX_PA_VIC(0)
-#define S5P_PA_VIC1            S5PC1XX_PA_VIC(1)
-#define S5P_PA_VIC2            S5PC1XX_PA_VIC(2)
 
 
 #define S5PC100_PA_ONENAND     (0xE7100000)
index 245b82b53df4612d63d45984659e2221605d124f..2f16bfc0a116cd4bde8298b8c83ed4f076145080 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/arch/arm/mach-s5pv210/cpu.c
  *
  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com/
+ *             http://www.samsung.com
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -50,6 +50,21 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
                .pfn            = __phys_to_pfn(S5PV210_PA_SYSTIMER),
                .length         = SZ_4K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S5P_VA_GPIO,
+               .pfn            = __phys_to_pfn(S5PV210_PA_GPIO),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC0,
+               .pfn            = __phys_to_pfn(S5PV210_PA_VIC0),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)VA_VIC1,
+               .pfn            = __phys_to_pfn(S5PV210_PA_VIC1),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)VA_VIC2,
                .pfn            = __phys_to_pfn(S5PV210_PA_VIC2),
@@ -60,6 +75,11 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
                .pfn            = __phys_to_pfn(S5PV210_PA_VIC3),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S3C_VA_UART,
+               .pfn            = __phys_to_pfn(S3C_PA_UART),
+               .length         = SZ_512K,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)S5P_VA_SROMC,
                .pfn            = __phys_to_pfn(S5PV210_PA_SROMC),
index aa19d2f8dadb36994779fe80edf42c85d5273be3..bd9afd52466ad2cb787ed90ba394cc1f73870cb0 100644 (file)
@@ -29,7 +29,6 @@
 #define S5P_PA_SYSCON          S5PV210_PA_SYSCON
 
 #define S5PV210_PA_GPIO                (0xE0200000)
-#define S5P_PA_GPIO            S5PV210_PA_GPIO
 
 /* SPI */
 #define S5PV210_PA_SPI0                0xE1300000
 #define S5PV210_PA_HSMMC(x)    (0xEB000000 + ((x) * 0x100000))
 
 #define S5PV210_PA_VIC0                (0xF2000000)
-#define S5P_PA_VIC0            S5PV210_PA_VIC0
-
 #define S5PV210_PA_VIC1                (0xF2100000)
-#define S5P_PA_VIC1            S5PV210_PA_VIC1
-
 #define S5PV210_PA_VIC2                (0xF2200000)
-#define S5P_PA_VIC2            S5PV210_PA_VIC2
-
 #define S5PV210_PA_VIC3                (0xF2300000)
-#define S5P_PA_VIC3            S5PV210_PA_VIC3
 
 #define S5PV210_PA_SDRAM       (0x20000000)
 #define S5P_PA_SDRAM           S5PV210_PA_SDRAM
index e5b261a99ab2678e5860d9c0055d493137ef1e42..3b9c872ed68d6c53f1e95c98a41699e239e0f2cf 100644 (file)
@@ -31,29 +31,39 @@ extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
 /* Initial IO mappings */
 static struct map_desc s5pv310_iodesc[] __initdata = {
        {
-               .virtual        = (unsigned long)S5P_VA_COREPERI_BASE,
-               .pfn            = __phys_to_pfn(S5PV310_PA_COREPERI),
-               .length         = SZ_8K,
+               .virtual        = (unsigned long)S5P_VA_SYSRAM,
+               .pfn            = __phys_to_pfn(S5PV310_PA_SYSRAM),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S5P_VA_CMU,
+               .pfn            = __phys_to_pfn(S5PV310_PA_CMU),
+               .length         = SZ_128K,
                .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)S5P_VA_COMBINER_BASE,
                .pfn            = __phys_to_pfn(S5PV310_PA_COMBINER),
                .length         = SZ_4K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S5P_VA_COREPERI_BASE,
+               .pfn            = __phys_to_pfn(S5PV310_PA_COREPERI),
+               .length         = SZ_8K,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)S5P_VA_L2CC,
                .pfn            = __phys_to_pfn(S5PV310_PA_L2CC),
                .length         = SZ_4K,
                .type           = MT_DEVICE,
        }, {
-               .virtual        = (unsigned long)S5P_VA_SYSRAM,
-               .pfn            = __phys_to_pfn(S5PV310_PA_SYSRAM),
+               .virtual        = (unsigned long)S5P_VA_GPIO,
+               .pfn            = __phys_to_pfn(S5PV310_PA_GPIO),
                .length         = SZ_4K,
                .type           = MT_DEVICE,
        }, {
-               .virtual        = (unsigned long)S5P_VA_CMU,
-               .pfn            = __phys_to_pfn(S5PV310_PA_CMU),
-               .length         = SZ_128K,
+               .virtual        = (unsigned long)S3C_VA_UART,
+               .pfn            = __phys_to_pfn(S3C_PA_UART),
+               .length         = SZ_512K,
                .type           = MT_DEVICE,
        },
 };
index b07a078fd28449b80c9171d46f10975a5998b2b9..57f08eee6d62294431f0fb9fd23f57a2020291b6 100644 (file)
@@ -88,33 +88,11 @@ static struct map_desc s5p_iodesc[] __initdata = {
                .pfn            = __phys_to_pfn(S5P_PA_SYSCON),
                .length         = SZ_64K,
                .type           = MT_DEVICE,
-       }, {
-               .virtual        = (unsigned long)S3C_VA_UART,
-               .pfn            = __phys_to_pfn(S3C_PA_UART),
-               .length         = SZ_512K,
-               .type           = MT_DEVICE,
-#ifdef CONFIG_ARM_VIC
-       }, {
-               .virtual        = (unsigned long)VA_VIC0,
-               .pfn            = __phys_to_pfn(S5P_PA_VIC0),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = (unsigned long)VA_VIC1,
-               .pfn            = __phys_to_pfn(S5P_PA_VIC1),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-#endif
        }, {
                .virtual        = (unsigned long)S3C_VA_TIMER,
                .pfn            = __phys_to_pfn(S5P_PA_TIMER),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
-       }, {
-               .virtual        = (unsigned long)S5P_VA_GPIO,
-               .pfn            = __phys_to_pfn(S5P_PA_GPIO),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)S3C_VA_WATCHDOG,
                .pfn            = __phys_to_pfn(S3C_PA_WDT),