Re: [linux-yocto] [kernel v5.10/standard/nxp-sdk-5.4/nxp-imx8][PATCH] PCI: imx: Update the method of obtaining PCI bridge resources to correctly identify the pci device
merged. Bruce In message: [linux-yocto] [kernel v5.10/standard/nxp-sdk-5.4/nxp-imx8][PATCH] PCI: imx: Update the method of obtaining PCI bridge resources to correctly identify the pci device on 22/03/2021 Xiaolei Wang wrote: > The PCI bridge resources are stored in pci_host_bridge.windows, > mem_base under pcie_port has been removed, so update the resources > interface to correctly identify pcie device > > Signed-off-by: Xiaolei Wang > --- > drivers/pci/controller/dwc/pci-imx6.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c > b/drivers/pci/controller/dwc/pci-imx6.c > index 2bb46bc02c1b..1afae9d4b7c0 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -1987,10 +1987,13 @@ static u64 imx6_pcie_cpu_addr_fixup(struct dw_pcie > *pcie, u64 cpu_addr) > struct dw_pcie_ep *ep = >ep; > struct pcie_port *pp = >pp; > struct imx6_pcie *imx6_pcie = to_imx6_pcie(pcie); > + struct resource_entry *entry; > > - if (imx6_pcie->drvdata->mode == DW_PCIE_RC_TYPE) > - offset = pp->mem_base; > - else > + if (imx6_pcie->drvdata->mode == DW_PCIE_RC_TYPE) { > + entry = resource_list_first_type(>bridge->windows, > + IORESOURCE_MEM); > + offset = entry->res->start; > + } else > offset = ep->phys_base; > > if (imx6_pcie->drvdata->flags & IMX6_PCIE_FLAG_IMX6_CPU_ADDR_FIXUP) > -- > 2.25.1 > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9601): https://lists.yoctoproject.org/g/linux-yocto/message/9601 Mute This Topic: https://lists.yoctoproject.org/mt/81517591/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[linux-yocto] [kernel v5.10/standard/nxp-sdk-5.4/nxp-imx8][PATCH] PCI: imx: Update the method of obtaining PCI bridge resources to correctly identify the pci device
The PCI bridge resources are stored in pci_host_bridge.windows, mem_base under pcie_port has been removed, so update the resources interface to correctly identify pcie device Signed-off-by: Xiaolei Wang --- drivers/pci/controller/dwc/pci-imx6.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 2bb46bc02c1b..1afae9d4b7c0 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1987,10 +1987,13 @@ static u64 imx6_pcie_cpu_addr_fixup(struct dw_pcie *pcie, u64 cpu_addr) struct dw_pcie_ep *ep = >ep; struct pcie_port *pp = >pp; struct imx6_pcie *imx6_pcie = to_imx6_pcie(pcie); + struct resource_entry *entry; - if (imx6_pcie->drvdata->mode == DW_PCIE_RC_TYPE) - offset = pp->mem_base; - else + if (imx6_pcie->drvdata->mode == DW_PCIE_RC_TYPE) { + entry = resource_list_first_type(>bridge->windows, +IORESOURCE_MEM); + offset = entry->res->start; + } else offset = ep->phys_base; if (imx6_pcie->drvdata->flags & IMX6_PCIE_FLAG_IMX6_CPU_ADDR_FIXUP) -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9597): https://lists.yoctoproject.org/g/linux-yocto/message/9597 Mute This Topic: https://lists.yoctoproject.org/mt/81517591/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-