blob: e5e54b6d4df8528a344701a87adb7abfb393881c [file] [log] [blame]
Eric Biederman5899fd82003-04-24 06:25:08 +00001#ifndef PCI_OPS_H
2#define PCI_OPS_H
3
4#include <stdint.h>
Eric Biederman7a5416a2003-06-12 19:23:51 +00005#include <device/device.h>
Eric Biederman018d8dd2004-11-04 11:04:33 +00006#include <arch/pci_ops.h>
Eric Biederman5899fd82003-04-24 06:25:08 +00007
Uwe Hermanne4870472010-11-04 23:23:47 +00008u8 pci_read_config8(device_t dev, unsigned int where);
9u16 pci_read_config16(device_t dev, unsigned int where);
10u32 pci_read_config32(device_t dev, unsigned int where);
11void pci_write_config8(device_t dev, unsigned int where, u8 val);
12void pci_write_config16(device_t dev, unsigned int where, u16 val);
13void pci_write_config32(device_t dev, unsigned int where, u32 val);
Eric Biederman7a5416a2003-06-12 19:23:51 +000014
Stefan Reinauer08670622009-06-30 15:17:49 +000015#if CONFIG_MMCONF_SUPPORT
Uwe Hermanne4870472010-11-04 23:23:47 +000016u8 pci_mmio_read_config8(device_t dev, unsigned int where);
17u16 pci_mmio_read_config16(device_t dev, unsigned int where);
18u32 pci_mmio_read_config32(device_t dev, unsigned int where);
19void pci_mmio_write_config8(device_t dev, unsigned int where, u8 val);
20void pci_mmio_write_config16(device_t dev, unsigned int where, u16 val);
21void pci_mmio_write_config32(device_t dev, unsigned int where, u32 val);
Stefan Reinauer43b29cf2009-03-06 19:11:52 +000022#endif
23
Carl-Daniel Hailfinger00003ae2009-09-22 00:09:41 +000024/* This function lives in pci_ops_auto.c */
25const struct pci_bus_operations *pci_remember_direct(void);
26
Eric Biederman5899fd82003-04-24 06:25:08 +000027#endif /* PCI_OPS_H */