aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-07-13 17:27:22 -0400
committerRob Herring <rob.herring@calxeda.com>2012-07-26 10:09:57 -0400
commit68ef63227b131a83732753f9fcd258319c37c1c3 (patch)
tree6008795f34f7644ae227da4931c841e34e9d32d3 /arch/arm/mach-integrator
parentd94c7a04b84e825b7cdeb112a11935ec0e70afd7 (diff)
ARM: integrator: use fixed PCI i/o mapping
Move integrator PCI to fixed i/o mapping and remove io.h. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/include/mach/io.h33
-rw-r--r--arch/arm/mach-integrator/include/mach/platform.h4
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c9
-rw-r--r--arch/arm/mach-integrator/pci_v3.c4
4 files changed, 7 insertions, 43 deletions
diff --git a/arch/arm/mach-integrator/include/mach/io.h b/arch/arm/mach-integrator/include/mach/io.h
deleted file mode 100644
index 8de70de3dd0a..000000000000
--- a/arch/arm/mach-integrator/include/mach/io.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * arch/arm/mach-integrator/include/mach/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23/*
24 * WARNING: this has to mirror definitions in platform.h
25 */
26#define PCI_MEMORY_VADDR 0xe8000000
27#define PCI_CONFIG_VADDR 0xec000000
28#define PCI_V3_VADDR 0xed000000
29#define PCI_IO_VADDR 0xee000000
30
31#define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a)))
32
33#endif
diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/include/mach/platform.h
index ec467baade09..4c0347526851 100644
--- a/arch/arm/mach-integrator/include/mach/platform.h
+++ b/arch/arm/mach-integrator/include/mach/platform.h
@@ -324,6 +324,10 @@
324 */ 324 */
325#define PHYS_PCI_V3_BASE 0x62000000 325#define PHYS_PCI_V3_BASE 0x62000000
326 326
327#define PCI_MEMORY_VADDR 0xe8000000
328#define PCI_CONFIG_VADDR 0xec000000
329#define PCI_V3_VADDR 0xed000000
330
327/* ------------------------------------------------------------------------ 331/* ------------------------------------------------------------------------
328 * Integrator Interrupt Controllers 332 * Integrator Interrupt Controllers
329 * ------------------------------------------------------------------------ 333 * ------------------------------------------------------------------------
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index c857501c5783..fd3bdf8f7223 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -49,6 +49,7 @@
49#include <asm/mach/arch.h> 49#include <asm/mach/arch.h>
50#include <asm/mach/irq.h> 50#include <asm/mach/irq.h>
51#include <asm/mach/map.h> 51#include <asm/mach/map.h>
52#include <asm/mach/pci.h>
52#include <asm/mach/time.h> 53#include <asm/mach/time.h>
53 54
54#include <plat/fpga-irq.h> 55#include <plat/fpga-irq.h>
@@ -72,7 +73,7 @@
72 * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M) 73 * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M)
73 * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M) 74 * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M)
74 * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k) 75 * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k)
75 * ee000000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M) 76 * fee00000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M)
76 * ef000000 Cache flush 77 * ef000000 Cache flush
77 * f1000000 10000000 Core module registers 78 * f1000000 10000000 Core module registers
78 * f1100000 11000000 System controller registers 79 * f1100000 11000000 System controller registers
@@ -146,11 +147,6 @@ static struct map_desc ap_io_desc[] __initdata = {
146 .pfn = __phys_to_pfn(PHYS_PCI_V3_BASE), 147 .pfn = __phys_to_pfn(PHYS_PCI_V3_BASE),
147 .length = SZ_64K, 148 .length = SZ_64K,
148 .type = MT_DEVICE 149 .type = MT_DEVICE
149 }, {
150 .virtual = PCI_IO_VADDR,
151 .pfn = __phys_to_pfn(PHYS_PCI_IO_BASE),
152 .length = SZ_64K,
153 .type = MT_DEVICE
154 } 150 }
155}; 151};
156 152
@@ -158,6 +154,7 @@ static void __init ap_map_io(void)
158{ 154{
159 iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); 155 iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc));
160 vga_base = PCI_MEMORY_VADDR; 156 vga_base = PCI_MEMORY_VADDR;
157 pci_map_io_early(__phys_to_pfn(PHYS_PCI_IO_BASE));
161} 158}
162 159
163#define INTEGRATOR_SC_VALID_INT 0x003fffff 160#define INTEGRATOR_SC_VALID_INT 0x003fffff
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index b866880e82ac..3a1305ba9ac9 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -374,12 +374,9 @@ static int __init pci_v3_setup_resources(struct pci_sys_data *sys)
374 } 374 }
375 375
376 /* 376 /*
377 * the IO resource for this bus
378 * the mem resource for this bus 377 * the mem resource for this bus
379 * the prefetch mem resource for this bus 378 * the prefetch mem resource for this bus
380 */ 379 */
381 pci_add_resource_offset(&sys->resources,
382 &ioport_resource, sys->io_offset);
383 pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset); 380 pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset);
384 pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset); 381 pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset);
385 382
@@ -498,7 +495,6 @@ void __init pci_v3_preinit(void)
498 unsigned int temp; 495 unsigned int temp;
499 int ret; 496 int ret;
500 497
501 pcibios_min_io = 0x6000;
502 pcibios_min_mem = 0x00100000; 498 pcibios_min_mem = 0x00100000;
503 499
504 /* 500 /*