/* Wait until TFF is set in status register  */
static void smi_wait_xfer_finish(int timeout)
/* Wait until TFF is set in status register  */
static void smi_wait_xfer_finish(int timeout)
{
	while (timeout--) {
		if (readl(&smicntl->smi_sr) & TFF)
			break;
		udelay(1000);
	}
}