/* Return 1 (true) if PIO access is accomplished. Return 0 (false) if PIO access is timed out.  */
static int pcie_advk_wait_pio(struct pcie_advk *pcie)
/* Return 1 (true) if PIO access is accomplished. Return 0 (false) if PIO access is timed out.  */
static int pcie_advk_wait_pio(struct pcie_advk *pcie)
{
	uint start, isr;
	uint count;
	for (count = 0; count < MAX_RETRIES; count++) {
		start = advk_readl(pcie, PIO_START);
		isr = advk_readl(pcie, PIO_ISR);
		if (!start && isr)
			return 1;
		udelay(PIO_WAIT_TIMEOUT);
	}
	dev_err(pcie->dev, "config read/write timed out\n");
	return 0;
}