/* Return: 0 if wait succeeded, -ve if error occurred  */
static int aux_wait_ready(struct udevice *dev)
/* Return: 0 if wait succeeded, -ve if error occurred  */
static int aux_wait_ready(struct udevice *dev)
{
	int status;
	u32 timeout = 100;
	do {
		status = get_reg(dev, REG_INTERRUPT_SIG_STATE);
		if (!timeout--)
			return -ETIMEDOUT;
		udelay(20);
	} while (status & REPLY_STATUS_REPLY_IN_PROGRESS_MASK);
	return 0;
}