/* Generate a VME bus interrupt at the requested level & vector. Wait for interrupt to be acked.  */
int tsi148_irq_generate(int level, int statid)
/* Generate a VME bus interrupt at the requested level & vector. Wait for interrupt to be acked.  */
int tsi148_irq_generate(int level, int statid)
{
	u32 tmp;
	mutex_lock(&(vme_int));
	tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_VICR);
	tmp = (tmp & ~TSI148_LCSR_VICR_STID_M) |
		(statid & TSI148_LCSR_VICR_STID_M);
	iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_VICR);
	tmp = tmp | TSI148_LCSR_VICR_IRQL[level];
	iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_VICR);
	wait_event_interruptible(iack_queue, tsi148_iack_received());
	mutex_unlock(&(vme_int));
	return 0;
}