[U-Boot] [PATCH v0 1/5] pci: mvebu: Fix Armada 38x support

Dirk Eibach dirk.eibach at gdsys.cc
Wed Nov 18 13:48:12 CET 2015


Hi Anton,

2015-11-17 13:55 GMT+01:00 Anton Schubert <anton.schubert at gmx.de>:
> Hi Dirk,
>
> 2015-10-28 16:44 GMT+01:00 <dirk.eibach at gdsys.cc>:
>>
>> From: Dirk Eibach <dirk.eibach at gdsys.cc>
>>
>> @@ -344,7 +345,6 @@ void pci_init_board(void)
>>
>>                 /* Don't read at all from pci registers if port power is
>> down */
>>                 if (pcie->lane == 0 && SELECT(soc_ctrl, pcie->port) == 0)
>> {
>> -                       i += 3;
>>                         debug("%s: skipping port %d\n", __func__,
>> pcie->port);
>>                         continue;
>>                 }
>
>
> Is there a specific reason why you removed this line or was it just by
> mistake? Because I think doing so would break Armada XP in certain Serdes
> Configurations, as it doesn't like it's PCI registers being read if the port
> is off.

I assume the idea is to go to the next port if the current port is
disabled. But adding 3 to the index does not seem to be the right
thing to do, since Armada XP has ports with 4 lanes, but also with
ports with one lane.
I assume that iterating over all lanes would not be a problem, but by
mistake the pcie->lane == 0  was left in the condition. So this should
perform better:

/* Don't read at all from pci registers if port power is down */
if (SELECT(soc_ctrl, pcie->port) == 0) {
    if (pcie->lane == 0)
        debug("%s: skipping port %d\n", __func__, pcie->port);
    continue;
}

What do you think?

Cheers
Dirk


More information about the U-Boot mailing list