/* Return: 1 (true) for active line and 0 (false) for no link (timeout)  */
static int wait_link_up(struct pcie_dw_ti *pci)
/* Return: 1 (true) for active line and 0 (false) for no link (timeout)  */
static int wait_link_up(struct pcie_dw_ti *pci)
{
	unsigned long timeout;
	timeout = get_timer(0) + PCIE_LINK_UP_TIMEOUT_MS;
	while (!is_link_up(pci)) {
		if (get_timer(0) > timeout)
			return 0;
	};
	return 1;
}