Re: [PATCH] mmc: sdhci-brcmstb: don't log an error for missing BOOT registers

From: Florian Fainelli

Date: Thu Oct 29 2026 - 12:34:51 EST


On 10/8/26 17:32, Karl Mehltretter wrote:
The BOOT register range is optional: the probe function ignores a
failure to map it and the suspend/resume code checks for NULL. It is
mapped with devm_platform_get_and_ioremap_resource(), though, which
calls dev_err_probe() when the resource does not exist. Every
non-removable host without a third reg entry therefore logs an error
at probe time and then works normally.

The binding only describes the "host" and "cfg" ranges, so this is the
case for the in-tree users. On the Raspberry Pi 5 family (BCM2712),
where the SDIO host of the Wi-Fi module is non-removable, each boot
prints:

sdhci-brcmstb 1001100000.mmc: error -EINVAL: invalid resource (null)

Look the resource up with platform_get_resource() first and map it only
when it is present. Hosts that do have the range are mapped by the same
two calls as before.

Fixes: b7e614802e3f ("mmc: sdhci-brcmstb: save and restore registers during PM")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>

Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>

--
Florian