public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: John Madieu <john.madieu.xa@bp.renesas.com>,
	claudiu.beznea.uj@bp.renesas.com, lpieralisi@kernel.org,
	kwilczynski@kernel.org, mani@kernel.org, geert+renesas@glider.be,
	krzk+dt@kernel.org
Cc: robh@kernel.org, bhelgaas@google.com, conor+dt@kernel.org,
	magnus.damm@gmail.com, biju.das.jz@bp.renesas.com,
	linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	john.madieu@gmail.com
Subject: Re: [PATCH v4 10/15] PCI: rzg3s-host: Explicitly set class code for RZ/G3E compatibility
Date: Fri, 30 Jan 2026 15:55:16 +0200	[thread overview]
Message-ID: <e53b50e2-72dc-47c3-be52-cefa593dd30a@tuxon.dev> (raw)
In-Reply-To: <20260129214130.16067-11-john.madieu.xa@bp.renesas.com>

Hi, John,

On 1/29/26 23:41, John Madieu wrote:
> Program the class code register explicitly during PCIe configuration
> initialization. RZ/G3E requires this register to be set, while RZ/G3S
> has these values as hardware defaults.
> 
> This configuration is harmless for RZ/G3S where these match the hardware
> defaults, and necessary for RZ/G3E to properly identify the device as a
> PCI bridge.
> 
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
> ---
> 
> Changes:
> 
> v4: No changes
> v3: No changes
> v2: No changes
> 
>   drivers/pci/controller/pcie-rzg3s-host.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/pci/controller/pcie-rzg3s-host.c b/drivers/pci/controller/pcie-rzg3s-host.c
> index 15ccd9095a3e..76f6d940ba45 100644
> --- a/drivers/pci/controller/pcie-rzg3s-host.c
> +++ b/drivers/pci/controller/pcie-rzg3s-host.c
> @@ -1054,6 +1054,7 @@ static int rzg3s_pcie_set_max_link_speed(struct rzg3s_pcie_host *host)
>   static int rzg3s_pcie_config_init(struct rzg3s_pcie_host *host)
>   {
>   	struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host);
> +	u32 mask = GENMASK(31, 8);
>   	struct resource_entry *ft;
>   	struct resource *bus;
>   	u8 subordinate_bus;
> @@ -1077,6 +1078,13 @@ static int rzg3s_pcie_config_init(struct rzg3s_pcie_host *host)
>   	writel_relaxed(0xffffffff, host->pcie + RZG3S_PCI_CFG_BARMSK00L);
>   	writel_relaxed(0xffffffff, host->pcie + RZG3S_PCI_CFG_BARMSK00U);
>   
> +	/*
> +	 * Explicitly program class code. RZ/G3E requires this configuration.
> +	 * Harmless for RZ/G3S where this matches the hardware default.
> +	 */
> +	rzg3s_pcie_update_bits(host->pcie, PCI_CLASS_REVISION, mask,
> +			       FIELD_PREP(mask, PCI_CLASS_BRIDGE_PCI_NORMAL));

According to kernel test robot report on v1 this throws a compilation warning:

https://lore.kernel.org/all/202601152104.pV9uMS76-lkp@intel.com/

> +
>   	/* Disable access control to the CFGU */
>   	writel_relaxed(0, host->axi + RZG3S_PCI_PERM);
>   


  reply	other threads:[~2026-01-30 13:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29 21:41 [PATCH v4 00/15] PCI: renesas: Add RZ/G3E PCIe controller support John Madieu
2026-01-29 21:41 ` [PATCH v4 01/15] PCI: rzg3s-host: Fix reset handling in probe error path John Madieu
2026-01-29 21:41 ` [PATCH v4 02/15] PCI: renesas: rzg3s: Rework inbound window algorithm for multi-SoC support John Madieu
2026-01-30 13:52   ` Claudiu Beznea
2026-01-30 20:14     ` John Madieu
2026-01-29 21:41 ` [PATCH v4 03/15] clk: renesas: rzv2h-cpg: Add support for init_{off|asserted} clocks/resets John Madieu
2026-01-29 21:41 ` [PATCH v4 04/15] clk: renesas: r9a09g047: Add PCIe clocks and reset John Madieu
2026-01-29 21:41 ` [PATCH v4 05/15] dt-bindings: PCI: renesas,r9a08g045s33-pcie: Fix naming properties John Madieu
2026-01-30 13:53   ` Claudiu Beznea
2026-01-29 21:41 ` [PATCH v4 06/15] dt-bindings: PCI: renesas,r9a08g045s33-pcie: Document RZ/G3E SoC John Madieu
2026-02-09 17:51   ` Rob Herring (Arm)
2026-01-29 21:41 ` [PATCH v4 07/15] PCI: rzg3s-host: Make SYSC register offsets SoC-specific John Madieu
2026-01-30 13:53   ` Claudiu Beznea
2026-01-29 21:41 ` [PATCH v4 08/15] PCI: rzg3s-host: Make configuration reset lines optional John Madieu
2026-01-29 21:41 ` [PATCH v4 09/15] PCI: rzg3s-host: Add SoC-specific configuration and initialization callbacks John Madieu
2026-01-30 13:54   ` Claudiu Beznea
2026-01-29 21:41 ` [PATCH v4 10/15] PCI: rzg3s-host: Explicitly set class code for RZ/G3E compatibility John Madieu
2026-01-30 13:55   ` Claudiu Beznea [this message]
2026-01-30 15:08     ` Geert Uytterhoeven
2026-01-30 20:26       ` John Madieu
2026-01-29 21:41 ` [PATCH v4 11/15] PCI: rzg3s-host: Add PCIe Gen3 (8.0 GT/s) link speed support John Madieu
2026-01-29 21:41 ` [PATCH v4 12/15] PCI: rzg3s-host: Add support for RZ/G3E PCIe controller John Madieu
2026-01-30 13:57   ` Claudiu Beznea
2026-01-30 20:23     ` John Madieu
2026-01-29 21:41 ` [PATCH v4 13/15] arm64: dts: renesas: r9a09g047: Add PCIe node John Madieu
2026-01-29 21:41 ` [PATCH v4 14/15] arm64: dts: renesas: r9a09g047e57-smarc-som: Add PCIe reference clock John Madieu
2026-01-29 21:41 ` [PATCH v4 15/15] arm64: dts: renesas: r9a09g047e57-smarc: Enable PCIe John Madieu

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=e53b50e2-72dc-47c3-be52-cefa593dd30a@tuxon.dev \
    --to=claudiu.beznea@tuxon.dev \
    --cc=bhelgaas@google.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=john.madieu.xa@bp.renesas.com \
    --cc=john.madieu@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-clk@vger.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=robh@kernel.org \
    /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