diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-11 21:24:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-11 21:24:58 -0500 |
commit | 13d7d84e078f49f08b657a3fba0d7a0b7b44ba65 (patch) | |
tree | ae4957d183e2f5fcae62b2c1411b4a32c2f71f21 /include/asm-powerpc/pci.h | |
parent | cbb8fc07974073543fdc61da23713ab49ddd3ced (diff) | |
parent | 73c9ceab40b1269d6195e556773167c078ac8311 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (36 commits)
[POWERPC] Generic BUG for powerpc
[PPC] Fix compile failure do to introduction of PHY_POLL
[POWERPC] Only export __mtdcr/__mfdcr if CONFIG_PPC_DCR is set
[POWERPC] Remove old dcr.S
[POWERPC] Fix SPU coredump code for max_fdset removal
[POWERPC] Fix irq routing on some 32-bit PowerMacs
[POWERPC] ps3: Add vuart support
[POWERPC] Support ibm,dynamic-reconfiguration-memory nodes
[POWERPC] dont allow pSeries_probe to succeed without initialising MMU
[POWERPC] micro optimise pSeries_probe
[POWERPC] Add SPURR SPR to sysfs
[POWERPC] Add DSCR SPR to sysfs
[POWERPC] Fix 440SPe CPU table entry
[POWERPC] Add support for FP emulation for the e300c2 core
[POWERPC] of_device_register: propagate device_create_file return code
[POWERPC] Fix mmap of PCI resource with hack for X
[POWERPC] iSeries: head_64.o needs to depend on lparmap.s
[POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group
[POWERPC] Remove QE header files from lite5200.c
[POWERPC] of_platform_make_bus_id(): make `magic' int
...
Diffstat (limited to 'include/asm-powerpc/pci.h')
-rw-r--r-- | include/asm-powerpc/pci.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 16f13319c769..ac656ee6bb19 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -143,8 +143,13 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | |||
143 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ | 143 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ |
144 | #define HAVE_PCI_MMAP 1 | 144 | #define HAVE_PCI_MMAP 1 |
145 | 145 | ||
146 | #ifdef CONFIG_PPC64 | 146 | #if defined(CONFIG_PPC64) || defined(CONFIG_NOT_COHERENT_CACHE) |
147 | /* pci_unmap_{single,page} is not a nop, thus... */ | 147 | /* |
148 | * For 64-bit kernels, pci_unmap_{single,page} is not a nop. | ||
149 | * For 32-bit non-coherent kernels, pci_dma_sync_single_for_cpu() and | ||
150 | * so on are not nops. | ||
151 | * and thus... | ||
152 | */ | ||
148 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | 153 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
149 | dma_addr_t ADDR_NAME; | 154 | dma_addr_t ADDR_NAME; |
150 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ | 155 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ |
@@ -158,6 +163,20 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | |||
158 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | 163 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ |
159 | (((PTR)->LEN_NAME) = (VAL)) | 164 | (((PTR)->LEN_NAME) = (VAL)) |
160 | 165 | ||
166 | #else /* 32-bit && coherent */ | ||
167 | |||
168 | /* pci_unmap_{page,single} is a nop so... */ | ||
169 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
170 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
171 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
172 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
173 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
174 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
175 | |||
176 | #endif /* CONFIG_PPC64 || CONFIG_NOT_COHERENT_CACHE */ | ||
177 | |||
178 | #ifdef CONFIG_PPC64 | ||
179 | |||
161 | /* The PCI address space does not equal the physical memory address | 180 | /* The PCI address space does not equal the physical memory address |
162 | * space (we have an IOMMU). The IDE and SCSI device layers use | 181 | * space (we have an IOMMU). The IDE and SCSI device layers use |
163 | * this boolean for bounce buffer decisions. | 182 | * this boolean for bounce buffer decisions. |
@@ -172,16 +191,8 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | |||
172 | */ | 191 | */ |
173 | #define PCI_DMA_BUS_IS_PHYS (1) | 192 | #define PCI_DMA_BUS_IS_PHYS (1) |
174 | 193 | ||
175 | /* pci_unmap_{page,single} is a nop so... */ | ||
176 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
177 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
178 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
179 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
180 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
181 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
182 | |||
183 | #endif /* CONFIG_PPC64 */ | 194 | #endif /* CONFIG_PPC64 */ |
184 | 195 | ||
185 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 196 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
186 | struct pci_bus_region *region, | 197 | struct pci_bus_region *region, |
187 | struct resource *res); | 198 | struct resource *res); |