Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tanmay Kathpalia" <tanmay.kathpalia@altera.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 8/8] mmc: sdhci-cadence: add Altera Agilex5 SD6HC support
Date: Thu, 20 Aug 2026 19:16:17 +0000	[thread overview]
Message-ID: <20260820191617.E4AFD1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260820185721.22823-9-tanmay.kathpalia@altera.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Agilex5-specific hardware reset sequence is missing during system resume.
--

--- Patch [8]: [PATCH v5 8/8] mmc: sdhci-cadence: add Altera Agilex5 SD6HC support ---
commit f23f3c9ace34e8e3ffc420a82aed2510f467099c
Author: Tanmay Kathpalia <tanmay.kathpalia@altera.com>

mmc: sdhci-cadence: add Altera Agilex5 SD6HC support

This patch adds support for the Altera Agilex5 SoC with a Cadence SD6HC
controller. It implements a platform-specific initialization routine to
handle overlapping resets for the SDHCI, SoftPHY, and OCP/AXI clock domains.

[ ... ]

> diff --git a/drivers/mmc/host/sdhci-cadence-core.c b/drivers/mmc/host/sdhci-cadence-core.c
> index 18a5329f27db9..e215f6a4c344f 100644
> --- a/drivers/mmc/host/sdhci-cadence-core.c
> +++ b/drivers/mmc/host/sdhci-cadence-core.c

[ ... ]

> @@ -462,6 +481,44 @@ static int elba_drv_init(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int sdhci_cdns6_agilex5_init(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct reset_control_bulk_data resets[] = {
> +		{ .id = "sdhc-reset" },
> +		{ .id = "combophy" },
> +		{ .id = "sdmmc-ocp" },
> +	};
> +	int ret;
> +
> +	/*
> +	 * Assert SDHCI, SoftPHY (combophy), and SDMMC OCP/AXI resets together
> +	 * so their active periods overlap before all domains are released.
> +	 * SoftPHY is shared with NAND, but only one of SDMMC
> +	 * or NAND is enabled on a given board.
> +	 */
> +	ret = reset_control_bulk_get_exclusive(dev, ARRAY_SIZE(resets), resets);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "failed to get resets\n");
> +
> +	ret = reset_control_bulk_assert(ARRAY_SIZE(resets), resets);
> +	if (ret) {
> +		dev_err_probe(dev, ret, "failed to assert resets\n");
> +		goto out_put;
> +	}
> +
> +	/* Hold resets asserted long enough for all clock domains to capture. */
> +	usleep_range(10, 20);
> +
> +	ret = reset_control_bulk_deassert(ARRAY_SIZE(resets), resets);
> +	if (ret)
> +		dev_err_probe(dev, ret, "failed to deassert resets\n");
> +
> +out_put:
> +	reset_control_bulk_put(ARRAY_SIZE(resets), resets);
> +	return ret;
> +}

[Severity: Medium]
Is this reset sequence also required during system resume?

Looking at sdhci_cdns_resume() in sdhci-cadence-core.c, it appears the
platform-specific init routine is not executed upon waking:

static int sdhci_cdns_resume(struct device *dev)
{
	...
	ret = clk_prepare_enable(pltfm_host->clk);
	...
	ret = sdhci_resume_host(host);
}

If the SoC power-collapses these domains during suspend, will they require
this specific overlapping reset sequence upon wake to correctly synchronize
the clock domains again? Or is this hardware state maintained across suspend
or perhaps handled transparently by the boot firmware?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260820185721.22823-1-tanmay.kathpalia@altera.com?part=8

      reply	other threads:[~2026-08-20 19:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 18:57 [PATCH v5 0/8] mmc: sdhci-cadence: add SD6HC support and Agilex5 enablement Tanmay Kathpalia
2026-08-20 18:57 ` [PATCH v5 1/8] dt-bindings: mmc: add Cadence SD6HC binding Tanmay Kathpalia
2026-08-20 18:57 ` [PATCH v5 2/8] arm64: dts: agilex5: add SD/eMMC host controller Tanmay Kathpalia
2026-08-20 19:11   ` sashiko-bot
2026-08-20 18:57 ` [PATCH v5 3/8] dt-bindings: arm: altera: add Agilex5 SOCDK eMMC board variant Tanmay Kathpalia
2026-08-20 18:57 ` [PATCH v5 4/8] arm64: dts: agilex5: add SOCDK eMMC daughter board Tanmay Kathpalia
2026-08-20 18:57 ` [PATCH v5 5/8] mmc: sdhci-cadence: rename SD4HC symbols for SD6HC groundwork Tanmay Kathpalia
2026-08-20 19:06   ` sashiko-bot
2026-08-20 18:57 ` [PATCH v5 6/8] mmc: sdhci-cadence: refactor driver structure for V6 controller support Tanmay Kathpalia
2026-08-20 18:57 ` [PATCH v5 7/8] mmc: sdhci-cadence: add Cadence SD6HC support Tanmay Kathpalia
2026-08-20 19:14   ` sashiko-bot
2026-08-20 18:57 ` [PATCH v5 8/8] mmc: sdhci-cadence: add Altera Agilex5 " Tanmay Kathpalia
2026-08-20 19:16   ` sashiko-bot [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=20260820191617.E4AFD1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tanmay.kathpalia@altera.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