From: sashiko-bot@kernel.org
To: "Inochi Amaoto" <inochiama@gmail.com>
Cc: conor+dt@kernel.org, linux-pci@vger.kernel.org, robh@kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v6 2/6] PCI: spacemit-k1: Add multiple PHY handles support
Date: Wed, 23 Sep 2026 02:00:04 +0000 [thread overview]
Message-ID: <20260923020004.CE0A01F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260923015016.64069-3-inochiama@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] pci: spacemit-k1: use of non-existent phy_bulk API causes build failure
--
commit ea15a827c71ea1a0c124ab062feba5fc9254cc6d
Author: Inochi Amaoto <inochiama@gmail.com>
PCI: spacemit-k1: Add multiple PHY handles support
This commit extends the Spacemit K1 PCIe controller driver to support
multiple PHY handles at the same time. It modifies the driver to initialize
and manage multiple PHYs as a bulk operation.
> diff --git a/drivers/pci/controller/dwc/pcie-spacemit-k1.c b/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> index ab2953ad8f56f..8c4f0b09fe24d 100644
> --- a/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> +++ b/drivers/pci/controller/dwc/pcie-spacemit-k1.c
[ ... ]
> @@ -51,12 +51,14 @@ struct k1_pcie_device_data {
> const struct dw_pcie_host_ops *host_ops;
> const struct dw_pcie_ops *ops;
> int (*parse_port)(struct k1_pcie *k1);
> + unsigned int max_phy_count;
> };
>
> struct k1_pcie {
> struct dw_pcie pci;
> const struct k1_pcie_device_data *data;
> - struct phy *phy;
> + struct phy_bulk_data *phys;
[Severity: Low]
Does struct phy_bulk_data exist in the kernel tree? It appears to be
undefined, which would lead to an incomplete type error during the build.
> + unsigned int phy_count;
> void __iomem *link;
> struct regmap *pmu; /* Errors ignored; MMIO-backed regmap */
> u32 pmu_off;
[ ... ]
> @@ -115,6 +117,25 @@ static void k1_pcie_disable_resources(struct k1_pcie *k1)
> clk_bulk_disable_unprepare(ARRAY_SIZE(pci->app_clks), pci->app_clks);
> }
>
> +static int k1_pcie_get_phy_handle(struct k1_pcie *k1, struct device_node *node)
> +{
> + const struct k1_pcie_device_data *data = k1->data;
> + struct device *dev = k1->pci.dev;
> + int count;
> +
> + count = devm_of_phy_bulk_get_all(dev, node, &k1->phys);
[Severity: Low]
Is devm_of_phy_bulk_get_all() part of the kernel's PHY framework? This
function doesn't seem to be declared anywhere, causing an implicit function
declaration build failure.
> + if (count < 0)
> + return count;
[ ... ]
> @@ -170,12 +191,13 @@ static int k1_pcie_init(struct dw_pcie_rp *pp)
> */
> regmap_set_bits(k1->pmu, reset_ctrl, DEVICE_TYPE_RC | PCIE_AUX_PWR_DET);
>
> - ret = phy_init(k1->phy);
> - if (ret) {
> - k1_pcie_disable_resources(k1);
> + ret = phy_bulk_init(k1->phy_count, k1->phys);
[Severity: Low]
Do these bulk initialization APIs like phy_bulk_init() exist? Calling this
non-existent function causes build failures.
> + if (ret)
> + goto failed_phy_init;
>
> - return ret;
> - }
> + ret = phy_bulk_power_on(k1->phy_count, k1->phys);
[Severity: Low]
Similarly, does phy_bulk_power_on() exist in the tree? Calling it here
will result in another implicit declaration build failure.
> + if (ret)
> + goto failed_phy_power_on;
>
> /* Deassert fundamental reset (drive PERST# high) */
> regmap_clear_bits(k1->pmu, reset_ctrl, PCIE_RC_PERST);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923015016.64069-1-inochiama@gmail.com?part=2
next prev parent reply other threads:[~2026-09-23 2:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 1:50 [PATCH v6 0/6] riscv: spacemit: Add PCIe RC controller support for K3 Inochi Amaoto
2026-09-23 1:50 ` [PATCH v6 1/6] PCI: spacemit-k1: Add device data support Inochi Amaoto
2026-09-23 1:53 ` sashiko-bot
2026-09-23 1:50 ` [PATCH v6 2/6] PCI: spacemit-k1: Add multiple PHY handles support Inochi Amaoto
2026-09-23 2:00 ` sashiko-bot [this message]
2026-09-23 1:50 ` [PATCH v6 3/6] PCI: spacemit-k1: Add device id update helper Inochi Amaoto
2026-09-23 1:53 ` sashiko-bot
2026-09-23 1:50 ` [PATCH v6 4/6] dt-bindings: PCI: snps,dw-pcie: Add msi-parent for MSI handle check Inochi Amaoto
2026-09-23 1:55 ` sashiko-bot
2026-09-23 1:50 ` [PATCH v6 5/6] dt-bindings: PCI: spacemit: Introduce Spacemit K3 PCIe host controller Inochi Amaoto
2026-09-23 1:55 ` sashiko-bot
2026-09-23 1:50 ` [PATCH v6 6/6] PCI: spacemit-k1: Add Spacemit K3 PCIe host controller support Inochi Amaoto
2026-09-23 2:01 ` sashiko-bot
2026-09-24 3:25 ` Troy Mitchell
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=20260923020004.CE0A01F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@gmail.com \
--cc=linux-pci@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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