Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/bus_if.m
Show First 20 Lines • Show All 412 Lines • ▼ Show 20 Lines | METHOD int release_resource { | ||||
device_t _dev; | device_t _dev; | ||||
device_t _child; | device_t _child; | ||||
int _type; | int _type; | ||||
int _rid; | int _rid; | ||||
struct resource *_res; | struct resource *_res; | ||||
}; | }; | ||||
/** | /** | ||||
* @brief Map an interrupt | |||||
* | |||||
* This method is used to get an interrupt mapping data according to provided | |||||
* hints. The hints could be modified afterwards, but only if mapping data was | |||||
* allocated. This method is intended to be called before BUS_ALLOC_RESOURCE(). | |||||
* | |||||
* @param _dev the parent device of @p _child | |||||
* @param _child the device which is requesting an allocation | |||||
* @param _rid a pointer to the resource identifier | |||||
* @param _start a pointer to the hint at the start of the resource | |||||
* range - pass @c 0 for any start address | |||||
* @param _end a pointer to the hint at the end of the resource | |||||
* range - pass @c ~0 for any end address | |||||
* @param _count a pointer to the hint at the size of resource | |||||
* range required - pass @c 1 for any size | |||||
* @param _imd a pointer to the interrupt mapping data which was | |||||
* allocated | |||||
*/ | |||||
METHOD int map_intr { | |||||
device_t _dev; | |||||
device_t _child; | |||||
int *_rid; | |||||
rman_res_t *_start; | |||||
rman_res_t *_end; | |||||
rman_res_t *_count; | |||||
struct intr_map_data **_imd; | |||||
} DEFAULT bus_generic_map_intr; | |||||
/** | |||||
* @brief Install an interrupt handler | * @brief Install an interrupt handler | ||||
* | * | ||||
* This method is used to associate an interrupt handler function with | * This method is used to associate an interrupt handler function with | ||||
* an irq resource. When the interrupt triggers, the function @p _intr | * an irq resource. When the interrupt triggers, the function @p _intr | ||||
* will be called with the value of @p _arg as its single | * will be called with the value of @p _arg as its single | ||||
* argument. The value returned in @p *_cookiep is used to cancel the | * argument. The value returned in @p *_cookiep is used to cancel the | ||||
* interrupt handler - the caller should save this value to use in a | * interrupt handler - the caller should save this value to use in a | ||||
* future call to BUS_TEARDOWN_INTR(). | * future call to BUS_TEARDOWN_INTR(). | ||||
▲ Show 20 Lines • Show All 384 Lines • Show Last 20 Lines |