[U-Boot] [PATCH v2 10/12] dm: pci: Save devfn without bus number in pci_uclass_child_post_bind()

Simon Glass sjg at chromium.org
Sat Aug 22 01:27:46 CEST 2015


On 20 August 2015 at 07:40, Bin Meng <bmeng.cn at gmail.com> wrote:
> In pci_uclass_child_post_bind(), bdf is extracted from fdt_pci_addr.
> Mask bus number before save it to pplat->devfn.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
> Changes in v2: None
>
>  drivers/pci/pci-uclass.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
> index 63e85b9..4a509a2 100644
> --- a/drivers/pci/pci-uclass.c
> +++ b/drivers/pci/pci-uclass.c
> @@ -787,8 +787,8 @@ static int pci_uclass_child_post_bind(struct udevice *dev)
>                 if (ret != -ENOENT)
>                         return -EINVAL;
>         } else {
> -               /* extract the bdf from fdt_pci_addr */
> -               pplat->devfn = addr.phys_hi & 0xffff00;
> +               /* extract the devfn from fdt_pci_addr */
> +               pplat->devfn = addr.phys_hi & 0xff00;
>         }
>
>         return 0;
> --
> 1.8.2.1
>

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list