diff options
| author | Rob Herring <rob.herring@calxeda.com> | 2012-02-29 19:10:58 -0500 |
|---|---|---|
| committer | Rob Herring <rob.herring@calxeda.com> | 2012-07-25 10:26:42 -0400 |
| commit | c2794437091a4fda72c4a4f3567dd728dcc0c3c9 (patch) | |
| tree | 56e4d414f5b78bdf35822b38af5be021711a0970 /arch/arm/include/asm/mach | |
| parent | 701eb2647d7986b42fa973990649a83b3e15e8eb (diff) | |
ARM: Add fixed PCI i/o mapping
This adds a fixed virtual mapping for PCI i/o addresses. The mapping is
located at the last 2MB of vmalloc region (0xfee00000-0xff000000). 2MB
is used to align with PMD size, but IO_SPACE_LIMIT is 1MB. The space
is reserved after .map_io and can be mapped at any time later with
pci_ioremap_io. Platforms which need early i/o mapping (e.g. for vga
console) can call pci_map_io_early in their .map_io function.
This has changed completely from the 1st implementation which only
supported creating the static mapping at .map_io.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/mach')
| -rw-r--r-- | arch/arm/include/asm/mach/map.h | 8 | ||||
| -rw-r--r-- | arch/arm/include/asm/mach/pci.h | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index a6efcdd6fd2..195ac2f9d3d 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
| @@ -9,6 +9,9 @@ | |||
| 9 | * | 9 | * |
| 10 | * Page table mapping constructs and function prototypes | 10 | * Page table mapping constructs and function prototypes |
| 11 | */ | 11 | */ |
| 12 | #ifndef __ASM_MACH_MAP_H | ||
| 13 | #define __ASM_MACH_MAP_H | ||
| 14 | |||
| 12 | #include <asm/io.h> | 15 | #include <asm/io.h> |
| 13 | 16 | ||
| 14 | struct map_desc { | 17 | struct map_desc { |
| @@ -34,6 +37,8 @@ struct map_desc { | |||
| 34 | 37 | ||
| 35 | #ifdef CONFIG_MMU | 38 | #ifdef CONFIG_MMU |
| 36 | extern void iotable_init(struct map_desc *, int); | 39 | extern void iotable_init(struct map_desc *, int); |
| 40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, | ||
| 41 | void *caller); | ||
| 37 | 42 | ||
| 38 | struct mem_type; | 43 | struct mem_type; |
| 39 | extern const struct mem_type *get_mem_type(unsigned int type); | 44 | extern const struct mem_type *get_mem_type(unsigned int type); |
| @@ -44,4 +49,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys, | |||
| 44 | const struct mem_type *mtype); | 49 | const struct mem_type *mtype); |
| 45 | #else | 50 | #else |
| 46 | #define iotable_init(map,num) do { } while (0) | 51 | #define iotable_init(map,num) do { } while (0) |
| 52 | #define vm_reserve_area_early(a,s,c) do { } while (0) | ||
| 53 | #endif | ||
| 54 | |||
| 47 | #endif | 55 | #endif |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 26c511fddf8..df818876fa3 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #ifndef __ASM_MACH_PCI_H | 11 | #ifndef __ASM_MACH_PCI_H |
| 12 | #define __ASM_MACH_PCI_H | 12 | #define __ASM_MACH_PCI_H |
| 13 | 13 | ||
| 14 | |||
| 14 | struct pci_sys_data; | 15 | struct pci_sys_data; |
| 15 | struct pci_ops; | 16 | struct pci_ops; |
| 16 | struct pci_bus; | 17 | struct pci_bus; |
| @@ -55,6 +56,15 @@ struct pci_sys_data { | |||
| 55 | void pci_common_init(struct hw_pci *); | 56 | void pci_common_init(struct hw_pci *); |
| 56 | 57 | ||
| 57 | /* | 58 | /* |
| 59 | * Setup early fixed I/O mapping. | ||
| 60 | */ | ||
| 61 | #if defined(CONFIG_PCI) | ||
| 62 | extern void pci_map_io_early(unsigned long pfn); | ||
| 63 | #else | ||
| 64 | static inline void pci_map_io_early(unsigned long pfn) {} | ||
| 65 | #endif | ||
| 66 | |||
| 67 | /* | ||
| 58 | * PCI controllers | 68 | * PCI controllers |
| 59 | */ | 69 | */ |
| 60 | extern struct pci_ops iop3xx_ops; | 70 | extern struct pci_ops iop3xx_ops; |
