Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bhnd/bhnd.h
Show First 20 Lines • Show All 328 Lines • ▼ Show 20 Lines | |||||
* @param rid The bus-specific handle identifying the resource being allocated. | * @param rid The bus-specific handle identifying the resource being allocated. | ||||
* @param start The start address of the resource. | * @param start The start address of the resource. | ||||
* @param end The end address of the resource. | * @param end The end address of the resource. | ||||
* @param count The size of the resource. | * @param count The size of the resource. | ||||
* @param flags The flags for the resource to be allocated. These may be any | * @param flags The flags for the resource to be allocated. These may be any | ||||
* values supported by the standard bus APIs. | * values supported by the standard bus APIs. | ||||
* | * | ||||
* To request the resource's default addresses, pass @p start and | * To request the resource's default addresses, pass @p start and | ||||
* @p end values of @c 0UL and @c ~0UL, respectively, and | * @p end values of @c 0 and @c ~0, respectively, and | ||||
* a @p count of @c 1. | * a @p count of @c 1. | ||||
* | * | ||||
* @retval NULL The resource could not be allocated. | * @retval NULL The resource could not be allocated. | ||||
* @retval resource The allocated resource. | * @retval resource The allocated resource. | ||||
*/ | */ | ||||
static inline struct bhnd_resource * | static inline struct bhnd_resource * | ||||
bhnd_alloc_resource(device_t dev, int type, int *rid, rman_res_t start, | bhnd_alloc_resource(device_t dev, int type, int *rid, rman_res_t start, | ||||
rman_res_t end, rman_res_t count, u_int flags) | rman_res_t end, rman_res_t count, u_int flags) | ||||
Show All 15 Lines | |||||
* values supported by the standard bus APIs. | * values supported by the standard bus APIs. | ||||
* | * | ||||
* @retval NULL The resource could not be allocated. | * @retval NULL The resource could not be allocated. | ||||
* @retval resource The allocated resource. | * @retval resource The allocated resource. | ||||
*/ | */ | ||||
static inline struct bhnd_resource * | static inline struct bhnd_resource * | ||||
bhnd_alloc_resource_any(device_t dev, int type, int *rid, u_int flags) | bhnd_alloc_resource_any(device_t dev, int type, int *rid, u_int flags) | ||||
{ | { | ||||
return bhnd_alloc_resource(dev, type, rid, 0UL, ~0UL, 1, flags); | return bhnd_alloc_resource(dev, type, rid, 0, ~0, 1, flags); | ||||
} | } | ||||
/** | /** | ||||
* Activate a previously allocated bhnd resource. | * Activate a previously allocated bhnd resource. | ||||
* | * | ||||
* @param dev The device holding ownership of the allocated resource. | * @param dev The device holding ownership of the allocated resource. | ||||
* @param type The type of the resource. | * @param type The type of the resource. | ||||
* @param rid The bus-specific handle identifying the resource. | * @param rid The bus-specific handle identifying the resource. | ||||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |