diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-05-13 18:56:31 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe2.(none)> | 2009-06-11 15:02:22 -0400 |
commit | d7c4f1b78afeedfc22b1756fcdc1acbe84284d74 (patch) | |
tree | 62e74285b3f9093b7261ddc6b90831f9892dbf8e | |
parent | 3aef392822e1a42e80077a332ea2efdfd8a4248a (diff) |
asm-generic: make pci.h usable directly
Some generic code is using the horribly misnamed PCI_DMA_BUS_IS_PHYS
from asm/pci.h. This makes sure that an architecture without PCI
support does not have to define this itself but can rely on the
asm-generic version.
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/frv/include/asm/pci.h | 13 | ||||
-rw-r--r-- | arch/m32r/include/asm/pci.h | 2 | ||||
-rw-r--r-- | include/asm-generic/pci.h | 8 |
3 files changed, 11 insertions, 12 deletions
diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h index 585d9b49949a..3ce227ba7744 100644 --- a/arch/frv/include/asm/pci.h +++ b/arch/frv/include/asm/pci.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef ASM_PCI_H | 13 | #ifndef _ASM_FRV_PCI_H |
14 | #define ASM_PCI_H | 14 | #define _ASM_FRV_PCI_H |
15 | 15 | ||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <asm/scatterlist.h> | 17 | #include <asm/scatterlist.h> |
@@ -43,12 +43,6 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, | |||
43 | /* Return the index of the PCI controller for device PDEV. */ | 43 | /* Return the index of the PCI controller for device PDEV. */ |
44 | #define pci_controller_num(PDEV) (0) | 44 | #define pci_controller_num(PDEV) (0) |
45 | 45 | ||
46 | /* The PCI address space does equal the physical memory | ||
47 | * address space. The networking and block device layers use | ||
48 | * this boolean for bounce buffer decisions. | ||
49 | */ | ||
50 | #define PCI_DMA_BUS_IS_PHYS (1) | ||
51 | |||
52 | /* pci_unmap_{page,single} is a nop so... */ | 46 | /* pci_unmap_{page,single} is a nop so... */ |
53 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | 47 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) |
54 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | 48 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) |
@@ -114,5 +108,4 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev, | |||
114 | sg_dma_address(&sg[i])+sg_dma_len(&sg[i])); | 108 | sg_dma_address(&sg[i])+sg_dma_len(&sg[i])); |
115 | } | 109 | } |
116 | 110 | ||
117 | 111 | #endif /* _ASM_FRV_PCI_H */ | |
118 | #endif | ||
diff --git a/arch/m32r/include/asm/pci.h b/arch/m32r/include/asm/pci.h index fe785d167db6..07d3834c6dec 100644 --- a/arch/m32r/include/asm/pci.h +++ b/arch/m32r/include/asm/pci.h | |||
@@ -3,6 +3,4 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/pci.h> | 4 | #include <asm-generic/pci.h> |
5 | 5 | ||
6 | #define PCI_DMA_BUS_IS_PHYS (1) | ||
7 | |||
8 | #endif /* _ASM_M32R_PCI_H */ | 6 | #endif /* _ASM_M32R_PCI_H */ |
diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h index c36a77d3bf44..515c6e2e3218 100644 --- a/include/asm-generic/pci.h +++ b/include/asm-generic/pci.h | |||
@@ -52,4 +52,12 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
52 | } | 52 | } |
53 | #endif /* HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ */ | 53 | #endif /* HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ */ |
54 | 54 | ||
55 | /* | ||
56 | * By default, assume that no iommu is in use and that the PCI | ||
57 | * space is mapped to address physical 0. | ||
58 | */ | ||
59 | #ifndef PCI_DMA_BUS_IS_PHYS | ||
60 | #define PCI_DMA_BUS_IS_PHYS (1) | ||
55 | #endif | 61 | #endif |
62 | |||
63 | #endif /* _ASM_GENERIC_PCI_H */ | ||