5 /* Values for the `which' argument to sys_pciconfig_iobase syscall. */
6 #define IOBASE_BRIDGE_NUMBER 0
7 #define IOBASE_MEMORY 1
11 /* Can be used to override the logic in pci_scan_bus for skipping
12 * already-configured bus numbers - to be used for buggy BIOSes
13 * or architectures with incomplete PCI setup by the loader.
15 #define pcibios_assign_all_busses() 0
17 #define PCIBIOS_MIN_IO 0x1000
18 #define PCIBIOS_MIN_MEM 0x10000000
20 extern inline void pcibios_set_master(struct pci_dev
*dev
)
22 /* No special bus mastering setup handling */
25 extern inline void pcibios_penalize_isa_irq(int irq
)
27 /* We don't do dynamic PCI IRQ allocation */
30 /* Dynamic DMA Mapping stuff
34 #include <linux/types.h>
35 #include <linux/slab.h>
36 #include <linux/string.h>
37 #include <asm/scatterlist.h>
42 extern void *pci_alloc_consistent(struct pci_dev
*hwdev
, size_t size
,
43 dma_addr_t
*dma_handle
);
44 extern void pci_free_consistent(struct pci_dev
*hwdev
, size_t size
,
45 void *vaddr
, dma_addr_t dma_handle
);
46 extern inline dma_addr_t
pci_map_single(struct pci_dev
*hwdev
, void *ptr
,
47 size_t size
, int direction
)
49 if (direction
== PCI_DMA_NONE
)
51 return virt_to_bus(ptr
);
53 extern inline void pci_unmap_single(struct pci_dev
*hwdev
, dma_addr_t dma_addr
,
54 size_t size
, int direction
)
56 if (direction
== PCI_DMA_NONE
)
60 extern inline int pci_map_sg(struct pci_dev
*hwdev
, struct scatterlist
*sg
,
61 int nents
, int direction
)
63 if (direction
== PCI_DMA_NONE
)
67 extern inline void pci_unmap_sg(struct pci_dev
*hwdev
, struct scatterlist
*sg
,
68 int nents
, int direction
)
70 if (direction
== PCI_DMA_NONE
)
74 extern inline void pci_dma_sync_single(struct pci_dev
*hwdev
,
75 dma_addr_t dma_handle
,
76 size_t size
, int direction
)
78 if (direction
== PCI_DMA_NONE
)
83 extern inline void pci_dma_sync_sg(struct pci_dev
*hwdev
,
84 struct scatterlist
*sg
,
85 int nelems
, int direction
)
87 if (direction
== PCI_DMA_NONE
)
92 /* Return whether the given PCI device DMA address mask can
93 * be supported properly. For example, if your device can
94 * only drive the low 24-bits during PCI bus mastering, then
95 * you would pass 0x00ffffff as the mask to this function.
97 extern inline int pci_dma_supported(struct pci_dev
*hwdev
, dma_addr_t mask
)
102 #define sg_dma_address(sg) (virt_to_bus((sg)->address))
103 #define sg_dma_len(sg) ((sg)->length)
105 #endif /* __KERNEL__ */
107 #endif /* __PPC_PCI_H */