1#ifndef __SPARC64_PCI_H
2#define __SPARC64_PCI_H
3
4#ifdef __KERNEL__
5
6#include <linux/dma-mapping.h>
7
8
9
10
11
12#define pcibios_assign_all_busses() 0
13
14#define PCIBIOS_MIN_IO 0UL
15#define PCIBIOS_MIN_MEM 0UL
16
17#define PCI_IRQ_NONE 0xffffffff
18
19
20
21
22
23#define PCI_DMA_BUS_IS_PHYS (0)
24
25
26
27
28
29
30
31#define PCI64_REQUIRED_MASK (~(u64)0)
32#define PCI64_ADDR_BASE 0xfffc000000000000UL
33
34#ifdef CONFIG_PCI
35static inline void pci_dma_burst_advice(struct pci_dev *pdev,
36 enum pci_dma_burst_strategy *strat,
37 unsigned long *strategy_parameter)
38{
39 unsigned long cacheline_size;
40 u8 byte;
41
42 pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
43 if (byte == 0)
44 cacheline_size = 1024;
45 else
46 cacheline_size = (int) byte * 4;
47
48 *strat = PCI_DMA_BURST_BOUNDARY;
49 *strategy_parameter = cacheline_size;
50}
51#endif
52
53
54
55extern int pci_domain_nr(struct pci_bus *bus);
56static inline int pci_proc_domain(struct pci_bus *bus)
57{
58 return 1;
59}
60
61
62
63#define HAVE_PCI_MMAP
64#define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
65#define get_pci_unmapped_area get_fb_unmapped_area
66
67extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
68 enum pci_mmap_state mmap_state,
69 int write_combine);
70
71static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
72{
73 return PCI_IRQ_NONE;
74}
75
76#define HAVE_ARCH_PCI_RESOURCE_TO_USER
77extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
78 const struct resource *rsrc,
79 resource_size_t *start, resource_size_t *end);
80#endif
81
82#endif
83