[U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

Bin Meng bmeng.cn at gmail.com
Mon Jan 4 04:11:18 CET 2016


Hi Fabio,

On Thu, Dec 31, 2015 at 11:20 PM, Fabio Estevam <festevam at gmail.com> wrote:
> Hi Bin,
>
> On Thu, Dec 31, 2015 at 7:32 AM, Bin Meng <bmeng.cn at gmail.com> wrote:
>
>> I also see this behavior on ls1021atwr board. I agree with Simon, the
>> correct fix should fix the PCIe driver to return 0 instead of -EINVAL.
>
> Do you mean like this for imx?
>

Yes

> --- a/drivers/pci/pcie_imx.c
> +++ b/drivers/pci/pcie_imx.c
> @@ -381,7 +381,7 @@ static int imx_pcie_read_config(struct pci_controller *hose,
>         ret = imx_pcie_addr_valid(d);
>         if (ret) {
>                 *val = 0xffffffff;
> -               return ret;
> +               return 0;
>         }
>
>         va_address = get_bus_address(d, where);
>
> and like this for layerscape:
>

Yes

> --- a/drivers/pci/pcie_layerscape.c
> +++ b/drivers/pci/pcie_layerscape.c
> @@ -314,7 +314,7 @@ static int ls_pcie_read_config(struct pci_controller *hose,
>
>         if (ls_pcie_addr_valid(hose, d)) {
>                 *val = 0xffffffff;
> -               return -EINVAL;
> +               return 0;
>         }
>
>         if (PCI_BUS(d) == hose->first_busno)
>

Again, I was wondering why we created two drivers for the same (or
similar) PCIe IPs.

Regards,
Bin


More information about the U-Boot mailing list