libmetal  latest
device.h File Reference
#include <stdint.h>
#include <metal/io.h>
#include <metal/list.h>
#include <metal/dma.h>
#include <metal/sys.h>

Go to the source code of this file.

Data Structures

struct  metal_bus_ops
 Bus operations. More...
 
struct  metal_bus
 Libmetal bus structure. More...
 
struct  metal_device
 Libmetal device structure. More...
 

Macros

#define METAL_MAX_DEVICE_REGIONS   32
 

Functions

int metal_bus_register (struct metal_bus *bus)
 Register a libmetal bus. More...
 
int metal_bus_unregister (struct metal_bus *bus)
 Unregister a libmetal bus. More...
 
int metal_bus_find (const char *name, struct metal_bus **bus)
 Find a libmetal bus by name. More...
 
int metal_register_generic_device (struct metal_device *device)
 Statically register a generic libmetal device. More...
 
int metal_device_open (const char *bus_name, const char *dev_name, struct metal_device **device)
 Open a libmetal device by name. More...
 
void metal_device_close (struct metal_device *device)
 Close a libmetal device. More...
 
static struct metal_io_regionmetal_device_io_region (struct metal_device *device, unsigned int index)
 Get an I/O region accessor for a device region. More...
 

Variables

struct metal_bus metal_generic_bus
 Libmetal generic bus. More...