diff options
Diffstat (limited to 'arch/arm/mach-integrator/pci_v3.c')
-rw-r--r-- | arch/arm/mach-integrator/pci_v3.c | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 059ac4e8a67e..a3cefdebd136 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -34,10 +34,28 @@ | |||
34 | #include <mach/platform.h> | 34 | #include <mach/platform.h> |
35 | #include <mach/irqs.h> | 35 | #include <mach/irqs.h> |
36 | 36 | ||
37 | #include <asm/mach/map.h> | ||
37 | #include <asm/signal.h> | 38 | #include <asm/signal.h> |
38 | #include <asm/mach/pci.h> | 39 | #include <asm/mach/pci.h> |
39 | #include <asm/irq_regs.h> | 40 | #include <asm/irq_regs.h> |
40 | 41 | ||
42 | #include "pci_v3.h" | ||
43 | |||
44 | /* | ||
45 | * Where in the memory map does PCI live? | ||
46 | * | ||
47 | * This represents a fairly liberal usage of address space. Even though | ||
48 | * the V3 only has two windows (therefore we need to map stuff on the fly), | ||
49 | * we maintain the same addresses, even if they're not mapped. | ||
50 | */ | ||
51 | #define PHYS_PCI_MEM_BASE 0x40000000 /* 512M */ | ||
52 | #define PHYS_PCI_IO_BASE 0x60000000 /* 16M */ | ||
53 | #define PHYS_PCI_CONFIG_BASE 0x61000000 /* 16M */ | ||
54 | #define PHYS_PCI_V3_BASE 0x62000000 /* 64K */ | ||
55 | |||
56 | #define PCI_MEMORY_VADDR IOMEM(0xe8000000) | ||
57 | #define PCI_CONFIG_VADDR IOMEM(0xec000000) | ||
58 | |||
41 | /* | 59 | /* |
42 | * V3 Local Bus to PCI Bridge definitions | 60 | * V3 Local Bus to PCI Bridge definitions |
43 | * | 61 | * |
@@ -851,7 +869,6 @@ static int __init pci_v3_probe(struct platform_device *pdev) | |||
851 | return -ENODEV; | 869 | return -ENODEV; |
852 | } | 870 | } |
853 | 871 | ||
854 | vga_base = (unsigned long)PCI_MEMORY_VADDR; | ||
855 | pci_common_init(&pci_v3); | 872 | pci_common_init(&pci_v3); |
856 | 873 | ||
857 | return 0; | 874 | return 0; |
@@ -869,3 +886,32 @@ static int __init pci_v3_init(void) | |||
869 | } | 886 | } |
870 | 887 | ||
871 | subsys_initcall(pci_v3_init); | 888 | subsys_initcall(pci_v3_init); |
889 | |||
890 | /* | ||
891 | * Static mappings for the PCIv3 bridge | ||
892 | * | ||
893 | * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M) | ||
894 | * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M) | ||
895 | * fee00000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M) | ||
896 | */ | ||
897 | static struct map_desc pci_v3_io_desc[] __initdata __maybe_unused = { | ||
898 | { | ||
899 | .virtual = (unsigned long)PCI_MEMORY_VADDR, | ||
900 | .pfn = __phys_to_pfn(PHYS_PCI_MEM_BASE), | ||
901 | .length = SZ_16M, | ||
902 | .type = MT_DEVICE | ||
903 | }, { | ||
904 | .virtual = (unsigned long)PCI_CONFIG_VADDR, | ||
905 | .pfn = __phys_to_pfn(PHYS_PCI_CONFIG_BASE), | ||
906 | .length = SZ_16M, | ||
907 | .type = MT_DEVICE | ||
908 | } | ||
909 | }; | ||
910 | |||
911 | int __init pci_v3_early_init(void) | ||
912 | { | ||
913 | iotable_init(pci_v3_io_desc, ARRAY_SIZE(pci_v3_io_desc)); | ||
914 | vga_base = (unsigned long)PCI_MEMORY_VADDR; | ||
915 | pci_map_io_early(__phys_to_pfn(PHYS_PCI_IO_BASE)); | ||
916 | return 0; | ||
917 | } | ||