Message ID | 20201109171937.28326-3-vidyas@nvidia.com |
---|---|
State | Deferred |
Headers | show |
Series | Enhancements to Tegra194 PCIe driver | expand |
On Mon, Nov 09, 2020 at 10:49:33PM +0530, Vidya Sagar wrote: > As specified in the comment for pci_remap_cfgspace() define in > arch/arm64/include/asm/io.h file, PCIe configuration space should be > mapped as nGnRnE. Hence changing to dev_pci_remap_cfgspace() from > devm_ioremap_resource() for mapping DBI space as that is nothing but > the root port's own configuration space. > > Signed-off-by: Vidya Sagar <vidyas@nvidia.com> > --- > V4: > * None > > V3: > * None > > V2: > * Changed 'Strongly Ordered' to 'nGnRnE' > > drivers/pci/controller/dwc/pcie-tegra194.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c > index b172b1d49713..7a0c64436861 100644 > --- a/drivers/pci/controller/dwc/pcie-tegra194.c > +++ b/drivers/pci/controller/dwc/pcie-tegra194.c > @@ -2108,7 +2108,9 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev) > } > pcie->dbi_res = dbi_res; > > - pci->dbi_base = devm_ioremap_resource(dev, dbi_res); > + pci->dbi_base = devm_pci_remap_cfgspace(dev, > + dbi_res->start, > + resource_size(dbi_res)); > if (IS_ERR(pci->dbi_base)) > return PTR_ERR(pci->dbi_base); > Similarly to patch 1/6, this is no longer required because it's already part of one of Rob's earlier patches, so this, too, can be dropped. Thierry
> -----Original Message----- > From: Thierry Reding <thierry.reding@gmail.com> > Sent: Thursday, November 26, 2020 5:04 PM > To: Vidya Sagar <vidyas@nvidia.com> > Cc: lorenzo.pieralisi@arm.com; robh+dt@kernel.org; bhelgaas@google.com; > Jonathan Hunter <jonathanh@nvidia.com>; amanharitsh123@gmail.com; > dinghao.liu@zju.edu.cn; kw@linux.com; linux-pci@vger.kernel.org; linux- > tegra@vger.kernel.org; linux-kernel@vger.kernel.org; Krishna Thota > <kthota@nvidia.com>; Manikanta Maddireddy <mmaddireddy@nvidia.com>; > sagar.tv@gmail.com > Subject: Re: [PATCH V4 2/6] PCI: tegra: Map configuration space as nGnRnE > > On Mon, Nov 09, 2020 at 10:49:33PM +0530, Vidya Sagar wrote: > > As specified in the comment for pci_remap_cfgspace() define in > > arch/arm64/include/asm/io.h file, PCIe configuration space should be > > mapped as nGnRnE. Hence changing to dev_pci_remap_cfgspace() from > > devm_ioremap_resource() for mapping DBI space as that is nothing but > > the root port's own configuration space. > > > > Signed-off-by: Vidya Sagar <vidyas@nvidia.com> > > --- > > V4: > > * None > > > > V3: > > * None > > > > V2: > > * Changed 'Strongly Ordered' to 'nGnRnE' > > > > drivers/pci/controller/dwc/pcie-tegra194.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c > > b/drivers/pci/controller/dwc/pcie-tegra194.c > > index b172b1d49713..7a0c64436861 100644 > > --- a/drivers/pci/controller/dwc/pcie-tegra194.c > > +++ b/drivers/pci/controller/dwc/pcie-tegra194.c > > @@ -2108,7 +2108,9 @@ static int tegra_pcie_dw_probe(struct > platform_device *pdev) > > } > > pcie->dbi_res = dbi_res; > > > > - pci->dbi_base = devm_ioremap_resource(dev, dbi_res); > > + pci->dbi_base = devm_pci_remap_cfgspace(dev, > > + dbi_res->start, > > + resource_size(dbi_res)); > > if (IS_ERR(pci->dbi_base)) > > return PTR_ERR(pci->dbi_base); > > > > Similarly to patch 1/6, this is no longer required because it's already part of one > of Rob's earlier patches, so this, too, can be dropped. Yes. This patch is not required now. I'll drop it from the next patch series. Thanks, Vidya Sagar > > Thierry
diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index b172b1d49713..7a0c64436861 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -2108,7 +2108,9 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev) } pcie->dbi_res = dbi_res; - pci->dbi_base = devm_ioremap_resource(dev, dbi_res); + pci->dbi_base = devm_pci_remap_cfgspace(dev, + dbi_res->start, + resource_size(dbi_res)); if (IS_ERR(pci->dbi_base)) return PTR_ERR(pci->dbi_base);
As specified in the comment for pci_remap_cfgspace() define in arch/arm64/include/asm/io.h file, PCIe configuration space should be mapped as nGnRnE. Hence changing to dev_pci_remap_cfgspace() from devm_ioremap_resource() for mapping DBI space as that is nothing but the root port's own configuration space. Signed-off-by: Vidya Sagar <vidyas@nvidia.com> --- V4: * None V3: * None V2: * Changed 'Strongly Ordered' to 'nGnRnE' drivers/pci/controller/dwc/pcie-tegra194.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)