/tmp/l4check/full_tree/trunk/l4/pkg/generic_io/include/libio.h File Reference

L4Env I/O Client API. More...

#include <l4/sys/types.h>
#include <l4/generic_io/types.h>

Go to the source code of this file.

Functions

EXTERN_C_BEGIN L4_CV int l4io_init (l4io_info_t **io_info_addr, l4io_drv_t drv_type)
L4_CV l4io_info_tl4io_info_page (void)
 Return pointer to L4IO info page.
L4_CV l4io_desc_device_tl4io_desc_lookup_device (const char *name, l4io_info_t *iopage)
 Find device structure by name. grp_misc.
L4_CV int l4io_desc_lookup_resource (l4io_desc_device_t *d, unsigned long type, int i)
 Find specific resouce within device descriptor. grp_misc.
L4_CV l4_addr_t l4io_request_mem_region (l4_addr_t start, l4_size_t len, int flags)
 Request I/O memory region.
L4_CV l4_addr_t l4io_request_mem_region_name (const char *name, const int index)
 Request I/O memory region.
L4_CV int l4io_get_irq_name (const char *name, const int index)
 Get IRQ number by name.
L4_CV int l4io_search_mem_region (l4_addr_t addr, l4_addr_t *start, l4_size_t *len)
 Search I/O memory region for an address.
L4_CV int l4io_release_mem_region (l4_addr_t start, l4_size_t len)
 Release I/O memory region.
L4_CV int l4io_request_region (l4_uint16_t start, l4_uint16_t len)
 Request I/O port region.
L4_CV int l4io_release_region (l4_uint16_t start, l4_uint16_t len)
 Release I/O port region.
L4_CV int l4io_request_dma (unsigned int channel)
 Request ISA DMA channel.
L4_CV int l4io_release_dma (unsigned int channel)
 Release ISA DMA channel.
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.
Read PCI configuration registers.
Parameters:
pdev PCI device handle
pos PCI configuration register
Return values:
val register value
Returns:
0 on success; negative error code otherwise


L4_CV int l4io_pci_readb_cfg (l4io_pdev_t pdev, int pos, l4_uint8_t *val)
L4_CV int l4io_pci_readw_cfg (l4io_pdev_t pdev, int pos, l4_uint16_t *val)
L4_CV int l4io_pci_readl_cfg (l4io_pdev_t pdev, int pos, l4_uint32_t *val)
Write PCI configuration registers.
Parameters:
pdev PCI device handle
pos PCI configuration register
val register value
Returns:
0 on success; negative error code otherwise


L4_CV int l4io_pci_writeb_cfg (l4io_pdev_t pdev, int pos, l4_uint8_t val)
L4_CV int l4io_pci_writew_cfg (l4io_pdev_t pdev, int pos, l4_uint16_t val)
L4_CV int l4io_pci_writel_cfg (l4io_pdev_t pdev, int pos, l4_uint32_t val)


Detailed Description

L4Env I/O Client API.

Date:
2007-03-23
Author:
Christian Helmuth <ch12@os.inf.tu-dresden.de>

Function Documentation

L4_CV l4io_desc_device_t* l4io_desc_lookup_device ( const char *  name,
l4io_info_t iopage 
)

Find device structure by name. grp_misc.

Parameters:
name Name of device to look for
iopage IO info page to use, must be a valid pointer.
Returns:
Pointer to device structure, 0 if not found

L4_CV int l4io_desc_lookup_resource ( l4io_desc_device_t d,
unsigned long  type,
int  i 
)

Find specific resouce within device descriptor. grp_misc.

Parameters:
d Device descriptor to look at
type Type of resource to look for.
i Index to start at (0 for first call on device structure, return of previous calls plus 1 for consecutive calls.
Returns:
-1 if nothing found, index otherwise


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