From: sashiko-bot@kernel.org
To: "Sebastian Reichel" <sebastian.reichel@collabora.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v8 5/9] PCI: dw-rockchip: Add helper function for controller mode
Date: Wed, 04 Nov 2026 23:54:39 +0000 [thread overview]
Message-ID: <sashiko-outbox-198318@kernel.org> (raw)
In-Reply-To: <20261105-rockchip-pcie-system-suspend-v8-5-0434b4f373bc@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] PCI: dw-rockchip: missed rockchip_pcie_set_controller_mode() conversion
--
commit 649877b47ab85eb175cd9bd067a5196956ea8d7a
Author: Sebastian Reichel <sebastian.reichel@collabora.com>
PCI: dw-rockchip: Add helper function for controller mode
This commit introduces rockchip_pcie_set_controller_mode() to deduplicate
setting the controller mode in PCIE_CLIENT_GENERAL_CON across RC and EP
configuration functions.
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index 92154a790ac09..c6a4649dae2e8 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -695,6 +695,11 @@ static void rockchip_pcie_enable_enhanced_ltssm_control_mode(struct rockchip_pci
> rockchip_pcie_writel_apb(rockchip, val, PCIE_CLIENT_HOT_RESET_CTRL);
> }
>
> +static void rockchip_pcie_set_controller_mode(struct rockchip_pcie *rockchip, u32 mode)
> +{
> + rockchip_pcie_writel_apb(rockchip, PCIE_CLIENT_SET_MODE(mode), PCIE_CLIENT_GENERAL_CON);
> +}
> +
> static int rockchip_pcie_configure_rc(struct platform_device *pdev,
> struct rockchip_pcie *rockchip)
> {
> @@ -719,10 +724,7 @@ static int rockchip_pcie_configure_rc(struct platform_device *pdev,
> }
>
> rockchip_pcie_enable_enhanced_ltssm_control_mode(rockchip, false);
> -
> - rockchip_pcie_writel_apb(rockchip,
> - PCIE_CLIENT_SET_MODE(PCIE_CLIENT_MODE_RC),
> - PCIE_CLIENT_GENERAL_CON);
> + rockchip_pcie_set_controller_mode(rockchip, PCIE_CLIENT_MODE_RC);
>
> irq = of_irq_get_byname(dev->of_node, "legacy");
> if (irq < 0)
> @@ -776,10 +778,7 @@ static int rockchip_pcie_configure_ep(struct platform_device *pdev,
> }
>
> rockchip_pcie_enable_enhanced_ltssm_control_mode(rockchip, true);
> -
> - rockchip_pcie_writel_apb(rockchip,
> - PCIE_CLIENT_SET_MODE(PCIE_CLIENT_MODE_EP),
> - PCIE_CLIENT_GENERAL_CON);
> + rockchip_pcie_set_controller_mode(rockchip, PCIE_CLIENT_MODE_EP);
[Severity: Low]
This isn't a bug, but should rockchip_pcie_rc_reset_root_port() in
drivers/pci/controller/dwc/pcie-dw-rockchip.c also be updated to use
rockchip_pcie_set_controller_mode()?
drivers/pci/controller/dwc/pcie-dw-rockchip.c:rockchip_pcie_rc_reset_root_port() {
...
rockchip_pcie_enable_enhanced_ltssm_control_mode(rockchip, false);
rockchip_pcie_writel_apb(rockchip,
PCIE_CLIENT_SET_MODE(PCIE_CLIENT_MODE_RC),
PCIE_CLIENT_GENERAL_CON);
...
}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261105-rockchip-pcie-system-suspend-v8-0-0434b4f373bc@collabora.com?part=5
next prev parent reply other threads:[~2026-11-04 23:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 23:47 [PATCH v8 0/9] PCI: dw-rockchip: add system suspend support Sebastian Reichel
2026-11-04 23:47 ` [PATCH v8 1/9] PCI: dw-rockchip: Fix LTSSM set functions Sebastian Reichel
2026-11-04 23:53 ` sashiko-bot
2026-11-04 23:47 ` [PATCH v8 2/9] PCI: dw-rockchip: Restore vpcie3v3 regulator handle Sebastian Reichel
2026-11-04 23:54 ` sashiko-bot
2026-11-04 23:47 ` [PATCH v8 3/9] PCI: dw-rockchip: Move devm_phy_get out of phy_init Sebastian Reichel
2026-11-04 23:55 ` sashiko-bot
2026-11-04 23:47 ` [PATCH v8 4/9] PCI: dw-rockchip: Add helper function for enhanced LTSSM control mode Sebastian Reichel
2026-11-04 23:55 ` sashiko-bot
2026-11-04 23:47 ` [PATCH v8 5/9] PCI: dw-rockchip: Add helper function for controller mode Sebastian Reichel
2026-11-04 23:54 ` sashiko-bot [this message]
2026-11-04 23:47 ` [PATCH v8 6/9] PCI: dw-rockchip: Add helper function for DDL indicator Sebastian Reichel
2026-11-04 23:54 ` sashiko-bot
2026-11-04 23:47 ` [PATCH v8 7/9] PCI: dw-rockchip: Add pme_turn_off support Sebastian Reichel
2026-11-04 23:56 ` sashiko-bot
2026-11-05 0:51 ` Shawn Lin
2026-11-05 11:38 ` Sebastian Reichel
2026-11-04 23:47 ` [PATCH v8 8/9] PCI: dw-rockchip: Set broken L1SS resume flag Sebastian Reichel
2026-11-04 23:55 ` sashiko-bot
2026-11-04 23:47 ` [PATCH v8 9/9] PCI: dw-rockchip: Add system PM support Sebastian Reichel
2026-11-05 3:08 ` [PATCH v8 0/9] PCI: dw-rockchip: add system suspend support Igor Velkov
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=sashiko-outbox-198318@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sebastian.reichel@collabora.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