xref: /linux/arch/xtensa/include/asm/pci.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 /*
2  * linux/include/asm-xtensa/pci.h
3  *
4  * This file is subject to the terms and conditions of the GNU General Public
5  * License.  See the file "COPYING" in the main directory of this archive
6  * for more details.
7  *
8  * Copyright (C) 2001 - 2005 Tensilica Inc.
9  */
10 
11 #ifndef _XTENSA_PCI_H
12 #define _XTENSA_PCI_H
13 
14 #ifdef __KERNEL__
15 
16 /* Can be used to override the logic in pci_scan_bus for skipping
17  * already-configured bus numbers - to be used for buggy BIOSes
18  * or architectures with incomplete PCI setup by the loader
19  */
20 
21 #define pcibios_assign_all_busses()	0
22 
23 extern struct pci_controller* pcibios_alloc_controller(void);
24 
25 /* Assume some values. (We should revise them, if necessary) */
26 
27 #define PCIBIOS_MIN_IO		0x2000
28 #define PCIBIOS_MIN_MEM		0x10000000
29 
30 /* Dynamic DMA mapping stuff.
31  * Xtensa has everything mapped statically like x86.
32  */
33 
34 #include <linux/types.h>
35 #include <linux/slab.h>
36 #include <linux/scatterlist.h>
37 #include <linux/string.h>
38 #include <asm/io.h>
39 
40 struct pci_dev;
41 
42 /* The PCI address space does equal the physical memory address space.
43  * The networking and block device layers use this boolean for bounce buffer
44  * decisions.
45  */
46 
47 #define PCI_DMA_BUS_IS_PHYS	(1)
48 
49 /* Map a range of PCI memory or I/O space for a device into user space */
50 int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
51 			enum pci_mmap_state mmap_state, int write_combine);
52 
53 /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
54 #define HAVE_PCI_MMAP	1
55 
56 #endif /* __KERNEL__ */
57 
58 /* Implement the pci_ DMA API in terms of the generic device dma_ one */
59 #include <asm-generic/pci-dma-compat.h>
60 
61 /* Generic PCI */
62 #include <asm-generic/pci.h>
63 
64 #endif	/* _XTENSA_PCI_H */
65