diff options
Diffstat (limited to 'include/asm-v850/pci.h')
| -rw-r--r-- | include/asm-v850/pci.h | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/include/asm-v850/pci.h b/include/asm-v850/pci.h index 8e79be0fe99d..4581826e1cac 100644 --- a/include/asm-v850/pci.h +++ b/include/asm-v850/pci.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/asm-v850/pci.h -- PCI support | 2 | * include/asm-v850/pci.h -- PCI support |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2001,02 NEC Corporation | 4 | * Copyright (C) 2001,02,05 NEC Corporation |
| 5 | * Copyright (C) 2001,02 Miles Bader <miles@gnu.org> | 5 | * Copyright (C) 2001,02,05 Miles Bader <miles@gnu.org> |
| 6 | * | 6 | * |
| 7 | * This file is subject to the terms and conditions of the GNU General | 7 | * This file is subject to the terms and conditions of the GNU General |
| 8 | * Public License. See the file COPYING in the main directory of this | 8 | * Public License. See the file COPYING in the main directory of this |
| @@ -48,12 +48,12 @@ pci_unmap_single (struct pci_dev *pdev, dma_addr_t dma_addr, size_t size, | |||
| 48 | perform a pci_dma_sync_for_device, and then the device again owns | 48 | perform a pci_dma_sync_for_device, and then the device again owns |
| 49 | the buffer. */ | 49 | the buffer. */ |
| 50 | extern void | 50 | extern void |
| 51 | pci_dma_sync_single_for_cpu (struct pci_dev *dev, dma_addr_t dma_addr, size_t size, | 51 | pci_dma_sync_single_for_cpu (struct pci_dev *dev, dma_addr_t dma_addr, |
| 52 | int dir); | 52 | size_t size, int dir); |
| 53 | 53 | ||
| 54 | extern void | 54 | extern void |
| 55 | pci_dma_sync_single_for_device (struct pci_dev *dev, dma_addr_t dma_addr, size_t size, | 55 | pci_dma_sync_single_for_device (struct pci_dev *dev, dma_addr_t dma_addr, |
| 56 | int dir); | 56 | size_t size, int dir); |
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | /* Do multiple DMA mappings at once. */ | 59 | /* Do multiple DMA mappings at once. */ |
| @@ -65,6 +65,28 @@ extern void | |||
| 65 | pci_unmap_sg (struct pci_dev *pdev, struct scatterlist *sg, int sg_len, | 65 | pci_unmap_sg (struct pci_dev *pdev, struct scatterlist *sg, int sg_len, |
| 66 | int dir); | 66 | int dir); |
| 67 | 67 | ||
| 68 | /* SG-list versions of pci_dma_sync functions. */ | ||
| 69 | extern void | ||
| 70 | pci_dma_sync_sg_for_cpu (struct pci_dev *dev, | ||
| 71 | struct scatterlist *sg, int sg_len, | ||
| 72 | int dir); | ||
| 73 | extern void | ||
| 74 | pci_dma_sync_sg_for_device (struct pci_dev *dev, | ||
| 75 | struct scatterlist *sg, int sg_len, | ||
| 76 | int dir); | ||
| 77 | |||
| 78 | #define pci_map_page(dev, page, offs, size, dir) \ | ||
| 79 | pci_map_single(dev, (page_address(page) + (offs)), size, dir) | ||
| 80 | #define pci_unmap_page(dev,addr,sz,dir) \ | ||
| 81 | pci_unmap_single(dev, addr, sz, dir) | ||
| 82 | |||
| 83 | /* Test for pci_map_single or pci_map_page having generated an error. */ | ||
| 84 | static inline int | ||
| 85 | pci_dma_mapping_error (dma_addr_t dma_addr) | ||
| 86 | { | ||
| 87 | return dma_addr == 0; | ||
| 88 | } | ||
| 89 | |||
| 68 | /* Allocate and map kernel buffer using consistent mode DMA for PCI | 90 | /* Allocate and map kernel buffer using consistent mode DMA for PCI |
| 69 | device. Returns non-NULL cpu-view pointer to the buffer if | 91 | device. Returns non-NULL cpu-view pointer to the buffer if |
| 70 | successful and sets *DMA_ADDR to the pci side dma address as well, | 92 | successful and sets *DMA_ADDR to the pci side dma address as well, |
| @@ -91,6 +113,9 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
| 91 | } | 113 | } |
| 92 | #endif | 114 | #endif |
| 93 | 115 | ||
| 116 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
| 117 | extern void pci_iounmap (struct pci_dev *dev, void __iomem *addr); | ||
| 118 | |||
| 94 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | 119 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) |
| 95 | { | 120 | { |
| 96 | } | 121 | } |
