[PATCH u-boot-marvell 5/5] pci: pci_mvebu: set local dev to number 1

Stefan Roese sr at denx.de
Fri Feb 26 10:13:01 CET 2021


On 08.02.21 23:01, Marek Behún wrote:
> Linux displays the real PCIe card connected to a mvebu PCIe slot as
> device 0, not 1. This is done by setting local dev number to 1, so that
> the local "Marvell Memory controller" device is on address 1.
> 
> Let's do it also in U-Boot.
> 
> With this commit the pci command in U-Boot prints something like:
>    => pci
>    Scanning PCI devices on bus 0
>    BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
>    _____________________________________________________________
>    00.00.00   0x168c     0x003c     Network controller      0x80
> 
> Signed-off-by: Marek Behún <marek.behun at nic.cz>
> Cc: Stefan Roese <sr at denx.de>
> Cc: Phil Sutter <phil at nwl.cc>
> Cc: Mario Six <mario.six at gdsys.cc>
> Cc: Baruch Siach <baruch at tkos.co.il>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   drivers/pci/pci_mvebu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
> index 2d923b7d8d..11b590617d 100644
> --- a/drivers/pci/pci_mvebu.c
> +++ b/drivers/pci/pci_mvebu.c
> @@ -288,7 +288,7 @@ static int mvebu_pcie_probe(struct udevice *dev)
>   	      mvebu_pcie_get_local_dev_nr(pcie));
>   
>   	pcie->first_busno = bus;
> -	pcie->local_dev = 0;
> +	pcie->local_dev = 1;
>   
>   	mvebu_pcie_set_local_bus_nr(pcie, bus);
>   	mvebu_pcie_set_local_dev_nr(pcie, pcie->local_dev);
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list