30 struct pci_operations {
34 void (*get_ltr_max_latencies)(
u16 *max_snoop,
u16 *max_nosnoop);
41 const unsigned short *devices;
59 #define __pci_driver __attribute__((used, __section__(".rodata.pci_driver")))
61 #define __pci_driver __attribute__((unused))
65 extern struct pci_driver _pci_drivers[];
67 extern struct pci_driver _epci_drivers[];
83 void (*do_scan_bus)(
struct bus *
bus,
84 unsigned int min_devfn,
unsigned int max_devfn));
88 unsigned int max_devfn);
101 void pci_assign_irqs(
struct device *dev,
const unsigned char pIntAtoD[4]);
109 #define PCI_IO_BRIDGE_ALIGN 4096
110 #define PCI_MEM_BRIDGE_ALIGN (1024*1024)
112 #define PCI_ID(VENDOR_ID, DEVICE_ID) \
113 ((((DEVICE_ID) & 0xFFFF) << 16) | ((VENDOR_ID) & 0xFFFF))
124 static inline int pci_base_address_is_memory_space(
unsigned int attr)
132 #if ENV_PCI_SIMPLE_DEVICE
135 void pci_dev_request_bus_master(
struct device *dev)
138 if (
CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE))
enum fch_io_device device
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
static struct device_operations ops
int pci_early_device_probe(u8 bus, u8 dev, u32 mmio_base)
void pci_early_bridge_init(void)
const char * get_pci_class_name(struct device *dev)
const char * get_pci_subclass_name(struct device *dev)
#define PCI_COMMAND_MASTER
#define PCI_BASE_ADDRESS_SPACE
#define PCI_BASE_ADDRESS_SPACE_MEMORY
struct msix_entry * pci_msix_get_table(struct device *dev)
Given a device, return a msix_entry pointer or NULL if no table was found.
struct device * pci_probe_dev(struct device *dev, struct bus *bus, unsigned int devfn)
Scan a PCI bus.
void pci_dev_init(struct device *dev)
Default handler: only runs the relevant PCI BIOS.
void pci_scan_bus(struct bus *bus, unsigned int min_devfn, unsigned int max_devfn)
Scan a PCI bus.
unsigned int pci_match_simple_dev(struct device *dev, pci_devfn_t sdev)
Test for match between romstage and ramstage device instance.
void pci_bus_enable_resources(struct device *dev)
u16 pci_moving_config16(struct device *dev, unsigned int reg)
const char * pin_to_str(int pin)
Take an INT_PIN number (0, 1 - 4) and convert it to a string ("NO PIN", "PIN A" - "PIN D")
struct device_operations default_pci_ops_dev
void pci_dev_set_subsystem(struct device *dev, unsigned int vendor, unsigned int device)
void pci_bus_read_resources(struct device *dev)
void pci_bus_reset(struct bus *bus)
int pci_msix_table_bar(struct device *dev, u32 *offset, u8 *idx)
Given a device, return the table offset and bar the MSI-X tables resides in.
size_t pci_msix_table_size(struct device *dev)
Given a device, read the size of the MSI-X table.
u32 pci_moving_config32(struct device *dev, unsigned int reg)
void pci_scan_bridge(struct device *dev)
Scan a PCI bridge and the buses behind the bridge.
void pci_dev_enable_resources(struct device *dev)
struct resource * pci_get_resource(struct device *dev, unsigned long index)
Given a device and register, read the size of the BAR for that register.
int get_pci_irq_pins(struct device *dev, struct device **parent_bdg)
Given a device structure 'dev', find its interrupt pin and its parent bridge 'parent_bdg' device stru...
u8 pci_moving_config8(struct device *dev, unsigned int reg)
void do_pci_scan_bridge(struct device *dev, void(*do_scan_bus)(struct bus *bus, unsigned int min_devfn, unsigned int max_devfn))
Scan a PCI bridge and the buses behind the bridge.
void pci_dev_disable_bus_master(const struct device *dev)
void pci_dev_read_resources(struct device *dev)
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
void pci_dev_set_resources(struct device *dev)
struct device_operations default_pci_ops_bus
Default device operations for PCI bridges.
pci_devfn_t pci_locate_device(unsigned int pci_id, pci_devfn_t dev)
void pci_s_deassert_secondary_reset(pci_devfn_t p2p_bridge)
void pci_s_assert_secondary_reset(pci_devfn_t p2p_bridge)
void pci_s_bridge_set_secondary(pci_devfn_t p2p_bridge, u8 secondary)
pci_devfn_t pci_locate_device_on_bus(unsigned int pci_id, unsigned int bus)
typedef void(X86APIP X86EMU_intrFuncs)(int num)