1 #ifndef _ASM_IA64_PCI_H
2 #define _ASM_IA64_PCI_H
5 #include <linux/slab.h>
6 #include <linux/spinlock.h>
7 #include <linux/string.h>
8 #include <linux/types.h>
11 #include <asm/scatterlist.h>
14 * Can be used to override the logic in pci_scan_bus for skipping already-configured bus
15 * numbers - to be used for buggy BIOSes or architectures with incomplete PCI setup by the
18 #define pcibios_assign_all_busses() 0
20 #define PCIBIOS_MIN_IO 0x1000
21 #define PCIBIOS_MIN_MEM 0x10000000
23 void pcibios_config_init(void);
24 struct pci_bus * pcibios_scan_root(void *acpi_handle, int segment, int bus);
29 * The PCI address space does equal the physical memory address space.
30 * The networking and block device layers use this boolean for bounce
33 #define PCI_DMA_BUS_IS_PHYS (1)
36 pcibios_set_master (struct pci_dev *dev)
38 /* No special bus mastering setup handling */
42 pcibios_penalize_isa_irq (int irq)
44 /* We don't do dynamic PCI IRQ allocation */
47 #define HAVE_ARCH_PCI_MWI 1
48 extern int pcibios_prep_mwi (struct pci_dev *);
50 #include <asm-generic/pci-dma-compat.h>
52 /* pci_unmap_{single,page} is not a nop, thus... */
53 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
55 #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
57 #define pci_unmap_addr(PTR, ADDR_NAME) \
59 #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
60 (((PTR)->ADDR_NAME) = (VAL))
61 #define pci_unmap_len(PTR, LEN_NAME) \
63 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
64 (((PTR)->LEN_NAME) = (VAL))
66 /* The ia64 platform always supports 64-bit addressing. */
67 #define pci_dac_dma_supported(pci_dev, mask) (1)
68 #define pci_dac_page_to_dma(dev,pg,off,dir) ((dma_addr_t) page_to_bus(pg) + (off))
69 #define pci_dac_dma_to_page(dev,dma_addr) (virt_to_page(bus_to_virt(dma_addr)))
70 #define pci_dac_dma_to_offset(dev,dma_addr) ((dma_addr) & ~PAGE_MASK)
71 #define pci_dac_dma_sync_single(dev,dma_addr,len,dir) do { mb(); } while (0)
73 /* Return the index of the PCI controller for device PDEV. */
74 #define pci_controller_num(PDEV) (0)
76 #define sg_dma_len(sg) ((sg)->dma_length)
77 #define sg_dma_address(sg) ((sg)->dma_address)
80 extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
81 enum pci_mmap_state mmap_state, int write_combine);
84 struct resource resource;
88 struct pci_controller {
94 struct pci_window *window;
97 #define PCI_CONTROLLER(busdev) ((struct pci_controller *) busdev->sysdata)
98 #define PCI_SEGMENT(busdev) (PCI_CONTROLLER(busdev)->segment)
100 /* generic pci stuff */
101 #include <asm-generic/pci.h>
103 #endif /* _ASM_IA64_PCI_H */