PCI Support


Functions

L4_CV int l4io_pci_find_slot (unsigned int bus, unsigned int slot, l4io_pci_dev_t *pci_dev)
 Find PCI device on given bus and slot.
L4_CV int l4io_pci_find_device (unsigned short vendor, unsigned short device, l4io_pdev_t start, l4io_pci_dev_t *pci_dev)
 Find PCI device on given vendor and device ids.
L4_CV int l4io_pci_find_class (unsigned long dev_class, l4io_pdev_t start, l4io_pci_dev_t *pci_dev)
 Find PCI device on given class id.
L4_CV int l4io_pci_enable (l4io_pdev_t pdev)
 Initialize PCI device.
L4_CV int l4io_pci_disable (l4io_pdev_t pdev)
 Finalize PCI device.
L4_CV void l4io_pci_set_master (l4io_pdev_t pdev)
 Enable busmastering for PCI device.
L4_CV int l4io_pci_set_pm (l4io_pdev_t pdev, int state)
 Set PM state for PCI device.

Detailed Description

Identification of devices and support for configuration space access.

Function Documentation

L4_CV int l4io_pci_disable ( l4io_pdev_t  pdev  ) 

Finalize PCI device.

Parameters:
pdev PCI device handle
Returns:
0 on success; negative error code otherwise

L4_CV int l4io_pci_enable ( l4io_pdev_t  pdev  ) 

Initialize PCI device.

Parameters:
pdev PCI device handle
Returns:
0 on success; negative error code otherwise

L4_CV int l4io_pci_find_class ( unsigned long  dev_class,
l4io_pdev_t  start,
l4io_pci_dev_t pci_dev 
)

Find PCI device on given class id.

Parameters:
dev_class device class id
start previous PCI device found, or 0 for new search
Return values:
pci_dev 
Returns:
0 on success; negative error code otherwise

L4_CV int l4io_pci_find_device ( unsigned short  vendor,
unsigned short  device,
l4io_pdev_t  start,
l4io_pci_dev_t pci_dev 
)

Find PCI device on given vendor and device ids.

Parameters:
vendor vendor id or ~0 for any
device device id or ~0 for any
start previous PCI device found, or 0 for new search
Return values:
pci_dev 
Returns:
0 on success; negative error code otherwise

L4_CV int l4io_pci_find_slot ( unsigned int  bus,
unsigned int  slot,
l4io_pci_dev_t pci_dev 
)

Find PCI device on given bus and slot.

Parameters:
bus PCI bus number
slot PCI slot number
Return values:
pci_dev 
Returns:
0 on success; negative error code otherwise

L4_CV void l4io_pci_set_master ( l4io_pdev_t  pdev  ) 

Enable busmastering for PCI device.

Parameters:
pdev PCI device handle

L4_CV int l4io_pci_set_pm ( l4io_pdev_t  pdev,
int  state 
)

Set PM state for PCI device.

Parameters:
pdev PCI device handle
state new PM state
Returns:
old PM state


generic_io Reference Manual, written by Christian Helmuth  © 2003 Technische Universitaet Dresden