]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] MX31: Move static virtual mappings of AIPS1/2 to common file
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 6 Feb 2009 17:15:06 +0000 (18:15 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Fri, 13 Mar 2009 09:34:30 +0000 (10:34 +0100)
On MX31 we can't do much without mapping the AIPS1/2 register space.
Move these mappings from individual boards to plat-mxc/mm.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx3/mm.c
arch/arm/mach-mx3/mx31ads.c
arch/arm/mach-mx3/mx31lite.c
arch/arm/mach-mx3/mx31moboard.c
arch/arm/mach-mx3/mx31pdk.c
arch/arm/mach-mx3/pcm037.c

index 44fcb6679f9a558d944847ad2f5da012d8d092ae..9e1459cb4b74891d960baff040476f9d322e6449 100644 (file)
@@ -54,6 +54,16 @@ static struct map_desc mxc_io_desc[] __initdata = {
                .pfn            = __phys_to_pfn(AVIC_BASE_ADDR),
                .length         = AVIC_SIZE,
                .type           = MT_DEVICE_NONSHARED
+       }, {
+               .virtual        = AIPS1_BASE_ADDR_VIRT,
+               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
+               .length         = AIPS1_SIZE,
+               .type           = MT_DEVICE_NONSHARED
+       }, {
+               .virtual        = AIPS2_BASE_ADDR_VIRT,
+               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
+               .length         = AIPS2_SIZE,
+               .type           = MT_DEVICE_NONSHARED
        },
 };
 
index 5c76ac5ba0feba4b183ffba8651b37fbdde1d92b..83e5e8e1276f62aa96dadc637b859270f13fdd69 100644 (file)
@@ -492,20 +492,10 @@ static void mxc_init_i2c(void)
  */
 static struct map_desc mx31ads_io_desc[] __initdata = {
        {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
                .virtual        = SPBA0_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(SPBA0_BASE_ADDR),
                .length         = SPBA0_SIZE,
                .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
        }, {
                .virtual        = CS4_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(CS4_BASE_ADDR),
index e61fad2f60f363bf63bcc2c80f71202e36556aa3..894d98cd9941a108ee6dde70d5dc00ec00f083f6 100644 (file)
  */
 static struct map_desc mx31lite_io_desc[] __initdata = {
        {
-               .virtual = AIPS1_BASE_ADDR_VIRT,
-               .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length = AIPS1_SIZE,
-               .type = MT_DEVICE_NONSHARED
-       }, {
                .virtual = SPBA0_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
                .length = SPBA0_SIZE,
                .type = MT_DEVICE_NONSHARED
-       }, {
-               .virtual = AIPS2_BASE_ADDR_VIRT,
-               .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length = AIPS2_SIZE,
-               .type = MT_DEVICE_NONSHARED
        }, {
                .virtual = CS4_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(CS4_BASE_ADDR),
index b30460a2a5596c85c60dae774fbe765b2042a07d..34c2a1b99d4fdfbb31eafba6e4653513c9d0fef8 100644 (file)
@@ -103,32 +103,6 @@ static void __init mxc_board_init(void)
        }
 }
 
-/*
- * This structure defines static mappings for the mx31moboard.
- */
-static struct map_desc mx31moboard_io_desc[] __initdata = {
-       {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
-/*
- * Set up static virtual mappings.
- */
-void __init mx31moboard_map_io(void)
-{
-       mxc_map_io();
-       iotable_init(mx31moboard_io_desc, ARRAY_SIZE(mx31moboard_io_desc));
-}
-
 static void __init mx31moboard_timer_init(void)
 {
        mx31_clocks_init(26000000);
@@ -143,7 +117,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mx31moboard_map_io,
+       .map_io         = mxc_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &mx31moboard_timer,
index 9108f157b76c6ca056946c9c8c0a18e01ea01423..bc63f17856913205cb644ba8cffd0f72cfaa19fd 100644 (file)
@@ -58,32 +58,6 @@ static inline void mxc_init_imx_uart(void)
        mxc_register_device(&mxc_uart_device0, &uart_pdata);
 }
 
-/*!
- * This structure defines static mappings for the i.MX31PDK board.
- */
-static struct map_desc mx31pdk_io_desc[] __initdata = {
-       {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
-/*!
- * Set up static virtual mappings.
- */
-static void __init mx31pdk_map_io(void)
-{
-       mxc_map_io();
-       iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc));
-}
-
 /*!
  * Board specific initialization.
  */
@@ -110,7 +84,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mx31pdk_map_io,
+       .map_io         = mxc_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &mx31pdk_timer,
index a05e37b731be8e90b126269ebd1631a39a5e9685..7743c13bebad8507567e6b0337cc58271bacc6d3 100644 (file)
@@ -210,32 +210,6 @@ static void __init mxc_board_init(void)
        mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info);
 }
 
-/*
- * This structure defines static mappings for the pcm037 board.
- */
-static struct map_desc pcm037_io_desc[] __initdata = {
-       {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
-/*
- * Set up static virtual mappings.
- */
-void __init pcm037_map_io(void)
-{
-       mxc_map_io();
-       iotable_init(pcm037_io_desc, ARRAY_SIZE(pcm037_io_desc));
-}
-
 static void __init pcm037_timer_init(void)
 {
        mx31_clocks_init(26000000);
@@ -250,7 +224,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = pcm037_map_io,
+       .map_io         = mxc_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &pcm037_timer,