/* atl1c_wait_until_idle - wait up to AT_HW_MAX_IDLE_DELAY reads of the idle status register until the device is actually idle  */
static u32 atl1c_wait_until_idle(struct atl1c_hw *hw)
/* atl1c_wait_until_idle - wait up to AT_HW_MAX_IDLE_DELAY reads of the idle status register until the device is actually idle  */
static u32 atl1c_wait_until_idle(struct atl1c_hw *hw)
{
	int timeout;
	u32 data;
	for (timeout = 0; timeout < AT_HW_MAX_IDLE_DELAY; timeout++) {
		AT_READ_REG(hw, REG_IDLE_STATUS, &data);
		if ((data & IDLE_STATUS_MASK) == 0)
			return 0;
		msleep(1);
	}
	return data;
}