Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/ioport.h>
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/rio.h>
Go to the source code of this file.
Macros | |
#define | RIO_DEVICE(dev, ven) |
#define RIO_DEVICE | ( | dev, | |
ven | |||
) |
RIO_DEVICE - macro used to describe a specific RIO device : the 16 bit RIO device ID : the 16 bit RIO vendor ID
This macro is used to create a struct rio_device_id that matches a specific device. The assembly vendor and assembly device fields will be set to RIO_ANY_ID.
rio_dev_get - Increments the reference count of the RIO device structure
: RIO device being referenced
Each live reference to a device should be refcounted.
Drivers for RIO devices should normally record such references in their probe() methods, when they bind to a device, and release them by calling rio_dev_put(), in their disconnect() methods.
Definition at line 57 of file rio-driver.c.
|
read |
rio_get_asm - Begin or continue searching for a RIO device by vid/did/asm_vid/asm_did : RIO vid to match or RIO_ANY_ID to match all vids : RIO did to match or RIO_ANY_ID to match all dids : RIO asm_vid to match or RIO_ANY_ID to match all asm_vids : RIO asm_did to match or RIO_ANY_ID to match all asm_dids : Previous RIO device found in search, or NULL for new search
Iterates through the list of known RIO devices. If a RIO device is found with a matching , , , , the reference count to the device is incrememted and a pointer to its device structure is returned. Otherwise, NULL is returned. A new search is initiated by passing NULL to the argument. Otherwise, if is not NULL, searches continue from next device on the global list. The reference count for is always decremented if it is not NULL.
rio_get_device - Begin or continue searching for a RIO device by vid/did : RIO vid to match or RIO_ANY_ID to match all vids : RIO did to match or RIO_ANY_ID to match all dids : Previous RIO device found in search, or NULL for new search
Iterates through the list of known RIO devices. If a RIO device is found with a matching and , the reference count to the device is incrememted and a pointer to its device structure is returned. Otherwise, NULL is returned. A new search is initiated by passing NULL to the argument. Otherwise, if is not NULL, searches continue from next device on the global list. The reference count for is always decremented if it is not NULL.
int rio_inb_pwrite_handler | ( | union rio_pw_msg * | pw_msg | ) |
int rio_map_inb_region | ( | struct rio_mport * | mport, |
dma_addr_t | local, | ||
u64 | rbase, | ||
u32 | size, | ||
u32 | rflags | ||
) |
int rio_mport_read_config_16 | ( | struct rio_mport * | port, |
u16 | destid, | ||
u8 | hopcount, | ||
u32 | offset, | ||
u16 * | data | ||
) |
int rio_mport_read_config_32 | ( | struct rio_mport * | port, |
u16 | destid, | ||
u8 | hopcount, | ||
u32 | offset, | ||
u32 * | data | ||
) |
int rio_mport_read_config_8 | ( | struct rio_mport * | port, |
u16 | destid, | ||
u8 | hopcount, | ||
u32 | offset, | ||
u8 * | data | ||
) |
rio_mport_send_doorbell - Send a doorbell message
: RIO master port : RIO device destination ID : Doorbell message data
Send a doorbell message to a RIO device. The doorbell message has a 16-bit info field provided by the data argument.
Definition at line 163 of file rio-access.c.
int rio_mport_write_config_16 | ( | struct rio_mport * | port, |
u16 | destid, | ||
u8 | hopcount, | ||
u32 | offset, | ||
u16 | data | ||
) |
int rio_mport_write_config_32 | ( | struct rio_mport * | port, |
u16 | destid, | ||
u8 | hopcount, | ||
u32 | offset, | ||
u32 | data | ||
) |
int rio_mport_write_config_8 | ( | struct rio_mport * | port, |
u16 | destid, | ||
u8 | hopcount, | ||
u32 | offset, | ||
u8 | data | ||
) |
int rio_register_driver | ( | struct rio_driver * | rdrv | ) |
rio_register_driver - register a new RIO driver : the RIO driver structure to register
Adds a &struct rio_driver to the list of registered drivers. Returns a negative value on error, otherwise 0. If no error occurred, the driver remains registered even if no device was claimed during registration.
Definition at line 143 of file rio-driver.c.
rio_release_inb_dbell - release inbound doorbell message service : RIO master port from which to release the doorbell resource : Doorbell info range start : Doorbell info range end
Releases ownership of an inbound doorbell resource and removes callback from the doorbell event list. Returns 0 if the request has been satisfied.
int rio_request_inb_dbell | ( | struct rio_mport * | , |
void * | , | ||
u16 | , | ||
u16 | , | ||
void(*)(struct rio_mport *, void *, u16, u16, u16) | |||
) |
int rio_request_inb_mbox | ( | struct rio_mport * | , |
void * | , | ||
int | , | ||
int | , | ||
void(*)(struct rio_mport *, void *, int, int) | |||
) |
rio_request_outb_dbell - request outbound doorbell message range : RIO device from which to allocate the doorbell resource : Doorbell message range start : Doorbell message range end
Requests ownership of a doorbell message range. Returns a resource if the request has been satisfied or NULL on failure.
int rio_request_outb_mbox | ( | struct rio_mport * | , |
void * | , | ||
int | , | ||
int | , | ||
void(*)(struct rio_mport *, void *, int, int) | |||
) |
void rio_unmap_inb_region | ( | struct rio_mport * | mport, |
dma_addr_t | lstart | ||
) |
void rio_unregister_driver | ( | struct rio_driver * | rdrv | ) |
rio_unregister_driver - unregister a RIO driver : the RIO driver structure to unregister
Deletes the &struct rio_driver from the list of registered RIO drivers, gives it a chance to clean up by calling its remove() function for each device it was responsible for, and marks those devices as driverless.
Definition at line 162 of file rio-driver.c.