/* Return 1 (true) on link up. Return 0 (false) on link down.  */
static int pcie_advk_link_up(struct pcie_advk *pcie)
/* Return 1 (true) on link up. Return 0 (false) on link down.  */
static int pcie_advk_link_up(struct pcie_advk *pcie)
{
	u32 val, ltssm_state;
	val = advk_readl(pcie, CFG_REG);
	ltssm_state = (val >> LTSSM_SHIFT) & LTSSM_MASK;
	return ltssm_state >= LTSSM_L0;
}