metal_device
metal_device
const char             *name;       /**< Device name */
const char             *name;       /**< Device name */
struct metal_bus
struct metal_bus
const char     *name;
const char     *name;
/** Bus operations. */


struct metal_bus_ops {
void        (*bus_close)(struct metal_bus *bus);
int     (*dev_open)(struct metal_bus *bus,
                    const char *dev_name,
                    struct metal_device **device);
void        (*dev_close)(struct metal_bus *bus,
                     struct metal_device *device);
void        (*dev_irq_ack)(struct metal_bus *bus,
                       struct metal_device *device,
                       int irq);
int     (*dev_dma_map)(struct metal_bus *bus,
                       struct metal_device *device,
                       uint32_t dir,
                       struct metal_sg *sg_in,
                       int nents_in,
                       struct metal_sg *sg_out);
 void        (*dev_dma_unmap)(struct metal_bus *bus,
                     struct metal_device *device,
                     uint32_t dir,
                     struct metal_sg *sg,
                     int nents);
};
/** Bus operations. */...
struct metal_list  devices;
struct metal_list  devices;
struct metal_list  node;
struct metal_list  node;
unsigned int           num_regions; /**< Number of I/O regions indevice */
unsigned int           num_regions; /**< Number of I/O regions indevice */

struct metal_io_region regions[METAL_MAX_DEVICE_REGIONS]; /**< Array of I/O regions in device*/

struct metal_io_region regions[METAL_MAX_DEVICE_REGIONS]; /**< Array of I/O regions in device*/...
void                   *irq_info;  /**< IRQ ID */
void                   *irq_info;  /**< IRQ ID */
int                    irq_num;    /**< Number of IRQs per device */
int                    irq_num;    /**< Number of IRQs per device */
struct metal_list      node;       /**< Node on bus' list of devices */
struct metal_list      node;       /**< Node on bus' list of devices */
struct metal_io_region
struct metal_io_region
struct metal_bus       *bus;        /**< Bus that contains device */
struct metal_bus       *bus;        /**< Bus that contains device */
struct metal_bus_ops   ops;
struct metal_bus_ops   ops;
void           *virt;      /**< base virtual address */
void           *virt;      /**< base virtual address...
const metal_phys_addr_t    *physmap;   /**< table of base physical address
 of each of the pages in the I/O region*/
const metal_phys_addr_t    *physmap;   /**< table of...
size_t         size;/**< size of the I/O region */
size_t         size;/**< size of the I/O region */
unsigned long      page_shift; /**< page shift of I/O region */
unsigned long      page_shift; /**< page shift of I/...
metal_phys_addr_t  page_mask;  /**< page mask of I/O region */
metal_phys_addr_t  page_mask;  /**< page mask of I/O...
unsigned int       mem_flags;  /**< memory attribute of the I/O region */
unsigned int       mem_flags;  /**< memory attribute...
struct metal_io_ops    ops;        /**< I/O region operations */
struct metal_io_ops    ops;        /**< I/O region o...
Text is not SVG - cannot display