linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property
@ 2020-11-06 15:11 Kishon Vijay Abraham I
  2020-11-06 15:11 ` [PATCH 1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property Kishon Vijay Abraham I
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kishon Vijay Abraham I @ 2020-11-06 15:11 UTC (permalink / raw)
  To: Bjorn Helgaas, Tom Joseph, Lorenzo Pieralisi, Rob Herring
  Cc: Kishon Vijay Abraham I, linux-pci, devicetree, linux-kernel

Make "cdns,max-outbound-regions" optional DT property in all the
platforms using Cadence PCIe core.

Kishon Vijay Abraham I (2):
  dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property
  PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found

 Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml  | 3 ---
 .../devicetree/bindings/pci/ti,j721e-pci-ep.yaml         | 2 --
 drivers/pci/controller/cadence/pcie-cadence-ep.c         | 9 +++------
 drivers/pci/controller/cadence/pcie-cadence.h            | 1 +
 4 files changed, 4 insertions(+), 11 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property
  2020-11-06 15:11 [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Kishon Vijay Abraham I
@ 2020-11-06 15:11 ` Kishon Vijay Abraham I
  2020-11-09 21:43   ` Rob Herring
  2020-11-06 15:11 ` [PATCH 2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found Kishon Vijay Abraham I
  2020-11-20 17:24 ` [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Lorenzo Pieralisi
  2 siblings, 1 reply; 6+ messages in thread
From: Kishon Vijay Abraham I @ 2020-11-06 15:11 UTC (permalink / raw)
  To: Bjorn Helgaas, Tom Joseph, Lorenzo Pieralisi, Rob Herring
  Cc: Kishon Vijay Abraham I, linux-pci, devicetree, linux-kernel

Make "cdns,max-outbound-regions" optional property with the default
being 32.

Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml    | 3 ---
 Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml | 2 --
 2 files changed, 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml
index 60b8baf299bb..21e8a8849076 100644
--- a/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml
@@ -20,7 +20,4 @@ properties:
     maximum: 32
     default: 32
 
-required:
-  - cdns,max-outbound-regions
-
 additionalProperties: true
diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml
index 3ae3e1a2d4b0..aae07b723fb5 100644
--- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml
@@ -57,7 +57,6 @@ required:
   - power-domains
   - clocks
   - clock-names
-  - cdns,max-outbound-regions
   - dma-coherent
   - max-functions
   - phys
@@ -86,7 +85,6 @@ examples:
            power-domains = <&k3_pds 239 TI_SCI_PD_EXCLUSIVE>;
            clocks = <&k3_clks 239 1>;
            clock-names = "fck";
-           cdns,max-outbound-regions = <16>;
            max-functions = /bits/ 8 <6>;
            dma-coherent;
            phys = <&serdes0_pcie_link>;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found
  2020-11-06 15:11 [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Kishon Vijay Abraham I
  2020-11-06 15:11 ` [PATCH 1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property Kishon Vijay Abraham I
@ 2020-11-06 15:11 ` Kishon Vijay Abraham I
  2020-11-09 21:42   ` Rob Herring
  2020-11-20 17:24 ` [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Lorenzo Pieralisi
  2 siblings, 1 reply; 6+ messages in thread
From: Kishon Vijay Abraham I @ 2020-11-06 15:11 UTC (permalink / raw)
  To: Bjorn Helgaas, Tom Joseph, Lorenzo Pieralisi, Rob Herring
  Cc: Kishon Vijay Abraham I, linux-pci, devicetree, linux-kernel

Now that "cdns,max-outbound-regions" is made an optional property, do
not error out if "cdns,max-outbound-regions" device tree property is
not found.

Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/pci/controller/cadence/pcie-cadence-ep.c | 9 +++------
 drivers/pci/controller/cadence/pcie-cadence.h    | 1 +
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c
index 254a3e1eff50..9a4195af958e 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-ep.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c
@@ -531,12 +531,9 @@ int cdns_pcie_ep_setup(struct cdns_pcie_ep *ep)
 	}
 	pcie->mem_res = res;
 
-	ret = of_property_read_u32(np, "cdns,max-outbound-regions",
-				   &ep->max_regions);
-	if (ret < 0) {
-		dev_err(dev, "missing \"cdns,max-outbound-regions\"\n");
-		return ret;
-	}
+	ep->max_regions = CDNS_PCIE_MAX_OB;
+	of_property_read_u32(np, "cdns,max-outbound-regions", &ep->max_regions);
+
 	ep->ob_addr = devm_kcalloc(dev,
 				   ep->max_regions, sizeof(*ep->ob_addr),
 				   GFP_KERNEL);
diff --git a/drivers/pci/controller/cadence/pcie-cadence.h b/drivers/pci/controller/cadence/pcie-cadence.h
index feed1e3038f4..30eba6cafe2c 100644
--- a/drivers/pci/controller/cadence/pcie-cadence.h
+++ b/drivers/pci/controller/cadence/pcie-cadence.h
@@ -197,6 +197,7 @@ enum cdns_pcie_rp_bar {
 };
 
 #define CDNS_PCIE_RP_MAX_IB	0x3
+#define CDNS_PCIE_MAX_OB	32
 
 struct cdns_pcie_rp_ib_bar {
 	u64 size;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found
  2020-11-06 15:11 ` [PATCH 2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found Kishon Vijay Abraham I
@ 2020-11-09 21:42   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-11-09 21:42 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Bjorn Helgaas, Tom Joseph, Lorenzo Pieralisi, linux-pci,
	devicetree, linux-kernel

On Fri, Nov 06, 2020 at 08:41:07PM +0530, Kishon Vijay Abraham I wrote:
> Now that "cdns,max-outbound-regions" is made an optional property, do
> not error out if "cdns,max-outbound-regions" device tree property is
> not found.
> 
> Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/pci/controller/cadence/pcie-cadence-ep.c | 9 +++------
>  drivers/pci/controller/cadence/pcie-cadence.h    | 1 +
>  2 files changed, 4 insertions(+), 6 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

> 
> diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c
> index 254a3e1eff50..9a4195af958e 100644
> --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c
> +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c
> @@ -531,12 +531,9 @@ int cdns_pcie_ep_setup(struct cdns_pcie_ep *ep)
>  	}
>  	pcie->mem_res = res;
>  
> -	ret = of_property_read_u32(np, "cdns,max-outbound-regions",
> -				   &ep->max_regions);
> -	if (ret < 0) {
> -		dev_err(dev, "missing \"cdns,max-outbound-regions\"\n");
> -		return ret;
> -	}
> +	ep->max_regions = CDNS_PCIE_MAX_OB;
> +	of_property_read_u32(np, "cdns,max-outbound-regions", &ep->max_regions);
> +
>  	ep->ob_addr = devm_kcalloc(dev,
>  				   ep->max_regions, sizeof(*ep->ob_addr),
>  				   GFP_KERNEL);
> diff --git a/drivers/pci/controller/cadence/pcie-cadence.h b/drivers/pci/controller/cadence/pcie-cadence.h
> index feed1e3038f4..30eba6cafe2c 100644
> --- a/drivers/pci/controller/cadence/pcie-cadence.h
> +++ b/drivers/pci/controller/cadence/pcie-cadence.h
> @@ -197,6 +197,7 @@ enum cdns_pcie_rp_bar {
>  };
>  
>  #define CDNS_PCIE_RP_MAX_IB	0x3
> +#define CDNS_PCIE_MAX_OB	32
>  
>  struct cdns_pcie_rp_ib_bar {
>  	u64 size;
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property
  2020-11-06 15:11 ` [PATCH 1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property Kishon Vijay Abraham I
@ 2020-11-09 21:43   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-11-09 21:43 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: devicetree, Rob Herring, Bjorn Helgaas, Lorenzo Pieralisi,
	linux-pci, linux-kernel, Tom Joseph

On Fri, 06 Nov 2020 20:41:06 +0530, Kishon Vijay Abraham I wrote:
> Make "cdns,max-outbound-regions" optional property with the default
> being 32.
> 
> Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml    | 3 ---
>  Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml | 2 --
>  2 files changed, 5 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property
  2020-11-06 15:11 [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Kishon Vijay Abraham I
  2020-11-06 15:11 ` [PATCH 1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property Kishon Vijay Abraham I
  2020-11-06 15:11 ` [PATCH 2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found Kishon Vijay Abraham I
@ 2020-11-20 17:24 ` Lorenzo Pieralisi
  2 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Pieralisi @ 2020-11-20 17:24 UTC (permalink / raw)
  To: Bjorn Helgaas, Tom Joseph, Rob Herring, Kishon Vijay Abraham I
  Cc: Lorenzo Pieralisi, devicetree, linux-kernel, linux-pci

On Fri, 6 Nov 2020 20:41:05 +0530, Kishon Vijay Abraham I wrote:
> Make "cdns,max-outbound-regions" optional DT property in all the
> platforms using Cadence PCIe core.
> 
> Kishon Vijay Abraham I (2):
>   dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property
>   PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found
> 
> [...]

Applied to pci/cadence, thanks!

[1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property
      https://git.kernel.org/lpieralisi/pci/c/4a2b9125c9
[2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found
      https://git.kernel.org/lpieralisi/pci/c/e87d17ca6a

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-20 17:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 15:11 [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Kishon Vijay Abraham I
2020-11-06 15:11 ` [PATCH 1/2] dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property Kishon Vijay Abraham I
2020-11-09 21:43   ` Rob Herring
2020-11-06 15:11 ` [PATCH 2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found Kishon Vijay Abraham I
2020-11-09 21:42   ` Rob Herring
2020-11-20 17:24 ` [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).