blob: ac0e8369fd974383d17c96d60df79b8dfff16e14 [file] [log] [blame]
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07001#ifndef __SPARC_PCI_H
2#define __SPARC_PCI_H
3
4#ifdef __KERNEL__
5
David S. Miller9dc69232008-08-27 19:54:01 -07006#include <linux/dma-mapping.h>
7
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07008/* Can be used to override the logic in pci_scan_bus for skipping
9 * already-configured bus numbers - to be used for buggy BIOSes
10 * or architectures with incomplete PCI setup by the loader.
11 */
12#define pcibios_assign_all_busses() 0
13#define pcibios_scan_all_fns(a, b) 0
14
15#define PCIBIOS_MIN_IO 0UL
16#define PCIBIOS_MIN_MEM 0UL
17
18#define PCI_IRQ_NONE 0xffffffff
19
20static inline void pcibios_set_master(struct pci_dev *dev)
21{
22 /* No special bus mastering setup handling */
23}
24
25static inline void pcibios_penalize_isa_irq(int irq, int active)
26{
27 /* We don't do dynamic PCI IRQ allocation */
28}
29
30/* Dynamic DMA mapping stuff.
31 */
32#define PCI_DMA_BUS_IS_PHYS (0)
33
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070034struct pci_dev;
35
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070036/* pci_unmap_{single,page} is not a nop, thus... */
37#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
38 dma_addr_t ADDR_NAME;
39#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
40 __u32 LEN_NAME;
41#define pci_unmap_addr(PTR, ADDR_NAME) \
42 ((PTR)->ADDR_NAME)
43#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
44 (((PTR)->ADDR_NAME) = (VAL))
45#define pci_unmap_len(PTR, LEN_NAME) \
46 ((PTR)->LEN_NAME)
47#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
48 (((PTR)->LEN_NAME) = (VAL))
49
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070050#ifdef CONFIG_PCI
51static inline void pci_dma_burst_advice(struct pci_dev *pdev,
52 enum pci_dma_burst_strategy *strat,
53 unsigned long *strategy_parameter)
54{
55 *strat = PCI_DMA_BURST_INFINITY;
56 *strategy_parameter = ~0UL;
57}
58#endif
59
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070060struct device_node;
61extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev);
62
63#endif /* __KERNEL__ */
64
65/* generic pci stuff */
66#include <asm-generic/pci.h>
67
68#endif /* __SPARC_PCI_H */