4 /* Can be used to override the logic in pci_scan_bus for skipping
5 * already-configured bus numbers - to be used for buggy BIOSes
6 * or architectures with incomplete PCI setup by the loader.
8 #define pcibios_assign_all_busses() 0
10 #define PCIBIOS_MIN_IO 0x1000
11 #define PCIBIOS_MIN_MEM 0x10000000
13 extern inline void pcibios_set_master(struct pci_dev
*dev
)
15 /* No special bus mastering setup handling */
18 extern inline void pcibios_penalize_isa_irq(int irq
)
20 /* We don't do dynamic PCI IRQ allocation */
23 /* Dynamic DMA Mapping stuff
27 #include <linux/types.h>
28 #include <linux/slab.h>
29 #include <linux/string.h>
30 #include <asm/scatterlist.h>
35 extern void *pci_alloc_consistent(struct pci_dev
*hwdev
, size_t size
,
36 dma_addr_t
*dma_handle
);
37 extern void pci_free_consistent(struct pci_dev
*hwdev
, size_t size
,
38 void *vaddr
, dma_addr_t dma_handle
);
39 extern inline dma_addr_t
pci_map_single(struct pci_dev
*hwdev
, void *ptr
,
40 size_t size
, int direction
)
42 if (direction
== PCI_DMA_NONE
)
44 return virt_to_bus(ptr
);
46 extern inline void pci_unmap_single(struct pci_dev
*hwdev
, dma_addr_t dma_addr
,
47 size_t size
, int direction
)
49 if (direction
== PCI_DMA_NONE
)
53 extern inline int pci_map_sg(struct pci_dev
*hwdev
, struct scatterlist
*sg
,
54 int nents
, int direction
)
56 if (direction
== PCI_DMA_NONE
)
60 extern inline void pci_unmap_sg(struct pci_dev
*hwdev
, struct scatterlist
*sg
,
61 int nents
, int direction
)
63 if (direction
== PCI_DMA_NONE
)
67 extern inline void pci_dma_sync_single(struct pci_dev
*hwdev
,
68 dma_addr_t dma_handle
,
69 size_t size
, int direction
)
71 if (direction
== PCI_DMA_NONE
)
76 extern inline void pci_dma_sync_sg(struct pci_dev
*hwdev
,
77 struct scatterlist
*sg
,
78 int nelems
, int direction
)
80 if (direction
== PCI_DMA_NONE
)
85 /* Return whether the given PCI device DMA address mask can
86 * be supported properly. For example, if your device can
87 * only drive the low 24-bits during PCI bus mastering, then
88 * you would pass 0x00ffffff as the mask to this function.
90 extern inline int pci_dma_supported(struct pci_dev
*hwdev
, dma_addr_t mask
)
95 #define sg_dma_address(sg) (virt_to_bus((sg)->address))
96 #define sg_dma_len(sg) ((sg)->length)
98 #endif /* __PPC_PCI_H */