Commit | Line | Data |
---|---|---|
830980a0 MS |
1 | /* |
2 | * This program is free software; you can redistribute it and/or | |
3 | * modify it under the terms of the GNU General Public License | |
4 | * as published by the Free Software Foundation; either version | |
5 | * 2 of the License, or (at your option) any later version. | |
6 | * | |
7 | * Based on powerpc version | |
8 | */ | |
9 | ||
10 | #ifndef __ASM_MICROBLAZE_PCI_H | |
11 | #define __ASM_MICROBLAZE_PCI_H | |
12 | #ifdef __KERNEL__ | |
13 | ||
14 | #include <linux/types.h> | |
15 | #include <linux/slab.h> | |
16 | #include <linux/string.h> | |
17 | #include <linux/dma-mapping.h> | |
18 | #include <linux/pci.h> | |
84be456f | 19 | #include <linux/scatterlist.h> |
830980a0 | 20 | |
830980a0 | 21 | #include <asm/io.h> |
830980a0 MS |
22 | #include <asm/pci-bridge.h> |
23 | ||
24 | #define PCIBIOS_MIN_IO 0x1000 | |
25 | #define PCIBIOS_MIN_MEM 0x10000000 | |
26 | ||
830980a0 MS |
27 | /* Values for the `which' argument to sys_pciconfig_iobase syscall. */ |
28 | #define IOBASE_BRIDGE_NUMBER 0 | |
29 | #define IOBASE_MEMORY 1 | |
30 | #define IOBASE_IO 2 | |
31 | #define IOBASE_ISA_IO 3 | |
32 | #define IOBASE_ISA_MEM 4 | |
33 | ||
34 | #define pcibios_scan_all_fns(a, b) 0 | |
35 | ||
36 | /* | |
37 | * Set this to 1 if you want the kernel to re-assign all PCI | |
38 | * bus numbers (don't do that on ppc64 yet !) | |
39 | */ | |
72bdee79 | 40 | #define pcibios_assign_all_busses() 0 |
830980a0 | 41 | |
830980a0 MS |
42 | extern int pci_domain_nr(struct pci_bus *bus); |
43 | ||
44 | /* Decide whether to display the domain number in /proc */ | |
45 | extern int pci_proc_domain(struct pci_bus *bus); | |
46 | ||
47 | struct vm_area_struct; | |
830980a0 | 48 | |
70f6283a DW |
49 | /* Tell PCI code what kind of PCI resource mappings we support */ |
50 | #define HAVE_PCI_MMAP 1 | |
51 | #define ARCH_GENERIC_PCI_MMAP_RESOURCE 1 | |
52 | #define arch_can_pci_mmap_io() 1 | |
830980a0 MS |
53 | |
54 | extern int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val, | |
55 | size_t count); | |
56 | extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val, | |
57 | size_t count); | |
58 | extern int pci_mmap_legacy_page_range(struct pci_bus *bus, | |
59 | struct vm_area_struct *vma, | |
60 | enum pci_mmap_state mmap_state); | |
61 | ||
62 | #define HAVE_PCI_LEGACY 1 | |
63 | ||
830980a0 MS |
64 | extern void pcibios_resource_survey(void); |
65 | ||
830980a0 MS |
66 | struct file; |
67 | extern pgprot_t pci_phys_mem_access_prot(struct file *file, | |
68 | unsigned long pfn, | |
69 | unsigned long size, | |
70 | pgprot_t prot); | |
71 | ||
72 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | |
830980a0 | 73 | |
25985edc | 74 | /* This part of code was originally in xilinx-pci.h */ |
733cc218 MS |
75 | #ifdef CONFIG_PCI_XILINX |
76 | extern void __init xilinx_pci_init(void); | |
77 | #else | |
78 | static inline void __init xilinx_pci_init(void) { return; } | |
79 | #endif | |
80 | ||
830980a0 MS |
81 | #endif /* __KERNEL__ */ |
82 | #endif /* __ASM_MICROBLAZE_PCI_H */ |