diff options
-rw-r--r-- | arch/arm/mach-iop13xx/pci.c | 8 | ||||
-rw-r--r-- | include/asm-arm/arch-iop13xx/iop13xx.h | 22 |
2 files changed, 17 insertions, 13 deletions
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 89ec70ea3187..d907a2aadfe6 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c | |||
@@ -1023,7 +1023,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) | |||
1023 | << IOP13XX_ATUX_PCIXSR_FUNC_NUM; | 1023 | << IOP13XX_ATUX_PCIXSR_FUNC_NUM; |
1024 | __raw_writel(pcixsr, IOP13XX_ATUX_PCIXSR); | 1024 | __raw_writel(pcixsr, IOP13XX_ATUX_PCIXSR); |
1025 | 1025 | ||
1026 | res[0].start = IOP13XX_PCIX_LOWER_IO_PA; | 1026 | res[0].start = IOP13XX_PCIX_LOWER_IO_PA + IOP13XX_PCIX_IO_BUS_OFFSET; |
1027 | res[0].end = IOP13XX_PCIX_UPPER_IO_PA; | 1027 | res[0].end = IOP13XX_PCIX_UPPER_IO_PA; |
1028 | res[0].name = "IQ81340 ATUX PCI I/O Space"; | 1028 | res[0].name = "IQ81340 ATUX PCI I/O Space"; |
1029 | res[0].flags = IORESOURCE_IO; | 1029 | res[0].flags = IORESOURCE_IO; |
@@ -1033,7 +1033,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) | |||
1033 | res[1].name = "IQ81340 ATUX PCI Memory Space"; | 1033 | res[1].name = "IQ81340 ATUX PCI Memory Space"; |
1034 | res[1].flags = IORESOURCE_MEM; | 1034 | res[1].flags = IORESOURCE_MEM; |
1035 | sys->mem_offset = IOP13XX_PCIX_MEM_OFFSET; | 1035 | sys->mem_offset = IOP13XX_PCIX_MEM_OFFSET; |
1036 | sys->io_offset = IOP13XX_PCIX_IO_OFFSET; | 1036 | sys->io_offset = IOP13XX_PCIX_LOWER_IO_PA; |
1037 | break; | 1037 | break; |
1038 | case IOP13XX_INIT_ATU_ATUE: | 1038 | case IOP13XX_INIT_ATU_ATUE: |
1039 | /* Note: the function number field in the PCSR is ro */ | 1039 | /* Note: the function number field in the PCSR is ro */ |
@@ -1044,7 +1044,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) | |||
1044 | 1044 | ||
1045 | __raw_writel(pcsr, IOP13XX_ATUE_PCSR); | 1045 | __raw_writel(pcsr, IOP13XX_ATUE_PCSR); |
1046 | 1046 | ||
1047 | res[0].start = IOP13XX_PCIE_LOWER_IO_PA; | 1047 | res[0].start = IOP13XX_PCIE_LOWER_IO_PA + IOP13XX_PCIE_IO_BUS_OFFSET; |
1048 | res[0].end = IOP13XX_PCIE_UPPER_IO_PA; | 1048 | res[0].end = IOP13XX_PCIE_UPPER_IO_PA; |
1049 | res[0].name = "IQ81340 ATUE PCI I/O Space"; | 1049 | res[0].name = "IQ81340 ATUE PCI I/O Space"; |
1050 | res[0].flags = IORESOURCE_IO; | 1050 | res[0].flags = IORESOURCE_IO; |
@@ -1054,7 +1054,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) | |||
1054 | res[1].name = "IQ81340 ATUE PCI Memory Space"; | 1054 | res[1].name = "IQ81340 ATUE PCI Memory Space"; |
1055 | res[1].flags = IORESOURCE_MEM; | 1055 | res[1].flags = IORESOURCE_MEM; |
1056 | sys->mem_offset = IOP13XX_PCIE_MEM_OFFSET; | 1056 | sys->mem_offset = IOP13XX_PCIE_MEM_OFFSET; |
1057 | sys->io_offset = IOP13XX_PCIE_IO_OFFSET; | 1057 | sys->io_offset = IOP13XX_PCIE_LOWER_IO_PA; |
1058 | sys->map_irq = iop13xx_pcie_map_irq; | 1058 | sys->map_irq = iop13xx_pcie_map_irq; |
1059 | break; | 1059 | break; |
1060 | default: | 1060 | default: |
diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/include/asm-arm/arch-iop13xx/iop13xx.h index d26b755a9879..2d1e23ba67c6 100644 --- a/include/asm-arm/arch-iop13xx/iop13xx.h +++ b/include/asm-arm/arch-iop13xx/iop13xx.h | |||
@@ -27,19 +27,24 @@ static inline int iop13xx_cpu_id(void) | |||
27 | #define IOP13XX_PCI_OFFSET IOP13XX_MAX_RAM_SIZE | 27 | #define IOP13XX_PCI_OFFSET IOP13XX_MAX_RAM_SIZE |
28 | 28 | ||
29 | /* PCI MAP | 29 | /* PCI MAP |
30 | * 0x0000.0000 - 0x8000.0000 1:1 mapping with Physical RAM | 30 | * bus range cpu phys cpu virt note |
31 | * 0x8000.0000 - 0x8800.0000 PCIX/PCIE memory window (128MB) | 31 | * 0x0000.0000 + 2GB (n/a) (n/a) inbound, 1:1 mapping with Physical RAM |
32 | */ | 32 | * 0x8000.0000 + 928M 0x1.8000.0000 (ioremap) PCIX outbound memory window |
33 | * 0x8000.0000 + 928M 0x2.8000.0000 (ioremap) PCIE outbound memory window | ||
34 | * | ||
35 | * IO MAP | ||
36 | * 0x1000 + 64K 0x0.fffb.1000 0xfec6.1000 PCIX outbound i/o window | ||
37 | * 0x1000 + 64K 0x0.fffd.1000 0xfed7.1000 PCIE outbound i/o window | ||
38 | */ | ||
33 | #define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL | 39 | #define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL |
34 | #define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL | 40 | #define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL |
35 | #define IOP13XX_PCIX_LOWER_IO_VA 0xfec60000UL | 41 | #define IOP13XX_PCIX_LOWER_IO_VA 0xfec60000UL |
36 | #define IOP13XX_PCIX_LOWER_IO_BA 0x0fff0000UL | 42 | #define IOP13XX_PCIX_LOWER_IO_BA 0x0UL /* OIOTVR */ |
43 | #define IOP13XX_PCIX_IO_BUS_OFFSET 0x1000UL | ||
37 | #define IOP13XX_PCIX_UPPER_IO_PA (IOP13XX_PCIX_LOWER_IO_PA +\ | 44 | #define IOP13XX_PCIX_UPPER_IO_PA (IOP13XX_PCIX_LOWER_IO_PA +\ |
38 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) | 45 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) |
39 | #define IOP13XX_PCIX_UPPER_IO_VA (IOP13XX_PCIX_LOWER_IO_VA +\ | 46 | #define IOP13XX_PCIX_UPPER_IO_VA (IOP13XX_PCIX_LOWER_IO_VA +\ |
40 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) | 47 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) |
41 | #define IOP13XX_PCIX_IO_OFFSET (IOP13XX_PCIX_LOWER_IO_VA -\ | ||
42 | IOP13XX_PCIX_LOWER_IO_BA) | ||
43 | #define IOP13XX_PCIX_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | 48 | #define IOP13XX_PCIX_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ |
44 | (IOP13XX_PCIX_LOWER_IO_PA\ | 49 | (IOP13XX_PCIX_LOWER_IO_PA\ |
45 | - IOP13XX_PCIX_LOWER_IO_VA)) | 50 | - IOP13XX_PCIX_LOWER_IO_VA)) |
@@ -65,15 +70,14 @@ static inline int iop13xx_cpu_id(void) | |||
65 | #define IOP13XX_PCIE_IO_WINDOW_SIZE 0x10000UL | 70 | #define IOP13XX_PCIE_IO_WINDOW_SIZE 0x10000UL |
66 | #define IOP13XX_PCIE_LOWER_IO_PA 0xfffd0000UL | 71 | #define IOP13XX_PCIE_LOWER_IO_PA 0xfffd0000UL |
67 | #define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL | 72 | #define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL |
68 | #define IOP13XX_PCIE_LOWER_IO_BA 0x0fff0000UL | 73 | #define IOP13XX_PCIE_LOWER_IO_BA 0x0UL /* OIOTVR */ |
74 | #define IOP13XX_PCIE_IO_BUS_OFFSET 0x1000UL | ||
69 | #define IOP13XX_PCIE_UPPER_IO_PA (IOP13XX_PCIE_LOWER_IO_PA +\ | 75 | #define IOP13XX_PCIE_UPPER_IO_PA (IOP13XX_PCIE_LOWER_IO_PA +\ |
70 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | 76 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) |
71 | #define IOP13XX_PCIE_UPPER_IO_VA (IOP13XX_PCIE_LOWER_IO_VA +\ | 77 | #define IOP13XX_PCIE_UPPER_IO_VA (IOP13XX_PCIE_LOWER_IO_VA +\ |
72 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | 78 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) |
73 | #define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\ | 79 | #define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\ |
74 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | 80 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) |
75 | #define IOP13XX_PCIE_IO_OFFSET (IOP13XX_PCIE_LOWER_IO_VA -\ | ||
76 | IOP13XX_PCIE_LOWER_IO_BA) | ||
77 | #define IOP13XX_PCIE_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | 81 | #define IOP13XX_PCIE_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ |
78 | (IOP13XX_PCIE_LOWER_IO_PA\ | 82 | (IOP13XX_PCIE_LOWER_IO_PA\ |
79 | - IOP13XX_PCIE_LOWER_IO_VA)) | 83 | - IOP13XX_PCIE_LOWER_IO_VA)) |