RTEMS CPU Kit with SuperCore
4.11.3
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <drvmgr/drvmgr.h>
#include <drvmgr/drvmgr_confdefs.h>
#include "drvmgr_internal.h"
Macros | |
#define | DBG(x...) |
Functions | |
void | _DRV_Manager_init_level (int level) |
Take all devices into init level 'level', all devices registered later will directly be taken into this level as well, ensuring that all registerd devices has been taken into the level. | |
void | _DRV_Manager_initialization (void) |
Initialize data structures of the driver management system. More... | |
void | drvmgr_init_update (void) |
int | drvmgr_root_drv_register (struct drvmgr_drv *drv) |
Register Root Bus device driver. | |
int | drvmgr_drv_register (struct drvmgr_drv *drv) |
Register a driver. | |
int | drvmgr_dev_register (struct drvmgr_dev *dev) |
Register a device. | |
int | drvmgr_bus_register (struct drvmgr_bus *bus) |
Register a bus. | |
int | drvmgr_alloc_dev (struct drvmgr_dev **pdev, int extra) |
Allocate a device structure, if no memory available rtems_error_fatal_occurred is called. More... | |
int | drvmgr_alloc_bus (struct drvmgr_bus **pbus, int extra) |
Allocate a bus structure, if no memory available rtems_error_fatal_occurred is called. More... | |
void | drvmgr_bus_res_add (struct drvmgr_bus *bus, struct drvmgr_bus_res *bres) |
Add resources to a bus, typically used by a bus driver. More... | |
Variables | |
struct drvmgr | drvmgr |
void _DRV_Manager_initialization | ( | void | ) |
Initialize data structures of the driver management system.
Calls predefined register driver functions so that drivers can register themselves.
Referenced by drvmgr_init(), and rtems_initialize_before_drivers().
int drvmgr_alloc_bus | ( | struct drvmgr_bus ** | pbus, |
int | extra | ||
) |
Allocate a bus structure, if no memory available rtems_error_fatal_occurred is called.
The 'extra' argment tells how many bytes extra space is to be allocated after the device structure, this is typically used for "businfo" structures. The extra space is always aligned to a 4-byte boundary.
int drvmgr_alloc_dev | ( | struct drvmgr_dev ** | pdev, |
int | extra | ||
) |
Allocate a device structure, if no memory available rtems_error_fatal_occurred is called.
The 'extra' argment tells how many bytes extra space is to be allocated after the device structure, this is typically used for "businfo" structures. The extra space is always aligned to a 4-byte boundary.
void drvmgr_bus_res_add | ( | struct drvmgr_bus * | bus, |
struct drvmgr_bus_res * | bres | ||
) |
Add resources to a bus, typically used by a bus driver.
bus | The Bus to add the resources to. |
res | An array with Driver resources, all together are called bus resources. |
References drvmgr_bus_res::next, and drvmgr_bus::reslist.