From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roy Zang Date: Fri, 20 Jun 2014 15:58:20 -0500 Subject: [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint In-Reply-To: <539A6E68.4010305@freescale.com> References: <1402602563-26705-1-git-send-email-tie-fei.zang@freescale.com> <539A6E68.4010305@freescale.com> Message-ID: <53A4A06C.50003@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/12/2014 10:22 PM, Prabhakar Kushwaha wrote: > > Hi Roy, > > On 6/13/2014 1:19 AM, Roy Zang wrote: >> Even u-boot boots up, the pcie link may not setup correctly when >> Freescale SOC acts as endpoint. >> So change the link status from 'no link' to 'undetermined' to >> reduce the confusion. >> The link status can check from host side eventually. >> >> Signed-off-by: Roy Zang >> --- >> drivers/pci/fsl_pci_init.c | 10 ++++++++-- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c >> index 3a41b0e..231b075 100644 >> --- a/drivers/pci/fsl_pci_init.c >> +++ b/drivers/pci/fsl_pci_init.c >> @@ -504,8 +504,14 @@ void fsl_pci_init(struct pci_controller *hose, >> struct fsl_pci_info *pci_info) >> } >> #endif >> if (!enabled) { >> - /* Let the user know there's no PCIe link */ >> - printf("no link, regs @ 0x%lx\n", pci_info->regs); >> + /* Let the user know there's no PCIe link for root >> + * complex. for endpoint, the link may not setup, so >> + * print undetermined. >> + */ >> + if (fsl_is_pci_agent(hose)) >> + printf("undetermined, regs @ 0x%lx\n", pci_info->regs); > > As description of commit message saying "The link status can check > from host side eventually " > It will be good, if we can also print link status at this point to let > user know about status of end point. > however, the *no link* status prints by u-boot may not reflect the final link up status. It will cause confusion. Roy