Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 0508273 | 2015-10-21 13:00:41 -0700 | [diff] [blame] | 2 | |
Stefan Reinauer | 850e7d4 | 2015-09-28 13:12:04 -0700 | [diff] [blame] | 3 | #ifndef __PCI_USERSPACE_H__ |
| 4 | #define __PCI_USERSPACE_H__ |
| 5 | |
Stefan Reinauer | 0508273 | 2015-10-21 13:00:41 -0700 | [diff] [blame] | 6 | struct device { |
| 7 | int busno; |
| 8 | int slot; |
| 9 | int func; |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 10 | }; |
| 11 | |
Stefan Reinauer | 0508273 | 2015-10-21 13:00:41 -0700 | [diff] [blame] | 12 | int pci_initialize(void); |
| 13 | int pci_exit(void); |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 14 | |
Stefan Reinauer | 0508273 | 2015-10-21 13:00:41 -0700 | [diff] [blame] | 15 | u8 pci_read_config8(struct device *dev, unsigned int where); |
| 16 | u16 pci_read_config16(struct device *dev, unsigned int where); |
| 17 | u32 pci_read_config32(struct device *dev, unsigned int where); |
| 18 | void pci_write_config8(struct device *dev, unsigned int where, u8 val); |
| 19 | void pci_write_config16(struct device *dev, unsigned int where, u16 val); |
| 20 | void pci_write_config32(struct device *dev, unsigned int where, u32 val); |
Stefan Reinauer | 850e7d4 | 2015-09-28 13:12:04 -0700 | [diff] [blame] | 21 | |
| 22 | #endif |