This module emulates the PCI subsystem inside the Linux kernel.
|
Exploration of bus/attached devices and drivers |
struct pci_driver * | pci_dev_driver (const struct pci_dev *dev) |
| Get PCI driver of given device.
|
int | pci_register_driver (struct pci_driver *drv) |
| Register PCI driver.
|
void | pci_unregister_driver (struct pci_driver *drv) |
| Unregister PCI driver.
|
struct pci_dev * | pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from) |
| Find PCI Device on vendor and device IDs.
|
struct pci_dev * | pci_find_subsys (unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, const struct pci_dev *from) |
| Find PCI Device on vendor, subvendor, device and subdevice IDs.
|
struct pci_dev * | pci_find_slot (unsigned int bus, unsigned int devfn) |
| Find PCI Device on Slot.
|
struct pci_dev * | pci_find_class (unsigned int class, const struct pci_dev *from) |
| Find PCI Device on Class.
|
Device setup (bus mastering, enable/disable) |
int | pci_enable_device (struct pci_dev *dev) |
| Enable PCI Device.
|
void | pci_disable_device (struct pci_dev *dev) |
| Disable PCI Device.
|
void | pci_set_master (struct pci_dev *dev) |
| Set Busmastering for PCI Device.
|
int | pci_set_mwi (struct pci_dev *dev) |
| FIXME Dummy (could also go into L4IO.
|
void | pci_clear_mwi (struct pci_dev *dev) |
| FIXME Dummy (should also go into L4IO.
|
Power Management related functions |
int | pci_set_power_state (struct pci_dev *dev, int state) |
| Set PM State for PCI Device.
|
int | pci_enable_wake (struct pci_dev *dev, u32 state, int enable) |
| FIXME Dummy (could also go into L4IO.
|
int | pci_save_state (struct pci_dev *dev, u32 *buffer) |
| FIXME Dummy (could also go into L4IO.
|
int | pci_restore_state (struct pci_dev *dev, u32 *buffer) |
| FIXME Dummy (could also go into L4IO.
|
PCI memory pools (consistent DMA mappings...) |
Pool allocator .
.. wraps the pci_alloc_consistent page allocator, so small blocks are easily used by drivers for bus mastering controllers. This should probably be sharing the guts of the slab allocator.
|
struct pci_pool * | pci_pool_create (const char *name, struct pci_dev *pdev, size_t size, size_t align, size_t allocation, int flags) |
| Create a pool of pci consistent memory blocks, for dma.
|
void | pci_pool_destroy (struct pci_pool *pool) |
| Destroy a pool of pci memory blocks.
|
void * | pci_pool_alloc (struct pci_pool *pool, int mem_flags, dma_addr_t *handle) |
| Get a block of consistent memory.
|
void * | pci_alloc_consistent (struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) |
| Allocation of PCI consistent DMA Memory.
|
void | pci_free_consistent (struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) |
| Deallocation of PCI consistent DMA Memory.
|
Configuration space access |
int | pci_read_config_byte (struct pci_dev *dev, int pos, l4_uint8_t *val) |
| PCI Configuration Space access - read byte.
|
int | pci_read_config_word (struct pci_dev *dev, int pos, l4_uint16_t *val) |
| PCI Configuration Space access - read word.
|
int | pci_read_config_dword (struct pci_dev *dev, int pos, l4_uint32_t *val) |
| PCI Configuration Space access - read double word.
|
int | pci_write_config_byte (struct pci_dev *dev, int pos, l4_uint8_t val) |
| PCI Configuration Space access - write byte.
|
int | pci_write_config_word (struct pci_dev *dev, int pos, l4_uint16_t val) |
| PCI Configuration Space access - write word.
|
int | pci_write_config_dword (struct pci_dev *dev, int pos, l4_uint32_t val) |
| PCI Configuration Space access - write double word.
|
Functions for Linux backward compatibility |
This is from drivers/pci/compat.c
|
int | pcibios_find_device (unsigned short vendor, unsigned short device, unsigned short index, unsigned char *bus, unsigned char *devfn) |
| Find .
|
#define | PCI_OP(rw, size, type) |
| Configuration space access function creation (old interface).
|
Functions |
int | l4dde_pci_init (void) |
| Initalize PCI module.
|
This module emulates the PCI subsystem inside the Linux kernel.
Most of the services of this module are wrappers to libio functions. The remainder is simple glue code. The PCI module supports up to PCI_DEVICES
devices at one virtual PCI bus.