Merge branch 'kirkwood/addr_decode' of git://git.infradead.org/users/jcooper/linux...
authorOlof Johansson <olof@lixom.net>
Sat, 22 Sep 2012 21:09:21 +0000 (14:09 -0700)
committerOlof Johansson <olof@lixom.net>
Sat, 22 Sep 2012 21:22:47 +0000 (14:22 -0700)
* 'kirkwood/addr_decode' of git://git.infradead.org/users/jcooper/linux:
  arm: mvebu: add address decoding controller to the DT
  arm: mvebu: add basic address decoding support to Armada 370/XP
  arm: plat-orion: make bridge_virt_base non-const to support DT use case
  arm: plat-orion: introduce PLAT_ORION_LEGACY hidden config option
  arm: plat-orion: use void __iomem pointers for addr-map functions
  arm: plat-orion: use void __iomem pointers for time functions
  arm: plat-orion: use void __iomem pointers for MPP functions
  arm: plat-orion: use void __iomem pointers for UART registration functions
  arm: mach-mvebu: use IOMEM() for base address definitions
  arm: mach-orion5x: use IOMEM() for base address definitions
  arm: mach-mv78xx0: use IOMEM() for base address definitions
  arm: mach-kirkwood: use IOMEM() for base address definitions
  arm: mach-dove: use IOMEM() for base address definitions
  arm: mach-orion5x: use plus instead of or for address definitions
  arm: mach-mv78xx0: use plus instead of or for address definitions
  arm: mach-kirkwood: use plus instead of or for address definitions
  arm: mach-dove: use plus instead of or for address definitions

This branch had quite a few conflicts, in particular with the PCI static
map rework from Rob Herring, and a few other context conflicts due to
changes in Kconfig, etc.

I fixed up conflicts in:
arch/arm/Kconfig
arch/arm/mach-dove/common.c
arch/arm/mach-dove/include/mach/dove.h
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/include/mach/kirkwood.h
arch/arm/mach-mv78xx0/common.c
arch/arm/mach-mv78xx0/include/mach/mv78xx0.h
arch/arm/mach-orion5x/common.c
arch/arm/mach-orion5x/include/mach/orion5x.h

Signed-off-by: Olof Johansson <olof@lixom.net>
24 files changed:
1  2 
arch/arm/Kconfig
arch/arm/mach-dove/common.c
arch/arm/mach-dove/include/mach/dove.h
arch/arm/mach-dove/irq.c
arch/arm/mach-dove/pcie.c
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/include/mach/kirkwood.h
arch/arm/mach-kirkwood/irq.c
arch/arm/mach-kirkwood/pcie.c
arch/arm/mach-mv78xx0/addr-map.c
arch/arm/mach-mv78xx0/common.c
arch/arm/mach-mv78xx0/include/mach/mv78xx0.h
arch/arm/mach-mv78xx0/irq.c
arch/arm/mach-mv78xx0/pcie.c
arch/arm/mach-mvebu/Makefile
arch/arm/mach-mvebu/armada-370-xp.c
arch/arm/mach-mvebu/armada-370-xp.h
arch/arm/mach-orion5x/common.c
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-orion5x/include/mach/orion5x.h
arch/arm/mach-orion5x/irq.c
arch/arm/mach-orion5x/pci.c
arch/arm/plat-orion/common.c
arch/arm/plat-orion/mpp.c

index 5876aef72dfe7617d804cde12108e23c9c5d06f8,a4eab57bee2f7388785202656a16116e091ac1f3..70505d8f85c5a99e2354ad9e25bd61a2292d8ba8
@@@ -537,11 -561,24 +537,11 @@@ config ARCH_IXP4X
  config ARCH_DOVE
        bool "Marvell Dove"
        select CPU_V7
 -      select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
 +      select MIGHT_HAVE_PCI
-       select PLAT_ORION
+       select PLAT_ORION_LEGACY
 +      select USB_ARCH_HAS_EHCI
        help
          Support for the Marvell Dove SoC 88AP510
  
@@@ -551,7 -588,8 +551,7 @@@ config ARCH_KIRKWOO
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
-       select PLAT_ORION
 -      select NEED_MACH_IO_H
+       select PLAT_ORION_LEGACY
        help
          Support for the following Marvell Kirkwood series SoCs:
          88F6180, 88F6192 and 88F6281.
@@@ -577,7 -615,8 +577,7 @@@ config ARCH_MV78XX
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
-       select PLAT_ORION
 -      select NEED_MACH_IO_H
+       select PLAT_ORION_LEGACY
        help
          Support for the following Marvell MV78xx0 series SoCs:
          MV781x0, MV782x0.
@@@ -589,7 -628,8 +589,7 @@@ config ARCH_ORION5
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
-       select PLAT_ORION
 -      select NEED_MACH_IO_H
+       select PLAT_ORION_LEGACY
        help
          Support for the following Marvell Orion 5x series SoCs:
          Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
Simple merge
Simple merge
index 355332d502cb538cdec53e796bdf70b993f381ae,b3724414fd1a959cba90ec0f5c4b76cc6e98a4a1..bb15b26041cb7d6bd13a5ca4d5532cb66632e2cc
@@@ -193,9 -208,9 +193,9 @@@ static void __init add_pcie_port(int in
  
                pp->index = index;
                pp->root_bus_nr = -1;
-               pp->base = (void __iomem *)base;
+               pp->base = base;
                spin_lock_init(&pp->conf_lock);
 -              memset(pp->res, 0, sizeof(pp->res));
 +              memset(&pp->res, 0, sizeof(pp->res));
        } else {
                printk(KERN_INFO "link down, ignoring\n");
        }
index 5c38c94b79a291ef1e220566e2c8e6c10ac410f2,55bf9198caeba62de2964b23edd219a44c181fd0..3991077f58a26aa5f3a77c2ff005e7c7838a1edb
   ****************************************************************************/
  static struct map_desc kirkwood_io_desc[] __initdata = {
        {
-               .virtual        = KIRKWOOD_REGS_VIRT_BASE,
 -              .virtual        = (unsigned long) KIRKWOOD_PCIE_IO_VIRT_BASE,
 -              .pfn            = __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
 -              .length         = KIRKWOOD_PCIE_IO_SIZE,
 -              .type           = MT_DEVICE,
 -      }, {
 -              .virtual        = (unsigned long) KIRKWOOD_PCIE1_IO_VIRT_BASE,
 -              .pfn            = __phys_to_pfn(KIRKWOOD_PCIE1_IO_PHYS_BASE),
 -              .length         = KIRKWOOD_PCIE1_IO_SIZE,
 -              .type           = MT_DEVICE,
 -      }, {
+               .virtual        = (unsigned long) KIRKWOOD_REGS_VIRT_BASE,
                .pfn            = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE),
                .length         = KIRKWOOD_REGS_SIZE,
                .type           = MT_DEVICE,
index af4f0000dcef31adf260e4c1def6365e4158a002,d3ea68269c906f8100fd8858174b2b012c1f0df4..041653a04a9ccd0db3e8b99cbff4da6ea135f96b
  #define KIRKWOOD_NAND_MEM_SIZE                SZ_1K
  
  #define KIRKWOOD_PCIE1_IO_PHYS_BASE   0xf3000000
 -#define KIRKWOOD_PCIE1_IO_VIRT_BASE   IOMEM(0xfef00000)
 -#define KIRKWOOD_PCIE1_IO_BUS_BASE    0x00100000
 -#define KIRKWOOD_PCIE1_IO_SIZE                SZ_1M
 +#define KIRKWOOD_PCIE1_IO_BUS_BASE    0x00010000
 +#define KIRKWOOD_PCIE1_IO_SIZE                SZ_64K
  
  #define KIRKWOOD_PCIE_IO_PHYS_BASE    0xf2000000
 -#define KIRKWOOD_PCIE_IO_VIRT_BASE    IOMEM(0xfee00000)
  #define KIRKWOOD_PCIE_IO_BUS_BASE     0x00000000
 -#define KIRKWOOD_PCIE_IO_SIZE         SZ_1M
 +#define KIRKWOOD_PCIE_IO_SIZE         SZ_64K
  
  #define KIRKWOOD_REGS_PHYS_BASE               0xf1000000
- #define KIRKWOOD_REGS_VIRT_BASE               0xfed00000
+ #define KIRKWOOD_REGS_VIRT_BASE               IOMEM(0xfed00000)
  #define KIRKWOOD_REGS_SIZE            SZ_1M
  
  #define KIRKWOOD_PCIE_MEM_PHYS_BASE   0xe0000000
index 20149a7fd2807d3c789af1d923f03a4f1f671338,f4ac804dc664845c98da72712963bb1035a38766..884703535a0a1d8253dcdf43f53f317b13ae2d10
@@@ -10,8 -10,8 +10,9 @@@
  #include <linux/gpio.h>
  #include <linux/kernel.h>
  #include <linux/irq.h>
+ #include <linux/io.h>
  #include <mach/bridge-regs.h>
 +#include <plat/orion-gpio.h>
  #include <plat/irq.h>
  
  static int __initdata gpio0_irqs[4] = {
index 532d8acb38f910233e8f525a68ab928dc9961e85,df6399dea7458e2dd5e7f22d30dc3cc8ffd74874..ec544918b12c057b56109c1e688a217bf9ac5750
@@@ -133,9 -133,17 +133,9 @@@ static struct pci_ops pcie_ops = 
  
  static void __init pcie0_ioresources_init(struct pcie_port *pp)
  {
-       pp->base = (void __iomem *)PCIE_VIRT_BASE;
+       pp->base = PCIE_VIRT_BASE;
        pp->irq = IRQ_KIRKWOOD_PCIE;
  
 -      /*
 -       * IORESOURCE_IO
 -       */
 -      pp->res[0].name = "PCIe 0 I/O Space";
 -      pp->res[0].start = KIRKWOOD_PCIE_IO_BUS_BASE;
 -      pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
 -      pp->res[0].flags = IORESOURCE_IO;
 -
        /*
         * IORESOURCE_MEM
         */
  
  static void __init pcie1_ioresources_init(struct pcie_port *pp)
  {
-       pp->base = (void __iomem *)PCIE1_VIRT_BASE;
+       pp->base = PCIE1_VIRT_BASE;
        pp->irq = IRQ_KIRKWOOD_PCIE1;
  
 -      /*
 -       * IORESOURCE_IO
 -       */
 -      pp->res[0].name = "PCIe 1 I/O Space";
 -      pp->res[0].start = KIRKWOOD_PCIE1_IO_BUS_BASE;
 -      pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1;
 -      pp->res[0].flags = IORESOURCE_IO;
 -
        /*
         * IORESOURCE_MEM
         */
Simple merge
index a6f3cd21e8c29f3f914604a0553eac0f5a8da195,f123517a4bb8bb3176f215eabd8cd480b026bb38..131cd4883f3db21019c15dc8efc296d61d65a7e6
@@@ -134,8 -134,13 +134,8 @@@ static struct map_desc mv78xx0_io_desc[
                .pfn            = 0,
                .length         = MV78XX0_CORE_REGS_SIZE,
                .type           = MT_DEVICE,
 -      }, {
 -              .virtual        = (unsigned long) MV78XX0_PCIE_IO_VIRT_BASE(0),
 -              .pfn            = __phys_to_pfn(MV78XX0_PCIE_IO_PHYS_BASE(0)),
 -              .length         = MV78XX0_PCIE_IO_SIZE * 8,
 -              .type           = MT_DEVICE,
        }, {
-               .virtual        = MV78XX0_REGS_VIRT_BASE,
+               .virtual        = (unsigned long) MV78XX0_REGS_VIRT_BASE,
                .pfn            = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE),
                .length         = MV78XX0_REGS_SIZE,
                .type           = MT_DEVICE,
index bd03fed1128eeaa93863428062f24d1f1fa2d285,62405e8dda0e7ceba15db714afa787272a98b230..46200a183cf2cbf5f96bd6e62f8eb3a0cc4240f3
@@@ -49,7 -49,8 +49,7 @@@
  #define MV78XX0_PCIE_IO_SIZE          SZ_1M
  
  #define MV78XX0_REGS_PHYS_BASE                0xf1000000
- #define MV78XX0_REGS_VIRT_BASE                0xfd000000
 -#define MV78XX0_REGS_VIRT_BASE                IOMEM(0xfef00000)
++#define MV78XX0_REGS_VIRT_BASE                IOMEM(0xfd000000)
  #define MV78XX0_REGS_SIZE             SZ_1M
  
  #define MV78XX0_PCIE_MEM_PHYS_BASE    0xc0000000
index 4d720f2aedba878d38e30af4cacbc239b062d7a0,b5c40c4f524ee6a08c3aaff281642aa7661d273b..32073444024b2dc19517534a521cae998a04da08
@@@ -10,8 -10,8 +10,9 @@@
  #include <linux/gpio.h>
  #include <linux/kernel.h>
  #include <linux/irq.h>
+ #include <linux/io.h>
  #include <mach/bridge-regs.h>
 +#include <plat/orion-gpio.h>
  #include <plat/irq.h>
  #include "common.h"
  
index 26a059b4f4720173b1f12430d2a62bb0e1173f35,e2940fbbcd687235cfe491d8c6e6ec2db5f95b99..a9a154a646dde94fb75b81f86cd6aa094250edfe
@@@ -34,21 -34,12 +34,21 @@@ static struct resource pcie_io_space
  
  void __init mv78xx0_pcie_id(u32 *dev, u32 *rev)
  {
-       *dev = orion_pcie_dev_id((void __iomem *)PCIE00_VIRT_BASE);
-       *rev = orion_pcie_rev((void __iomem *)PCIE00_VIRT_BASE);
+       *dev = orion_pcie_dev_id(PCIE00_VIRT_BASE);
+       *rev = orion_pcie_rev(PCIE00_VIRT_BASE);
  }
  
 +u32 pcie_port_size[8] = {
 +      0,
 +      0x30000000,
 +      0x10000000,
 +      0x10000000,
 +      0x08000000,
 +      0x08000000,
 +      0x08000000,
 +      0x04000000,
 +};
 +
  static void __init mv78xx0_pcie_preinit(void)
  {
        int i;
@@@ -235,9 -279,9 +235,9 @@@ static void __init add_pcie_port(int ma
                pp->maj = maj;
                pp->min = min;
                pp->root_bus_nr = -1;
-               pp->base = (void __iomem *)base;
+               pp->base = base;
                spin_lock_init(&pp->conf_lock);
 -              memset(pp->res, 0, sizeof(pp->res));
 +              memset(&pp->res, 0, sizeof(pp->res));
        } else {
                printk("link down, ignoring\n");
        }
index 6ea8998ab8f13ed5edc14c203d13f453f38b5a08,21435581b92b625c6770a3be75ae83fa9b810bf9..cbe5664430638e948e4246f78c59200302321136
@@@ -1,4 -1,2 +1,4 @@@
 +ccflags-$(ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
 +
  obj-y += system-controller.o
- obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o
+ obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o
Simple merge
index 25f0ca8d78205bfe44336c15ad06fa625d895c39,0000000000000000000000000000000000000000..aac9bebc6b03da7f865381f1efa335a4c31532b2
mode 100644,000000..100644
--- /dev/null
@@@ -1,22 -1,0 +1,22 @@@
- #define ARMADA_370_XP_REGS_VIRT_BASE  0xfeb00000
 +/*
 + * Generic definitions for Marvell Armada_370_XP SoCs
 + *
 + * Copyright (C) 2012 Marvell
 + *
 + * Lior Amsalem <alior@marvell.com>
 + * Gregory CLEMENT <gregory.clement@free-electrons.com>
 + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 + *
 + * This file is licensed under the terms of the GNU General Public
 + * License version 2.  This program is licensed "as is" without any
 + * warranty of any kind, whether express or implied.
 + */
 +
 +#ifndef __MACH_ARMADA_370_XP_H
 +#define __MACH_ARMADA_370_XP_H
 +
 +#define ARMADA_370_XP_REGS_PHYS_BASE  0xd0000000
++#define ARMADA_370_XP_REGS_VIRT_BASE  IOMEM(0xfeb00000)
 +#define ARMADA_370_XP_REGS_SIZE               SZ_1M
 +
 +#endif /* __MACH_ARMADA_370_XP_H */
index 5387fdfcaf3f1b52aaf4f2fbdaa7015becb0ef51,58b754ff701c2e5c96c6632becfef26e3b7ab607..3e07f52f2127f855571984f7324963d8b054f7a5
@@@ -46,8 -46,18 +46,8 @@@ static struct map_desc orion5x_io_desc[
                .pfn            = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
                .length         = ORION5X_REGS_SIZE,
                .type           = MT_DEVICE,
 -      }, {
 -              .virtual        = (unsigned long) ORION5X_PCIE_IO_VIRT_BASE,
 -              .pfn            = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
 -              .length         = ORION5X_PCIE_IO_SIZE,
 -              .type           = MT_DEVICE,
 -      }, {
 -              .virtual        = (unsigned long) ORION5X_PCI_IO_VIRT_BASE,
 -              .pfn            = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
 -              .length         = ORION5X_PCI_IO_SIZE,
 -              .type           = MT_DEVICE,
        }, {
-               .virtual        = ORION5X_PCIE_WA_VIRT_BASE,
+               .virtual        = (unsigned long) ORION5X_PCIE_WA_VIRT_BASE,
                .pfn            = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
                .length         = ORION5X_PCIE_WA_SIZE,
                .type           = MT_DEVICE,
Simple merge
index 1b60131b7f60828088b45e55de057d5ce6d13e2b,6fd38ab5e267c4c57ce07548d8cb7ddbbec9cc5c..d265f5484a8e6934a7a1105c196539d27e6d3b15
   * fc000000   device bus mappings (cs0/cs1)
   *
   * virt               phys            size
 - * fdd00000   f1000000        1M      on-chip peripheral registers
 - * fde00000   f2000000        1M      PCIe I/O space
 - * fdf00000   f2100000        1M      PCI I/O space
 - * fe000000   f0000000        16M     PCIe WA space (Orion-1/Orion-NAS only)
 + * fe000000   f1000000        1M      on-chip peripheral registers
 + * fee00000   f2000000        64K     PCIe I/O space
 + * fee10000   f2100000        64K     PCI I/O space
 + * fd000000   f0000000        16M     PCIe WA space (Orion-1/Orion-NAS only)
   ****************************************************************************/
  #define ORION5X_REGS_PHYS_BASE                0xf1000000
- #define ORION5X_REGS_VIRT_BASE                0xfe000000
 -#define ORION5X_REGS_VIRT_BASE                IOMEM(0xfdd00000)
++#define ORION5X_REGS_VIRT_BASE                IOMEM(0xfe000000)
  #define ORION5X_REGS_SIZE             SZ_1M
  
  #define ORION5X_PCIE_IO_PHYS_BASE     0xf2000000
@@@ -53,7 -55,7 +53,7 @@@
  
  /* Relevant only for Orion-1/Orion-NAS */
  #define ORION5X_PCIE_WA_PHYS_BASE     0xf0000000
- #define ORION5X_PCIE_WA_VIRT_BASE     0xfd000000
 -#define ORION5X_PCIE_WA_VIRT_BASE     IOMEM(0xfe000000)
++#define ORION5X_PCIE_WA_VIRT_BASE     IOMEM(0xfd000000)
  #define ORION5X_PCIE_WA_SIZE          SZ_16M
  
  #define ORION5X_PCIE_MEM_PHYS_BASE    0xe0000000
index e152641cdb0e3e57b0059e87e9f8d97588f48f3b,bf9ff4f008188272b0637e28c104501a69771cb6..30a192b9c51730da9dfb94ccdf93128ceb8143de
@@@ -12,8 -12,8 +12,9 @@@
  #include <linux/gpio.h>
  #include <linux/kernel.h>
  #include <linux/irq.h>
+ #include <linux/io.h>
  #include <mach/bridge-regs.h>
 +#include <plat/orion-gpio.h>
  #include <plat/irq.h>
  
  static int __initdata gpio0_irqs[4] = {
Simple merge
Simple merge
Simple merge