/* Wait for the On-Board Processor to return its start-up acknowledgement sequence. This wait is too long for us to perform "busy-waiting", and so we must sleep. This in turn means that we must not be holding any spinlocks when we call this function.  */
static int obp_startup_ack(struct soundscape *s, unsigned timeout)
/* Wait for the On-Board Processor to return its start-up acknowledgement sequence. This wait is too long for us to perform "busy-waiting", and so we must sleep. This in turn means that we must not be holding any spinlocks when we call this function.  */
static int obp_startup_ack(struct soundscape *s, unsigned timeout)
{
	unsigned long end_time = jiffies + msecs_to_jiffies(timeout);
	do {
		unsigned long flags;
		int x;
		spin_lock_irqsave(&s->lock, flags);
		x = host_read_unsafe(s->io_base);
		spin_unlock_irqrestore(&s->lock, flags);
		if (x == 0xfe || x == 0xff)
			return 1;
		msleep(10);
	} while (time_before(jiffies, end_time));
	return 0;
}