From: Olof Johansson Date: Sat, 22 Sep 2012 21:09:21 +0000 (-0700) Subject: Merge branch 'kirkwood/addr_decode' of git://git.infradead.org/users/jcooper/linux... X-Git-Tag: v3.7-rc1~99^2^2~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0d601f613b8557cf6489f06251ae5dc383b811d0;p=linux.git Merge branch 'kirkwood/addr_decode' of git://git.infradead.org/users/jcooper/linux into late/kirkwood * '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 --- 0d601f613b8557cf6489f06251ae5dc383b811d0 diff --cc arch/arm/Kconfig index 5876aef72dfe,a4eab57bee2f..70505d8f85c5 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@@ -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), diff --cc arch/arm/mach-dove/pcie.c index 355332d502cb,b3724414fd1a..bb15b26041cb --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c @@@ -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"); } diff --cc arch/arm/mach-kirkwood/common.c index 5c38c94b79a2,55bf9198caeb..3991077f58a2 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@@ -42,7 -42,17 +42,7 @@@ ****************************************************************************/ 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, diff --cc arch/arm/mach-kirkwood/include/mach/kirkwood.h index af4f0000dcef,d3ea68269c90..041653a04a9c --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h @@@ -37,15 -37,17 +37,15 @@@ #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 diff --cc arch/arm/mach-kirkwood/irq.c index 20149a7fd280,f4ac804dc664..884703535a0a --- a/arch/arm/mach-kirkwood/irq.c +++ b/arch/arm/mach-kirkwood/irq.c @@@ -10,8 -10,8 +10,9 @@@ #include #include #include + #include #include +#include #include static int __initdata gpio0_irqs[4] = { diff --cc arch/arm/mach-kirkwood/pcie.c index 532d8acb38f9,df6399dea745..ec544918b12c --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c @@@ -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 */ @@@ -147,9 -155,17 +147,9 @@@ 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 */ diff --cc arch/arm/mach-mv78xx0/common.c index a6f3cd21e8c2,f123517a4bb8..131cd4883f3d --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c @@@ -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, diff --cc arch/arm/mach-mv78xx0/include/mach/mv78xx0.h index bd03fed1128e,62405e8dda0e..46200a183cf2 --- a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h +++ b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h @@@ -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 diff --cc arch/arm/mach-mv78xx0/irq.c index 4d720f2aedba,b5c40c4f524e..32073444024b --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c @@@ -10,8 -10,8 +10,9 @@@ #include #include #include + #include #include +#include #include #include "common.h" diff --cc arch/arm/mach-mv78xx0/pcie.c index 26a059b4f472,e2940fbbcd68..a9a154a646dd --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c @@@ -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"); } diff --cc arch/arm/mach-mvebu/Makefile index 6ea8998ab8f1,21435581b92b..cbe566443063 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@@ -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 diff --cc arch/arm/mach-orion5x/common.c index 5387fdfcaf3f,58b754ff701c..3e07f52f2127 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@@ -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, diff --cc arch/arm/mach-orion5x/include/mach/orion5x.h index 1b60131b7f60,6fd38ab5e267..d265f5484a8e --- a/arch/arm/mach-orion5x/include/mach/orion5x.h +++ b/arch/arm/mach-orion5x/include/mach/orion5x.h @@@ -31,13 -31,13 +31,13 @@@ * 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 diff --cc arch/arm/mach-orion5x/irq.c index e152641cdb0e,bf9ff4f00818..30a192b9c517 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c @@@ -12,8 -12,8 +12,9 @@@ #include #include #include + #include #include +#include #include static int __initdata gpio0_irqs[4] = {