From: Koichiro Den <den@valinux.co.jp>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: linux-pci@vger.kernel.org, stable@vger.kernel.org,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] PCI: rcar-gen4: Configure bifurcation only on R-Car Gen4 SoC PCIe controller
Date: Wed, 2 Dec 2026 22:46:53 +0900 [thread overview]
Message-ID: <aw_BNk1g8aa1qmPS@z790sl> (raw)
In-Reply-To: <20261202030253.135982-1-marek.vasut+renesas@mailbox.org>
On Wed, Dec 02, 2026 at 04:02:39AM +0100, Marek Vasut wrote:
> The R-Car Gen5 SoC PCIe4 controller documentation describes the PCIEMSR0
> bits 0 and 1 as reserved. The R-Car Gen4 SoC PCIe controller documentation
> describes the PCIEMSR0 bits 0 and 1 as BFRCTNST, bifurcation mode setting.
> Set the BFRCTNST bits only on R-Car Gen4 SoC PCIe controllers, and do not
> configure those bits on R-Car Gen5 SoC PCIe4 controller.
>
> Fixes: 3283c4db6009 ("PCI: rcar-gen4: Add support for R-Car X5H PCIe4")
> Cc: stable@vger.kernel.org
> Suggested-by: Koichiro Den <den@valinux.co.jp>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Koichiro Den <den@valinux.co.jp>
Thanks for handling this!
> ---
> Cc: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Koichiro Den <den@valinux.co.jp>
> Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
> drivers/pci/controller/dwc/pcie-rcar-gen4.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-rcar-gen4.c b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
> index 2e640110e3910..ebc2957f6d322 100644
> --- a/drivers/pci/controller/dwc/pcie-rcar-gen4.c
> +++ b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
> @@ -100,6 +100,7 @@ struct rcar_gen4_pcie_drvdata {
> int (*speed_control)(struct rcar_gen4_pcie *rcar);
> enum dw_pcie_device_mode mode;
> bool mrrs_256b_limit;
> + bool bifurcation_supported;
> };
>
> struct rcar_gen4_pcie {
> @@ -262,7 +263,7 @@ static int rcar_gen4_pcie_common_init(struct rcar_gen4_pcie *rcar)
> goto err_unprepare;
> }
>
> - if (dw->num_lanes < 4)
> + if (rcar->drvdata->bifurcation_supported && dw->num_lanes < 4)
> val |= BIFUR_MOD_SET_ON;
>
> writel(val, rcar->base + PCIEMSR0);
> @@ -1139,6 +1140,7 @@ static struct rcar_gen4_pcie_drvdata drvdata_r8a779f0_pcie = {
> .speed_control = rcar_gen4_pcie_speed_control,
> .mode = DW_PCIE_RC_TYPE,
> .mrrs_256b_limit = true,
> + .bifurcation_supported = true,
> };
>
> static struct rcar_gen4_pcie_drvdata drvdata_r8a779f0_pcie_ep = {
> @@ -1148,6 +1150,7 @@ static struct rcar_gen4_pcie_drvdata drvdata_r8a779f0_pcie_ep = {
> .speed_control = rcar_gen4_pcie_speed_control,
> .mode = DW_PCIE_EP_TYPE,
> .mrrs_256b_limit = true,
> + .bifurcation_supported = true,
> };
>
> static struct rcar_gen4_pcie_drvdata drvdata_rcar_gen4_pcie = {
> @@ -1157,6 +1160,7 @@ static struct rcar_gen4_pcie_drvdata drvdata_rcar_gen4_pcie = {
> .speed_control = rcar_gen4_pcie_speed_control,
> .mode = DW_PCIE_RC_TYPE,
> .mrrs_256b_limit = true,
> + .bifurcation_supported = true,
> };
>
> static struct rcar_gen4_pcie_drvdata drvdata_rcar_gen4_pcie_ep = {
> @@ -1166,6 +1170,7 @@ static struct rcar_gen4_pcie_drvdata drvdata_rcar_gen4_pcie_ep = {
> .speed_control = rcar_gen4_pcie_speed_control,
> .mode = DW_PCIE_EP_TYPE,
> .mrrs_256b_limit = true,
> + .bifurcation_supported = true,
> };
>
> static struct rcar_gen4_pcie_drvdata drvdata_rcar_gen5_pcie = {
> --
> 2.53.0
>
prev parent reply other threads:[~2026-12-02 13:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 3:02 [PATCH] PCI: rcar-gen4: Configure bifurcation only on R-Car Gen4 SoC PCIe controller Marek Vasut
2026-12-02 13:46 ` Koichiro Den [this message]
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=aw_BNk1g8aa1qmPS@z790sl \
--to=den@valinux.co.jp \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=kwilczynski@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.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