/* Return: 1 (true) for active line and 0 (false) for no link  */
static int is_link_up(const void *regs_base)
/* Return: 1 (true) for active line and 0 (false) for no link  */
static int is_link_up(const void *regs_base)
{
	u32 mask = PCIE_GLB_STS_RDLH_LINK_UP | PCIE_GLB_STS_PHY_LINK_UP;
	u32 reg;
	reg = readl(regs_base + PCIE_GLOBAL_STATUS);
	if ((reg & mask) == mask)
		return 1;
	return 0;
}