From: Niklas Cassel <cassel@kernel.org>
To: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Richard Zhu" <hongxing.zhu@nxp.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Yue Wang" <yue.wang@amlogic.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Greentime Hu" <greentime.hu@sifive.com>,
"Samuel Holland" <samuel.holland@sifive.com>,
"Chuanhua Lei" <lchuanhua@maxlinear.com>,
"Marek Vasut" <marek.vasut+renesas@gmail.com>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Pratyush Anand" <pratyush.anand@gmail.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, imx@lists.linux.dev,
linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH 2/2] PCI: dwc: Add multi-port controller support
Date: Mon, 5 Jan 2026 17:19:38 +0100 [thread overview]
Message-ID: <aVvkmkd5mWPmxeiS@ryzen> (raw)
In-Reply-To: <20260105-dt-parser-v1-2-b11c63cb5e2c@oss.qualcomm.com>
On Mon, Jan 05, 2026 at 05:57:55PM +0530, Sumit Kumar wrote:
> The current DesignWare PCIe RC implementation supports only the controller
> (Host Bridge) node for specifying the Root Port properties in an assumption
> that the underlying platform only supports a single root Port per
> controller instance. This limits support for multi-port controllers where
> different ports may have different lane configurations and speed limits.
>
> Introduce a separate dw_pcie_port structure to enable multi-port support.
> Each Root Port can have independent lane count, speed limit through pcie@N
> child nodes in device tree. Add dw_pcie_parse_root_ports()
> API to parse these child nodes.
>
> Equalization presets and link width detection currently use common DBI
> space for all the root ports. Per-port DBI space assignment for these
> features will be added in future.
>
> Signed-off-by: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Hello Sumit,
Is there a reason why you represent this as a list of ports rather than a
simple array?
The number of ports is known by parsing the device tree, so it should be
static, no?
At least to me, this seem similar to e.g. how a gpio_device has multiple
gpio_descriptors "struct gpio_desc *descs":
https://github.com/torvalds/linux/blob/master/drivers/gpio/gpiolib.h#L68C1-L68C26
A list is usually used for something that is dynamic.
I don't think that the number of ports to a PCIe controller will be dynamic.
I can see that struct qcom_pcie in pcie-qcom.c has struct list_head ports,
but that does not necessarily mean that we need to have a list of ports in
pcie-designware-host.c. (pcie-qcom could also be modified to have an array
of ports if there is a desire for similar design pattern.)
Kind regards,
Niklas
WARNING: multiple messages have this Message-ID (diff)
From: Niklas Cassel <cassel@kernel.org>
To: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Richard Zhu" <hongxing.zhu@nxp.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Yue Wang" <yue.wang@amlogic.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Greentime Hu" <greentime.hu@sifive.com>,
"Samuel Holland" <samuel.holland@sifive.com>,
"Chuanhua Lei" <lchuanhua@maxlinear.com>,
"Marek Vasut" <marek.vasut+renesas@gmail.com>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Pratyush Anand" <pratyush.anand@gmail.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, imx@lists.linux.dev,
linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH 2/2] PCI: dwc: Add multi-port controller support
Date: Mon, 5 Jan 2026 17:19:38 +0100 [thread overview]
Message-ID: <aVvkmkd5mWPmxeiS@ryzen> (raw)
In-Reply-To: <20260105-dt-parser-v1-2-b11c63cb5e2c@oss.qualcomm.com>
On Mon, Jan 05, 2026 at 05:57:55PM +0530, Sumit Kumar wrote:
> The current DesignWare PCIe RC implementation supports only the controller
> (Host Bridge) node for specifying the Root Port properties in an assumption
> that the underlying platform only supports a single root Port per
> controller instance. This limits support for multi-port controllers where
> different ports may have different lane configurations and speed limits.
>
> Introduce a separate dw_pcie_port structure to enable multi-port support.
> Each Root Port can have independent lane count, speed limit through pcie@N
> child nodes in device tree. Add dw_pcie_parse_root_ports()
> API to parse these child nodes.
>
> Equalization presets and link width detection currently use common DBI
> space for all the root ports. Per-port DBI space assignment for these
> features will be added in future.
>
> Signed-off-by: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Hello Sumit,
Is there a reason why you represent this as a list of ports rather than a
simple array?
The number of ports is known by parsing the device tree, so it should be
static, no?
At least to me, this seem similar to e.g. how a gpio_device has multiple
gpio_descriptors "struct gpio_desc *descs":
https://github.com/torvalds/linux/blob/master/drivers/gpio/gpiolib.h#L68C1-L68C26
A list is usually used for something that is dynamic.
I don't think that the number of ports to a PCIe controller will be dynamic.
I can see that struct qcom_pcie in pcie-qcom.c has struct list_head ports,
but that does not necessarily mean that we need to have a list of ports in
pcie-designware-host.c. (pcie-qcom could also be modified to have an array
of ports if there is a desire for similar design pattern.)
Kind regards,
Niklas
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Niklas Cassel <cassel@kernel.org>
To: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Richard Zhu" <hongxing.zhu@nxp.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Yue Wang" <yue.wang@amlogic.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Greentime Hu" <greentime.hu@sifive.com>,
"Samuel Holland" <samuel.holland@sifive.com>,
"Chuanhua Lei" <lchuanhua@maxlinear.com>,
"Marek Vasut" <marek.vasut+renesas@gmail.com>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Pratyush Anand" <pratyush.anand@gmail.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, imx@lists.linux.dev,
linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH 2/2] PCI: dwc: Add multi-port controller support
Date: Mon, 5 Jan 2026 17:19:38 +0100 [thread overview]
Message-ID: <aVvkmkd5mWPmxeiS@ryzen> (raw)
In-Reply-To: <20260105-dt-parser-v1-2-b11c63cb5e2c@oss.qualcomm.com>
On Mon, Jan 05, 2026 at 05:57:55PM +0530, Sumit Kumar wrote:
> The current DesignWare PCIe RC implementation supports only the controller
> (Host Bridge) node for specifying the Root Port properties in an assumption
> that the underlying platform only supports a single root Port per
> controller instance. This limits support for multi-port controllers where
> different ports may have different lane configurations and speed limits.
>
> Introduce a separate dw_pcie_port structure to enable multi-port support.
> Each Root Port can have independent lane count, speed limit through pcie@N
> child nodes in device tree. Add dw_pcie_parse_root_ports()
> API to parse these child nodes.
>
> Equalization presets and link width detection currently use common DBI
> space for all the root ports. Per-port DBI space assignment for these
> features will be added in future.
>
> Signed-off-by: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Hello Sumit,
Is there a reason why you represent this as a list of ports rather than a
simple array?
The number of ports is known by parsing the device tree, so it should be
static, no?
At least to me, this seem similar to e.g. how a gpio_device has multiple
gpio_descriptors "struct gpio_desc *descs":
https://github.com/torvalds/linux/blob/master/drivers/gpio/gpiolib.h#L68C1-L68C26
A list is usually used for something that is dynamic.
I don't think that the number of ports to a PCIe controller will be dynamic.
I can see that struct qcom_pcie in pcie-qcom.c has struct list_head ports,
but that does not necessarily mean that we need to have a list of ports in
pcie-designware-host.c. (pcie-qcom could also be modified to have an array
of ports if there is a desire for similar design pattern.)
Kind regards,
Niklas
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-01-05 16:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 12:27 [PATCH 0/2] PCI: dwc: Add multi-port controller support Sumit Kumar
2026-01-05 12:27 ` Sumit Kumar
2026-01-05 12:27 ` Sumit Kumar
2026-01-05 12:27 ` [PATCH 1/2] PCI: API changes for " Sumit Kumar
2026-01-05 12:27 ` Sumit Kumar
2026-01-05 12:27 ` Sumit Kumar
2026-02-16 15:21 ` Manivannan Sadhasivam
2026-02-16 15:21 ` Manivannan Sadhasivam
2026-02-16 15:21 ` Manivannan Sadhasivam
2026-01-05 12:27 ` [PATCH 2/2] PCI: dwc: Add " Sumit Kumar
2026-01-05 12:27 ` Sumit Kumar
2026-01-05 12:27 ` Sumit Kumar
2026-01-05 16:19 ` Niklas Cassel [this message]
2026-01-05 16:19 ` Niklas Cassel
2026-01-05 16:19 ` Niklas Cassel
2026-01-06 5:19 ` Manivannan Sadhasivam
2026-01-06 5:19 ` Manivannan Sadhasivam
2026-01-06 5:19 ` Manivannan Sadhasivam
2026-01-06 10:55 ` Niklas Cassel
2026-01-06 10:55 ` Niklas Cassel
2026-01-06 10:55 ` Niklas Cassel
2026-01-06 11:16 ` Niklas Cassel
2026-01-06 11:16 ` Niklas Cassel
2026-01-06 11:16 ` Niklas Cassel
2026-01-06 13:11 ` Manivannan Sadhasivam
2026-01-06 13:11 ` Manivannan Sadhasivam
2026-01-06 13:11 ` Manivannan Sadhasivam
2026-01-06 21:16 ` Niklas Cassel
2026-01-06 21:16 ` Niklas Cassel
2026-01-06 21:16 ` Niklas Cassel
2026-02-16 15:35 ` Manivannan Sadhasivam
2026-02-16 15:35 ` Manivannan Sadhasivam
2026-02-16 15:35 ` Manivannan Sadhasivam
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=aVvkmkd5mWPmxeiS@ryzen \
--to=cassel@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=bhelgaas@google.com \
--cc=festevam@gmail.com \
--cc=geert+renesas@glider.be \
--cc=greentime.hu@sifive.com \
--cc=hongxing.zhu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jbrunet@baylibre.com \
--cc=jingoohan1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=krzk@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=lchuanhua@maxlinear.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=paul.walmsley@sifive.com \
--cc=pratyush.anand@gmail.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=samuel.holland@sifive.com \
--cc=shawnguo@kernel.org \
--cc=sumit.kumar@oss.qualcomm.com \
--cc=thierry.reding@gmail.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
--cc=yue.wang@amlogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.