blob: 879a91d6e669d441898dfe2d663dc6557389f674 [file] [log] [blame]
Patrick Georgi7333a112020-05-08 20:48:04 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Stefan Reinauer05082732015-10-21 13:00:41 -07002
Stefan Reinauer850e7d42015-09-28 13:12:04 -07003#ifndef __PCI_USERSPACE_H__
4#define __PCI_USERSPACE_H__
5
Stefan Reinauer05082732015-10-21 13:00:41 -07006struct device {
7 int busno;
8 int slot;
9 int func;
Li-Ta Lo81521262004-07-08 17:18:27 +000010};
11
Stefan Reinauer05082732015-10-21 13:00:41 -070012int pci_initialize(void);
13int pci_exit(void);
Li-Ta Lo81521262004-07-08 17:18:27 +000014
Stefan Reinauer05082732015-10-21 13:00:41 -070015u8 pci_read_config8(struct device *dev, unsigned int where);
16u16 pci_read_config16(struct device *dev, unsigned int where);
17u32 pci_read_config32(struct device *dev, unsigned int where);
18void pci_write_config8(struct device *dev, unsigned int where, u8 val);
19void pci_write_config16(struct device *dev, unsigned int where, u16 val);
20void pci_write_config32(struct device *dev, unsigned int where, u32 val);
Stefan Reinauer850e7d42015-09-28 13:12:04 -070021
22#endif