Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bhnd/bhnd_bus_if.m
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | CODE { | ||||
static bool | static bool | ||||
bhnd_bus_null_is_hw_suspended(device_t dev, device_t child) | bhnd_bus_null_is_hw_suspended(device_t dev, device_t child) | ||||
{ | { | ||||
panic("bhnd_bus_is_hw_suspended unimplemented"); | panic("bhnd_bus_is_hw_suspended unimplemented"); | ||||
} | } | ||||
static int | static int | ||||
bhnd_bus_null_reset_hw(device_t dev, device_t child, uint16_t ioctl) | bhnd_bus_null_reset_hw(device_t dev, device_t child, uint16_t ioctl, | ||||
uint16_t reset_ioctl) | |||||
{ | { | ||||
panic("bhnd_bus_reset_hw unimplemented"); | panic("bhnd_bus_reset_hw unimplemented"); | ||||
} | } | ||||
static int | static int | ||||
bhnd_bus_null_suspend_hw(device_t dev, device_t child) | bhnd_bus_null_suspend_hw(device_t dev, device_t child) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 511 Lines • ▼ Show 20 Lines | |||||
* @retval false If @p child is clocked and is not held in RESET. | * @retval false If @p child is clocked and is not held in RESET. | ||||
*/ | */ | ||||
METHOD bool is_hw_suspended { | METHOD bool is_hw_suspended { | ||||
device_t dev; | device_t dev; | ||||
device_t child; | device_t child; | ||||
} DEFAULT bhnd_bus_null_is_hw_suspended; | } DEFAULT bhnd_bus_null_is_hw_suspended; | ||||
/** | /** | ||||
* Place the bhnd(4) device's hardware into a reset state, and then bring the | * Place the bhnd(4) device's hardware into a low-power RESET state with | ||||
* hardware out of reset with BHND_IOCTL_CLK_EN and @p ioctl flags set. | * the @p reset_ioctl I/O control flags set, and then bring the hardware out of | ||||
* RESET with the @p ioctl I/O control flags set. | |||||
* | * | ||||
* Any clock or resource PMU requests previously made by @p child will be | * Any clock or resource PMU requests previously made by @p child will be | ||||
* invalidated. | * invalidated. | ||||
* | * | ||||
* @param dev The bhnd bus parent of @p child. | * @param dev The bhnd bus parent of @p child. | ||||
* @param child The device to be reset. | * @param child The device to be reset. | ||||
* @param ioctl Device-specific core ioctl flags to be supplied on reset | * @param ioctl Device-specific I/O control flags to be set when bringing | ||||
* (see BHND_IOCTL_*). | * the core out of its RESET state (see BHND_IOCTL_*). | ||||
* @param reset_ioctl Device-specific I/O control flags to be set when placing | |||||
* the core into its RESET state. | |||||
* | * | ||||
* @retval 0 success | * @retval 0 success | ||||
* @retval non-zero error | * @retval non-zero error | ||||
*/ | */ | ||||
METHOD int reset_hw { | METHOD int reset_hw { | ||||
device_t dev; | device_t dev; | ||||
device_t child; | device_t child; | ||||
uint16_t ioctl; | uint16_t ioctl; | ||||
uint16_t reset_ioctl; | |||||
} DEFAULT bhnd_bus_null_reset_hw; | } DEFAULT bhnd_bus_null_reset_hw; | ||||
/** | /** | ||||
* Suspend @p child's hardware in a low-power reset state. | * Suspend @p child's hardware in a low-power RESET state. | ||||
* | * | ||||
* Any clock or resource PMU requests previously made by @p dev will be | * Any clock or resource PMU requests previously made by @p dev will be | ||||
* invalidated. | * invalidated. | ||||
* | * | ||||
* The hardware may be brought out of reset via bhnd_reset_hw(). | * The hardware may be brought out of RESET via bhnd_reset_hw(). | ||||
* | * | ||||
* @param dev The bhnd bus parent of @p child. | * @param dev The bhnd bus parent of @p child. | ||||
* @param dev The device to be suspended. | * @param dev The device to be suspended. | ||||
* @param ioctl Device-specific I/O control flags to be set when placing | |||||
* the core into its RESET state (see BHND_IOCTL_*). | |||||
* | * | ||||
* @retval 0 success | * @retval 0 success | ||||
* @retval non-zero error | * @retval non-zero error | ||||
*/ | */ | ||||
METHOD int suspend_hw { | METHOD int suspend_hw { | ||||
device_t dev; | device_t dev; | ||||
device_t child; | device_t child; | ||||
uint16_t ioctl; | |||||
} DEFAULT bhnd_bus_null_suspend_hw; | } DEFAULT bhnd_bus_null_suspend_hw; | ||||
/** | /** | ||||
* Allocate per-core PMU resources and enable PMU request handling for @p child. | * Allocate per-core PMU resources and enable PMU request handling for @p child. | ||||
* | * | ||||
* The region containing the core's PMU register block (if any) must be | * The region containing the core's PMU register block (if any) must be | ||||
* allocated via bus_alloc_resource(9) (or bhnd_alloc_resource) before | * allocated via bus_alloc_resource(9) (or bhnd_alloc_resource) before | ||||
* calling BHND_BUS_ALLOC_PMU(), and must not be released until after | * calling BHND_BUS_ALLOC_PMU(), and must not be released until after | ||||
▲ Show 20 Lines • Show All 971 Lines • Show Last 20 Lines |