Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Larisa Grigore" <larisa.grigore@oss.nxp.com>
Cc: conor+dt@kernel.org, linux-scsi@vger.kernel.org,
	Frank.Li@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev
Subject: Re: [PATCH v7 09/12] scsi: ufs: Add NXP S32N79 UFS host controller driver
Date: Tue, 29 Sep 2026 10:21:42 +0000	[thread overview]
Message-ID: <20260929102142.A35F71F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260929100946.693962-10-larisa.grigore@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] ufs: core_clk remains permanently enabled during PM suspend states
--

commit aea859e7e22ef8d785ddf1572d56548e903ae544
Author: Larisa Grigore <larisa.grigore@oss.nxp.com>
scsi: ufs: Add NXP S32N79 UFS host controller driver

This commit adds support for the UFS host controller on the NXP S32N79 SoC,
built on the Synopsys DesignWare architecture. It introduces platform glue
and specific initialization routines for clock scaling, M-PHY calibration,
and device hibernation transitions.

> diff --git a/drivers/ufs/host/ufs-nxp-s32n7.c b/drivers/ufs/host/ufs-nxp-s32n7.c
> new file mode 100644
> index 0000000000000..5374662763b6e
> --- /dev/null
> +++ b/drivers/ufs/host/ufs-nxp-s32n7.c
[ ... ]
> +static int ufs_s32n7_init(struct ufs_hba *hba)
> +{
[ ... ]
> +	/*
> +	 * The core reference clock is not managed by the UFS core (the DT node
> +	 * has no clock-names/freq-table-hz, so it is never added to
> +	 * hba->clk_list_head).
> +	 */
> +	ufs->core_clk = devm_clk_get_enabled(dev, NULL);
> +	if (IS_ERR(ufs->core_clk))
> +		return dev_err_probe(dev, PTR_ERR(ufs->core_clk),
> +				     "Failed to get and enable core clock.\n");
> +
> +	ufshcd_set_variant(hba, ufs);
> +
> +	return 0;
> +}
[ ... ]
> +static const struct dev_pm_ops ufs_s32n7_pm_ops = {
> +	SYSTEM_SLEEP_PM_OPS(ufshcd_system_suspend, ufshcd_system_resume)
> +	RUNTIME_PM_OPS(ufshcd_runtime_suspend, ufshcd_runtime_resume, NULL)
> +	.prepare	= pm_sleep_ptr(ufshcd_suspend_prepare),
> +	.complete	= pm_sleep_ptr(ufshcd_resume_complete),
> +};

[Severity: Medium]
Because the core clock is unconditionally enabled via devm_clk_get_enabled()
in ufs_s32n7_init() and is explicitly excluded from the UFS core's PM logic,
will this clock remain permanently enabled across all low-power states?

Since these power management ops map directly to the generic UFS core hooks
and the UFS variant ops don't implement suspend or resume callbacks, there
does not appear to be a mechanism to disable ufs->core_clk during system
suspend or runtime idle. Could this lead to unnecessary power consumption?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260929100946.693962-1-larisa.grigore@oss.nxp.com?part=9

  reply	other threads:[~2026-09-29 10:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 10:09 [PATCH v7 00/12] Add S32N79RDB UFS support Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 01/12] scsi: ufs: dwc: Return a negative error if the link is down Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 02/12] ufs: unipro: Move Tx/Rx FSM state definitions to unipro.h Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 03/12] ufs: unipro: Add TX/RX FSM state attributes Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 04/12] ufs: host: Add common Hibern8 TX FSM polling helper Larisa Grigore
2026-10-01  6:12   ` Stanley Jhu
2026-09-29 10:09 ` [PATCH v7 05/12] scsi: ufs: Move Versal2 M-PHY CREG access helpers into ufshcd-dwc Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 06/12] scsi: ufs: dwc: Export common clock divider and link status helpers Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 07/12] dt-bindings: ufs: Add NXP S32N79 UFS host controller Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 08/12] scsi: ufs: dwc: Sort CBCRCTRL and CBREFCLKCTRL2 by offset Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 09/12] scsi: ufs: Add NXP S32N79 UFS host controller driver Larisa Grigore
2026-09-29 10:21   ` sashiko-bot [this message]
2026-09-29 10:09 ` [PATCH v7 10/12] arm64: dts: freescale: s32n79: Add UFS host controller Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 11/12] arm64: dts: freescale: s32n79-rdb: Enable UFS Larisa Grigore
2026-09-29 10:09 ` [PATCH v7 12/12] MAINTAINERS: Add NXP S32N7 UFS host controller entry Larisa Grigore

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=20260929102142.A35F71F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=larisa.grigore@oss.nxp.com \
    --cc=linux-scsi@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