Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bhnd/bhnd.h
Show First 20 Lines • Show All 812 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static inline bool | static inline bool | ||||
bhnd_is_hw_suspended(device_t dev) | bhnd_is_hw_suspended(device_t dev) | ||||
{ | { | ||||
return (BHND_BUS_IS_HW_SUSPENDED(device_get_parent(dev), dev)); | return (BHND_BUS_IS_HW_SUSPENDED(device_get_parent(dev), dev)); | ||||
} | } | ||||
/** | /** | ||||
* 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 dev will be | * Any clock or resource PMU requests previously made by @p child will be | ||||
* invalidated. | * invalidated. | ||||
* | * | ||||
* @param dev The device to be reset. | * @param dev 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 | ||||
*/ | */ | ||||
static inline int | static inline int | ||||
bhnd_reset_hw(device_t dev, uint16_t ioctl) | bhnd_reset_hw(device_t dev, uint16_t ioctl, uint16_t reset_ioctl) | ||||
{ | { | ||||
return (BHND_BUS_RESET_HW(device_get_parent(dev), dev, ioctl)); | return (BHND_BUS_RESET_HW(device_get_parent(dev), dev, ioctl, | ||||
reset_ioctl)); | |||||
} | } | ||||
/** | /** | ||||
* 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 device to be suspended. | * @param dev The device to be suspended. | ||||
* | * | ||||
* @retval 0 success | * @retval 0 success | ||||
* @retval non-zero error | * @retval non-zero error | ||||
*/ | */ | ||||
static inline int | static inline int | ||||
bhnd_suspend_hw(device_t dev) | bhnd_suspend_hw(device_t dev, uint16_t ioctl) | ||||
{ | { | ||||
return (BHND_BUS_SUSPEND_HW(device_get_parent(dev), dev)); | return (BHND_BUS_SUSPEND_HW(device_get_parent(dev), dev, ioctl)); | ||||
} | } | ||||
/** | /** | ||||
* Return the BHND attachment type of the parent bhnd bus. | * Return the BHND attachment type of the parent bhnd bus. | ||||
* | * | ||||
* @param dev A bhnd bus child device. | * @param dev A bhnd bus child device. | ||||
* | * | ||||
* @retval BHND_ATTACH_ADAPTER if the bus is resident on a bridged adapter, | * @retval BHND_ATTACH_ADAPTER if the bus is resident on a bridged adapter, | ||||
▲ Show 20 Lines • Show All 872 Lines • Show Last 20 Lines |