diff options
author | Miles Bader <miles@gnu.org> | 2005-07-27 14:44:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:03 -0400 |
commit | 8b2bf06994b9cd6067e5c7620e270eec73fef70b (patch) | |
tree | cd3f29e3c32ff6d8b09eb3fc9d3813bf939cef8f /include/asm-v850/pci.h | |
parent | 947ac8b9265e2a22552552d011db1e161f802a4a (diff) |
[PATCH] v850: Update PCI support
These changes are untested (I no longer have the hardware).
Signed-off-by: Miles Bader <miles@gnu.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 | } |