/* Polling the FPGA configuration status. Return 0 for success, non-zero for error.  */
static int reconfig_status_polling_resp(void)
/* Polling the FPGA configuration status. Return 0 for success, non-zero for error.  */
static int reconfig_status_polling_resp(void)
{
	int ret;
	unsigned long start = get_timer(0);
	while (1) {
		ret = mbox_get_fpga_config_status(MBOX_RECONFIG_STATUS);
		if (!ret)
			return 0;
		if (ret != MBOX_CFGSTAT_STATE_CONFIG)
			return ret;
		if (get_timer(start) > RECONFIG_STATUS_POLL_RESP_TIMEOUT_MS)
			break;
		puts(".");
		udelay(RECONFIG_STATUS_INTERVAL_DELAY_US);
	}
	return -ETIMEDOUT;
}