1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21965aae3SH. Peter Anvin #ifndef _ASM_X86_PCI_DIRECT_H 31965aae3SH. Peter Anvin #define _ASM_X86_PCI_DIRECT_H 4bb898558SAl Viro 5bb898558SAl Viro #include <linux/types.h> 6bb898558SAl Viro 7bb898558SAl Viro /* Direct PCI access. This is used for PCI accesses in early boot before 8bb898558SAl Viro the PCI subsystem works. */ 9bb898558SAl Viro 10bb898558SAl Viro extern u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset); 11bb898558SAl Viro extern u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset); 12bb898558SAl Viro extern u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset); 13bb898558SAl Viro extern void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, u32 val); 14bb898558SAl Viro extern void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val); 15bb898558SAl Viro extern void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val); 16bb898558SAl Viro 17bb898558SAl Viro extern int early_pci_allowed(void); 181965aae3SH. Peter Anvin #endif /* _ASM_X86_PCI_DIRECT_H */ 19