All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Lee Jones <lee@kernel.org>, Kamal Dasu <kamal.dasu@broadcom.com>,
	"Al Cooper" <alcooperx@gmail.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Ulf Hansson <ulfh@kernel.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	<linux-mmc@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Cc: <stable@vger.kernel.org>
Subject: Re: [PATCH 13/13] mmc: sdhci-brcmstb: Handle absent optional sdio_freq clock in probe
Date: Wed, 2 Dec 2026 10:49:38 +0200	[thread overview]
Message-ID: <a360d18e-ecf6-4612-a662-61c3366732fb@intel.com> (raw)
In-Reply-To: <20261123191703.179283-14-lee@kernel.org>

On 23/11/2026 21:15, Lee Jones wrote:
> Standard MMC Device Tree nodes may specify "clock-frequency" on SoCs
> that do not provide the optional 72116B0 "sdio_freq" clock, in which
> case devm_clk_get_optional() legitimately returns NULL.  However,
> sdhci_brcmstb_probe() only checks IS_ERR(base_clk): when base_clk is
> NULL, clk_get_rate(base_clk) evaluates to 0 and overwrites
> SDHCI_CLOCK_V3_BASE_MASK in host->caps with 0 MHz while leaving
> priv->base_freq_hz non-zero for system resume.
> 
> Check IS_ERR_OR_NULL(base_clk) and clear priv->base_freq_hz on the
> fallback path before jumping to add_host.
> 
> Fixes: 97904a59855c ("mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0")
> Closes: https://sashiko.dev/#/bug/linux-88799a75-1ece-4f9d-bdab-eeb713627ab2
> Cc: stable@vger.kernel.org
> Signed-off-by: Lee Jones <lee@kernel.org>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-brcmstb.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index db857f2273e2..976cddb2ca9e 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -585,8 +585,10 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>  		goto add_host;
>  
>  	base_clk = devm_clk_get_optional(&pdev->dev, "sdio_freq");
> -	if (IS_ERR(base_clk)) {
> -		dev_warn(&pdev->dev, "Clock for \"sdio_freq\" not found\n");
> +	if (IS_ERR_OR_NULL(base_clk)) {
> +		if (IS_ERR(base_clk))
> +			dev_warn(&pdev->dev, "Clock for \"sdio_freq\" not found\n");
> +		priv->base_freq_hz = 0;
>  		goto add_host;
>  	}
>  


  parent reply	other threads:[~2026-12-02  8:50 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 01/13] mmc: cavium: Remove MMC slots before destroying slot platform devices Lee Jones
2026-11-23 19:15 ` [PATCH 02/13] mmc: cavium: Prevent slot_pdev[] out-of-bounds write during probe Lee Jones
2026-11-23 19:15 ` [PATCH 03/13] mmc: sdhci-msm: Resume runtime PM before accessing registers on remove Lee Jones
2026-12-02  8:18   ` Adrian Hunter
2026-11-23 19:15 ` [PATCH 04/13] mmc: meson-gx: Fail request when descriptor chain DMA mapping fails Lee Jones
2026-11-23 19:15   ` Lee Jones
2026-11-27 23:18   ` Valerio Setti
2026-11-27 23:18     ` Valerio Setti
2026-11-23 19:15 ` [PATCH 05/13] mmc: jz4740: Skip DMA cleanup in PIO mode during post_req Lee Jones
2026-11-23 19:15 ` [PATCH 06/13] mmc: renesas_sdhi: Guard host->cmd access in internal DMAC issue work Lee Jones
2026-11-23 19:15 ` [PATCH 07/13] mmc: tifm_sd: Synchronise timeout handler with request completion Lee Jones
2026-11-23 19:15 ` [PATCH 08/13] mmc: omap: Shut down cover timer before disabling cover BH work Lee Jones
2026-11-23 19:15 ` [PATCH 09/13] mmc: renesas_sdhi: Disable internal DMAC BH work items on release Lee Jones
2026-11-23 19:15 ` [PATCH 10/13] mmc: jz4740: Apply DMA max_seg_size limit to unified tx-rx channel Lee Jones
2026-11-23 19:15 ` [PATCH 11/13] mmc: dw_mmc: Disarm central watchdog when ending a request Lee Jones
2026-11-24  1:45   ` Shawn Lin
2026-11-23 19:15 ` [PATCH 12/13] mmc: renesas_sdhi: Fix SDIO manual tap correction in SDR104 mode Lee Jones
2026-11-23 19:15 ` [PATCH 13/13] mmc: sdhci-brcmstb: Handle absent optional sdio_freq clock in probe Lee Jones
2026-11-23 19:31   ` Florian Fainelli
2026-12-02  8:49   ` Adrian Hunter [this message]
2026-11-25 13:37 ` [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Biju Das
2026-11-25 13:37   ` Biju Das
2026-11-25 15:08   ` wsa+renesas
2026-11-25 15:08     ` wsa+renesas
2026-11-25 18:02     ` Biju Das
2026-11-25 18:02       ` Biju Das
2026-11-25 17:50 ` Markus Elfring
2026-11-25 17:50   ` Markus Elfring
2026-11-26  8:53   ` Lee Jones
2026-11-26  8:53     ` Lee Jones
2026-11-26  9:23     ` [00/13] " Markus Elfring
2026-11-26  9:23       ` Markus Elfring
2026-11-26 11:29       ` Lee Jones
2026-11-26 11:29         ` Lee Jones

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=a360d18e-ecf6-4612-a662-61c3366732fb@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=alcooperx@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kamal.dasu@broadcom.com \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=ulfh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.