libmetal
|
Data Structures | |
struct | metal_bus_ops |
struct | metal_bus |
struct | metal_device |
Macros | |
#define | METAL_MAX_DEVICE_REGIONS 32 |
Functions | |
int | metal_bus_register (struct metal_bus *bus) |
Register a libmetal bus. | |
int | metal_bus_unregister (struct metal_bus *bus) |
Unregister a libmetal bus. | |
int | metal_bus_find (const char *name, struct metal_bus **bus) |
Find a libmetal bus by name. | |
int | metal_register_generic_device (struct metal_device *device) |
Statically register a generic libmetal device. | |
int | metal_device_open (const char *bus_name, const char *dev_name, struct metal_device **device) |
Open a libmetal device by name. | |
void | metal_device_close (struct metal_device *device) |
Close a libmetal device. | |
static struct metal_io_region * | metal_device_io_region (struct metal_device *device, unsigned int index) |
Get an I/O region accessor for a device region. | |
Variables | |
struct metal_bus | metal_generic_bus |
#define METAL_MAX_DEVICE_REGIONS 32 |
|
extern |
Find a libmetal bus by name.
[in] | name | Bus name. |
[out] | bus | Returned bus handle. |
|
extern |
Register a libmetal bus.
[in] | bus | Pre-initialized bus structure. |
|
extern |
Unregister a libmetal bus.
[in] | bus | Pre-registered bus structure. |
|
extern |
Close a libmetal device.
[in] | device | Device handle. |
|
inlinestatic |
Get an I/O region accessor for a device region.
[in] | device | Device handle. |
[in] | index | Region index. |
|
extern |
Open a libmetal device by name.
[in] | bus_name | Bus name. |
[in] | dev_name | Device name. |
[out] | device | Returned device handle. |
|
extern |
Statically register a generic libmetal device.
In non-Linux systems, devices are always required to be statically registered at application initialization. In Linux system, devices can be dynamically opened via sysfs or libfdt based enumeration at runtime. This interface is used for static registration of devices. Subsequent calls to metal_device_open() look up in this list of pre-registered devices on the "generic" bus. "generic" bus is used on non-Linux system to group the memory mapped devices.
[in] | device | Generic device. |
|
extern |
Libmetal generic bus.