Commit | Line | Data |
---|---|---|
9fd8b647 | 1 | /* pci_impl.h: Helper definitions for PCI controller support. |
1da177e4 | 2 | * |
9fd8b647 | 3 | * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net) |
1da177e4 LT |
4 | */ |
5 | ||
6 | #ifndef PCI_IMPL_H | |
7 | #define PCI_IMPL_H | |
8 | ||
9 | #include <linux/types.h> | |
10 | #include <linux/spinlock.h> | |
11 | #include <asm/io.h> | |
de8d28b1 | 12 | #include <asm/prom.h> |
1da177e4 LT |
13 | |
14 | extern struct pci_controller_info *pci_controller_root; | |
1e8a8cc5 | 15 | extern unsigned long pci_memspace_mask; |
1da177e4 LT |
16 | |
17 | extern int pci_num_controllers; | |
18 | ||
19 | /* PCI bus scanning and fixup support. */ | |
a2fb23af | 20 | extern struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm); |
9fd8b647 | 21 | extern void pci_determine_mem_io_space(struct pci_pbm_info *pbm); |
1da177e4 | 22 | |
97b3cf05 DM |
23 | extern int pci_host_bridge_read_pci_cfg(struct pci_bus *bus_dev, |
24 | unsigned int devfn, | |
25 | int where, int size, | |
26 | u32 *value); | |
27 | extern int pci_host_bridge_write_pci_cfg(struct pci_bus *bus_dev, | |
28 | unsigned int devfn, | |
29 | int where, int size, | |
30 | u32 value); | |
31 | ||
1da177e4 LT |
32 | /* Error reporting support. */ |
33 | extern void pci_scan_for_target_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *); | |
34 | extern void pci_scan_for_master_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *); | |
35 | extern void pci_scan_for_parity_error(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *); | |
36 | ||
37 | /* Configuration space access. */ | |
38 | extern void pci_config_read8(u8 *addr, u8 *ret); | |
39 | extern void pci_config_read16(u16 *addr, u16 *ret); | |
40 | extern void pci_config_read32(u32 *addr, u32 *ret); | |
41 | extern void pci_config_write8(u8 *addr, u8 val); | |
42 | extern void pci_config_write16(u16 *addr, u16 val); | |
43 | extern void pci_config_write32(u32 *addr, u32 val); | |
44 | ||
45 | #endif /* !(PCI_IMPL_H) */ |