* [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint
@ 2014-06-12 19:49 Roy Zang
2014-06-12 20:56 ` Wolfgang Denk
2014-06-13 3:22 ` Prabhakar Kushwaha
0 siblings, 2 replies; 5+ messages in thread
From: Roy Zang @ 2014-06-12 19:49 UTC (permalink / raw)
To: u-boot
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 <tie-fei.zang@freescale.com>
---
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);
+ else
+ printf("no link, regs @ 0x%lx\n", pci_info->regs);
hose->last_busno = hose->first_busno;
return;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint
2014-06-12 19:49 [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint Roy Zang
@ 2014-06-12 20:56 ` Wolfgang Denk
2014-06-20 20:56 ` Roy Zang
2014-06-13 3:22 ` Prabhakar Kushwaha
1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2014-06-12 20:56 UTC (permalink / raw)
To: u-boot
Dear Roy Zang,
In message <1402602563-26705-1-git-send-email-tie-fei.zang@freescale.com> you 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.
Sorry, but can you please explain what exactly you are doing here? I'm
sorry, but I don't understand above text.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Experience is what causes a person to make new mistakes instead of
old ones.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint
2014-06-12 19:49 [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint Roy Zang
2014-06-12 20:56 ` Wolfgang Denk
@ 2014-06-13 3:22 ` Prabhakar Kushwaha
2014-06-20 20:58 ` Roy Zang
1 sibling, 1 reply; 5+ messages in thread
From: Prabhakar Kushwaha @ 2014-06-13 3:22 UTC (permalink / raw)
To: u-boot
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 <tie-fei.zang@freescale.com>
> ---
> 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.
-prabhakar
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint
2014-06-12 20:56 ` Wolfgang Denk
@ 2014-06-20 20:56 ` Roy Zang
0 siblings, 0 replies; 5+ messages in thread
From: Roy Zang @ 2014-06-20 20:56 UTC (permalink / raw)
To: u-boot
On 06/12/2014 03:56 PM, Wolfgang Denk wrote:
> Dear Roy Zang,
>
> In message <1402602563-26705-1-git-send-email-tie-fei.zang@freescale.com> you 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.
> Sorry, but can you please explain what exactly you are doing here? I'm
> sorry, but I don't understand above text.
Freescale card acted as PCIe endpoint plugs into a X86 host via PCIe slot.
We do see some case that the u-boot prints "no link" when boot up,
however in X86 Linux, the pcie link sets up correctly. Host Linux boots
up slow than u-boot.
So if u-boot can capture the link up status, it will print the endpoint
link up status, or it will print "undetermined" to reduce confusion.
User can still confirm the link up status from host.
Thank.
Roy
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint
2014-06-13 3:22 ` Prabhakar Kushwaha
@ 2014-06-20 20:58 ` Roy Zang
0 siblings, 0 replies; 5+ messages in thread
From: Roy Zang @ 2014-06-20 20:58 UTC (permalink / raw)
To: u-boot
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 <tie-fei.zang@freescale.com>
>> ---
>> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-20 20:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 19:49 [U-Boot] [PATCH] fsl/pcie: Change 'no link' to 'undetermined' for pcie endpoint Roy Zang
2014-06-12 20:56 ` Wolfgang Denk
2014-06-20 20:56 ` Roy Zang
2014-06-13 3:22 ` Prabhakar Kushwaha
2014-06-20 20:58 ` Roy Zang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.