David S. Miller | 9fd8b64 | 2007-03-08 21:55:49 -0800 | [diff] [blame^] | 1 | /* pci_impl.h: Helper definitions for PCI controller support. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * |
David S. Miller | 9fd8b64 | 2007-03-08 21:55:49 -0800 | [diff] [blame^] | 3 | * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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> |
David S. Miller | de8d28b | 2006-06-22 16:18:54 -0700 | [diff] [blame] | 12 | #include <asm/prom.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
| 14 | extern struct pci_controller_info *pci_controller_root; |
David S. Miller | 1e8a8cc | 2007-02-28 23:38:38 -0800 | [diff] [blame] | 15 | extern unsigned long pci_memspace_mask; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
| 17 | extern int pci_num_controllers; |
| 18 | |
| 19 | /* PCI bus scanning and fixup support. */ |
David S. Miller | a2fb23a | 2007-02-28 23:35:04 -0800 | [diff] [blame] | 20 | extern struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm); |
David S. Miller | 9fd8b64 | 2007-03-08 21:55:49 -0800 | [diff] [blame^] | 21 | extern void pci_determine_mem_io_space(struct pci_pbm_info *pbm); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | |
| 23 | /* Error reporting support. */ |
| 24 | extern void pci_scan_for_target_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *); |
| 25 | extern void pci_scan_for_master_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *); |
| 26 | extern void pci_scan_for_parity_error(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *); |
| 27 | |
| 28 | /* Configuration space access. */ |
| 29 | extern void pci_config_read8(u8 *addr, u8 *ret); |
| 30 | extern void pci_config_read16(u16 *addr, u16 *ret); |
| 31 | extern void pci_config_read32(u32 *addr, u32 *ret); |
| 32 | extern void pci_config_write8(u8 *addr, u8 val); |
| 33 | extern void pci_config_write16(u16 *addr, u16 val); |
| 34 | extern void pci_config_write32(u32 *addr, u32 val); |
| 35 | |
| 36 | #endif /* !(PCI_IMPL_H) */ |