Message ID | 1440078028-29464-11-git-send-email-bmeng.cn@gmail.com |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
On 20 August 2015 at 07:40, Bin Meng <bmeng.cn@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@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@chromium.org>
On 21 August 2015 at 17:27, Simon Glass <sjg@chromium.org> wrote: > On 20 August 2015 at 07:40, Bin Meng <bmeng.cn@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@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@chromium.org> Applied to u-boot-x86, thanks!
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;
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@gmail.com> --- Changes in v2: None drivers/pci/pci-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)