6 #include <linux/dma-mapping.h>
8 /* 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 */
12 #define pcibios_assign_all_busses() 1
13 #define pcibios_scan_all_fns(a, b) 0
16 * A board can define one or more PCI channels that represent built-in (or
17 * external) PCI controllers.
20 struct pci_ops
*pci_ops
;
21 struct resource
*io_resource
;
22 struct resource
*mem_resource
;
28 * Each board initializes this array and terminates it with a NULL entry.
30 extern struct pci_channel board_pci_channels
[];
32 #define PCIBIOS_MIN_IO board_pci_channels->io_resource->start
33 #define PCIBIOS_MIN_MEM board_pci_channels->mem_resource->start
37 extern void pcibios_set_master(struct pci_dev
*dev
);
39 static inline void pcibios_penalize_isa_irq(int irq
)
41 /* We don't do dynamic PCI IRQ allocation */
44 /* Dynamic DMA mapping stuff.
45 * SuperH has everything mapped statically like x86.
48 /* The PCI address space does equal the physical memory
49 * address space. The networking and block device layers use
50 * this boolean for bounce buffer decisions.
52 #define PCI_DMA_BUS_IS_PHYS (1)
54 #include <linux/types.h>
55 #include <linux/slab.h>
56 #include <asm/scatterlist.h>
57 #include <linux/string.h>
60 /* pci_unmap_{single,page} being a nop depends upon the
63 #ifdef CONFIG_SH_PCIDMA_NONCOHERENT
64 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
66 #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
68 #define pci_unmap_addr(PTR, ADDR_NAME) \
70 #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
71 (((PTR)->ADDR_NAME) = (VAL))
72 #define pci_unmap_len(PTR, LEN_NAME) \
74 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
75 (((PTR)->LEN_NAME) = (VAL))
77 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
78 #define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
79 #define pci_unmap_addr(PTR, ADDR_NAME) (0)
80 #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
81 #define pci_unmap_len(PTR, LEN_NAME) (0)
82 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
85 /* Not supporting more than 32-bit PCI bus addresses now, but
86 * must satisfy references to this function. Change if needed.
88 #define pci_dac_dma_supported(pci_dev, mask) (0)
90 /* These macros should be used after a pci_map_sg call has been done
91 * to get bus addresses of each of the SG entries and their lengths.
92 * You should only work with the number of sg entries pci_map_sg
93 * returns, or alternatively stop on the first sg_dma_len(sg) which
96 #define sg_dma_address(sg) (virt_to_bus((sg)->dma_address))
97 #define sg_dma_len(sg) ((sg)->length)
99 /* Board-specific fixup routines. */
100 extern void pcibios_fixup(void);
101 extern void pcibios_fixup_irqs(void);
103 #ifdef CONFIG_PCI_AUTO
104 extern int pciauto_assign_resources(int busno
, struct pci_channel
*hose
);
107 static inline void pcibios_add_platform_entries(struct pci_dev
*dev
)
111 #endif /* __KERNEL__ */
113 /* generic pci stuff */
114 #include <asm-generic/pci.h>
116 /* generic DMA-mapping stuff */
117 #include <asm-generic/pci-dma-compat.h>
119 #endif /* __ASM_SH_PCI_H */