PCI: imx: do not remap invalid res
PATCH 1/1 PCI: imx: do not remap invalid res
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resource
This occurs because the atu is not specified in the DT and as such it should not be remapped.
--- drivers/pci/controller/dwc/pcie-designware.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/pci/controller/dwc/pcie-designware.c +4 -3
@@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)if (!pci->atu_base) {struct resource *res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"atu" ); -if (res) +if (res) { pci->atu_size =resource_size (res); - pci->atu_base =devm_ioremap_resource (dev, res); -if (IS_ERR (pci->atu_base)) + pci->atu_base =devm_ioremap_resource (dev, res); + } +if (!pci->atu_base ||IS_ERR (pci->atu_base)) pci->atu_base = pci->dbi_base +DEFAULT_DBI_ATU_OFFSET ; }
Signature · 1 line
2.17.1
Quoted 33 lines · Tim Harvey
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resourceThis occurs because the atu is not specified in the DT and as such it should not be remapped.
Cc Richard Zhu <[email protected]>Signed-off-by Tim Harvey <[email protected]>--- drivers/pci/controller/dwc/pcie-designware.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/pci/controller/dwc/pcie-designware.c +4
-4@@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)if (!pci->atu_base) {struct resource *res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"atu" ); -if (res) +if (res) { pci->atu_size =resource_size (res); - pci->atu_base =devm_ioremap_resource (dev, res); -if (IS_ERR (pci->atu_base)) + pci->atu_base =devm_ioremap_resource (dev, res); + } +if (!pci->atu_base ||IS_ERR (pci->atu_base)) pci->atu_base = pci->dbi_base +DEFAULT_DBI_ATU_OFFSET ; } --
Quoted 2 lines
2.17.1
ping - any feedback on this?
Best regards,
Tim
Quoted 13 lines
-----Original Message-----
From: Tim Harvey <[email protected]>
Sent: Thursday, December 2, 2021 6:07 AM
To: Jingoo Han <[email protected]>; Gustavo Pimentel <[email protected]>; Rob Herring <[email protected]>; Lorenzo Pieralisi <[email protected]>; Krzysztof Wilczyński <[email protected]>; Bjorn Helgaas <[email protected]>; [email protected]
Cc: open list <[email protected]>; Hongxing Zhu <[email protected]>
Subject: Re: [PATCH] PCI: imx: do not remap invalid res
Quoted 11 lines
Quoted 9 lines · Tim Harvey
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resourceThis occurs because the atu is not specified in the DT and as such it should not be remapped.
Cc Richard Zhu <[email protected]>Signed-off-by Tim Harvey <[email protected]>
[Richard Zhu] Please merge Rob's commit log changes. Then, Acked-by: Richard Zhu <[email protected]>
Best Regards
Richard Zhu
Quoted 40 lines
drivers/pci/controller/dwc/pcie-designware.c void dw_pcie_iatu_detect(struct dw_pcie
Quoted 10 lines
--- drivers/pci/controller/dwc/pcie-designware.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/pci/controller/dwc/pcie-designware.c +0
-0@@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie*pci)
drivers/pci/controller/dwc/pcie-designware.c void dw_pcie_iatu_detect(struct dw_pcie *pci) · line 681
Quoted 3 lines
drivers/pci/controller/dwc/pcie-designware.c +0
-0if (!pci->atu_base) { struct resource *res =
platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");drivers/pci/controller/dwc/pcie-designware.c void dw_pcie_iatu_detect(struct dw_pcie *pci)
Quoted 3 lines
drivers/pci/controller/dwc/pcie-designware.c +1
-1-if (res) +if (res) { pci->atu_size =
resource_size(res);drivers/pci/controller/dwc/pcie-designware.c void dw_pcie_iatu_detect(struct dw_pcie · line 676
Quoted 1 line
drivers/pci/controller/dwc/pcie-designware.c +0
-1- pci->atu_base =
devm_ioremap_resource(dev, res);drivers/pci/controller/dwc/pcie-designware.c void dw_pcie_iatu_detect(struct dw_pcie · line 676
Quoted 2 lines
drivers/pci/controller/dwc/pcie-designware.c +1
-1-if (IS_ERR (pci->atu_base)) + pci->atu_base =
devm_ioremap_resource(dev, res);drivers/pci/controller/dwc/pcie-designware.c void dw_pcie_iatu_detect(struct dw_pcie · line 678
Quoted 2 lines
drivers/pci/controller/dwc/pcie-designware.c +2
-0+ } + if (!pci->atu_base ||
IS_ERR(pci->atu_base))drivers/pci/controller/dwc/pcie-designware.c void dw_pcie_iatu_detect(struct dw_pcie · line 679
Quoted 1 line
drivers/pci/controller/dwc/pcie-designware.c +0
-0pci->atu_base = pci->dbi_base+
DEFAULT_DBI_ATU_OFFSET;Quoted 5 lines
drivers/pci/controller/dwc/pcie-designware.c +0
-1} --2.17.1
ping - any feedback on this?
Best regards,
Tim
Rob Herring
reviewerQuoted 13 lines · Hongxing Zhu
Quoted 13 lines
-----Original Message-----
From: Tim Harvey <[email protected]>
Sent: Thursday, December 2, 2021 6:07 AM
To: Jingoo Han <[email protected]>; Gustavo Pimentel <[email protected]>; Rob Herring <[email protected]>; Lorenzo Pieralisi <[email protected]>; Krzysztof Wilczyński <[email protected]>; Bjorn Helgaas <[email protected]>; [email protected]
Cc: open list <[email protected]>; Hongxing Zhu <[email protected]>
Subject: Re: [PATCH] PCI: imx: do not remap invalid res
Please fix your quoting style with all the headers (hint: don't use Outlook). It's base64 encoded too which isn't ideal for maillists, but somewhat tolerated nowadays.
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines · Tim Harvey
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resource
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
This occurs because the atu is not specified in the DT and as such it should not be remapped.
Cc Richard Zhu <[email protected]>Signed-off-by Tim Harvey <[email protected]>[Richard Zhu] Please merge Rob's commit log changes.
The maintainer tools do that automatically.
Quoted 1 line
Then, Acked-by: Richard Zhu <[email protected]>
But probably not when you prefix your tag with 'Then, '... :(
Rob
Quoted 33 lines · Tim Harvey
Quoted 32 lines · Tim Harvey
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resourceThis occurs because the atu is not specified in the DT and as such it should not be remapped.
Cc Richard Zhu <[email protected]>Signed-off-by Tim Harvey <[email protected]>--- drivers/pci/controller/dwc/pcie-designware.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/pci/controller/dwc/pcie-designware.c +4
-3@@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)if (!pci->atu_base) {struct resource *res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"atu" ); -if (res) +if (res) { pci->atu_size =resource_size (res); - pci->atu_base =devm_ioremap_resource (dev, res); -if (IS_ERR (pci->atu_base)) + pci->atu_base =devm_ioremap_resource (dev, res); + } +if (!pci->atu_base ||IS_ERR (pci->atu_base)) pci->atu_base = pci->dbi_base +DEFAULT_DBI_ATU_OFFSET ; }
Quoted 5 lines
Quoted 3 lines
--
2.17.1ping - any feedback on this?
Looks like Lorenzo corrected the subject line for you and applied it:
https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?id=6e5ebc96ec65
Quoted 41 lines · Bjorn Helgaas
Quoted 33 lines · Tim Harvey
Quoted 32 lines · Tim Harvey
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resourceThis occurs because the atu is not specified in the DT and as such it should not be remapped.
Cc Richard Zhu <[email protected]>Signed-off-by Tim Harvey <[email protected]>--- drivers/pci/controller/dwc/pcie-designware.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/pci/controller/dwc/pcie-designware.c +4
-3@@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)if (!pci->atu_base) {struct resource *res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"atu" ); -if (res) +if (res) { pci->atu_size =resource_size (res); - pci->atu_base =devm_ioremap_resource (dev, res); -if (IS_ERR (pci->atu_base)) + pci->atu_base =devm_ioremap_resource (dev, res); + } +if (!pci->atu_base ||IS_ERR (pci->atu_base)) pci->atu_base = pci->dbi_base +DEFAULT_DBI_ATU_OFFSET ; }Quoted 5 lines
Quoted 3 lines
--
2.17.1ping - any feedback on this?
Quoted 3 lines
Looks like Lorenzo corrected the subject line for you and applied it:
https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?id=6e5ebc96ec65
Yes, I saw that. Thanks everyone!
Best regards,
Tim
Quoted 7 lines · Tim Harvey
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resourceThis occurs because the atu is not specified in the DT and as such it should not be remapped.
Quoted 5 lines
Cc Richard Zhu <[email protected]>Signed-off-by Tim Harvey <[email protected]>--- drivers/pci/controller/dwc/pcie-designware.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Lorenzo Pieralisi
AppliedQuoted 8 lines · Tim Harvey
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resourceThis occurs because the atu is not specified in the DT and as such it should not be remapped.
[...]
Applied to pci/dwc, thanks!
[1/1] PCI: imx: do not remap invalid res
https://git.kernel.org/lpieralisi/pci/c/6e5ebc96ec
Thanks,
Lorenzo