]> git.ipfire.org Git - thirdparty/u-boot.git/blob - arch/x86/include/asm/pci.h
SPDX: Convert all of our single license tags to Linux Kernel style
[thirdparty/u-boot.git] / arch / x86 / include / asm / pci.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * (C) Copyright 2002
4 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
5 */
6
7 #ifndef _PCI_I386_H_
8 #define _PCI_I386_H_
9
10 #include <pci.h>
11
12 /* bus mapping constants (used for PCI core initialization) */
13 #define PCI_REG_ADDR 0xcf8
14 #define PCI_REG_DATA 0xcfc
15
16 #define PCI_CFG_EN 0x80000000
17
18 #ifndef __ASSEMBLY__
19
20 int pci_x86_read_config(struct udevice *bus, pci_dev_t bdf, uint offset,
21 ulong *valuep, enum pci_size_t size);
22
23 int pci_x86_write_config(struct udevice *bus, pci_dev_t bdf, uint offset,
24 ulong value, enum pci_size_t size);
25
26 /**
27 * Assign IRQ number to a PCI device
28 *
29 * This function assigns IRQ for a PCI device. If the device does not exist
30 * or does not require interrupts then this function has no effect.
31 *
32 * @bus: PCI bus number
33 * @device: PCI device number
34 * @irq: An array of IRQ numbers that are assigned to INTA through
35 * INTD of this PCI device.
36 */
37 void pci_assign_irqs(int bus, int device, u8 irq[4]);
38
39 #endif /* __ASSEMBLY__ */
40
41 #endif /* _PCI_I386_H_ */