DESCRIPTION
The pci set of functions are used for managing PCI devices. The pci_read_config function is used to read data from the PCI configuration space of the device dev, at offset reg, with width specifying the size of the access.
The pci_write_config function is used to write the value val to the PCI configuration space of the device dev, at offset reg, with width specifying the size of the access.
The pci_enable_busmaster function enables PCI bus mastering for the device dev, by setting the PCIM_CMD_BUSMASTEREN bit in the PCIR_COMMAND register. The pci_disable_busmaster function clears this bit.
The pci_enable_io function enables memory or I/O port address decoding for the device dev, by setting the PCIM_CMD_MEMEN or PCIM_CMD_PORTEN bit in the PCIR_COMMAND register appropriately. The pci_disable_io function clears the appropriate bit. The space argument specifies which resource is affected; this can be either SYS_RES_MEMORY or SYS_RES_IOPORT as appropriate.
NOTE: These functions should be used in preference to manually manipulating the configuration space.
The pci_get_powerstate function returns the current ACPI power state of the device dev. If the device does not support power management capabilities, then the default state of PCI_POWERSTATE_D0 is returned. The following power states are defined by ACPI: