From: Rob Herring <robh@kernel.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Tom Joseph <tjoseph@cadence.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found
Date: Mon, 9 Nov 2020 15:42:59 -0600 [thread overview]
Message-ID: <20201109214259.GA1806607@bogus> (raw)
In-Reply-To: <20201106151107.3987-3-kishon@ti.com>
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
>
next prev parent reply other threads:[~2020-11-09 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-11-20 17:24 ` [PATCH 0/2] PCI: Make "cdns,max-outbound-regions" optional DT property Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201109214259.GA1806607@bogus \
--to=robh@kernel.org \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=tjoseph@cadence.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).