linux/drivers/soc/bcm
Maíra Canal c5e734f6a0 pmdomain: bcm: bcm2835-power: Increase ASB control timeout
[ Upstream commit b826d2c0b0 ]

The bcm2835_asb_control() function uses a tight polling loop to wait
for the ASB bridge to acknowledge a request. During intensive workloads,
this handshake intermittently fails for V3D's master ASB on BCM2711,
resulting in "Failed to disable ASB master for v3d" errors during
runtime PM suspend. As a consequence, the failed power-off leaves V3D in
a broken state, leading to bus faults or system hangs on later accesses.

As the timeout is insufficient in some scenarios, increase the polling
timeout from 1us to 5us, which is still negligible in the context of a
power domain transition. Also, replace the open-coded ktime_get_ns()/
cpu_relax() polling loop with readl_poll_timeout_atomic().

Cc: stable@vger.kernel.org
Fixes: 670c672608 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[ adapted unified bcm2835_asb_control() function changes to separate bcm2835_asb_enable() and bcm2835_asb_disable() functions ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-04-18 10:33:19 +02:00
..
bcm63xx soc: bcm: Check for NULL return of devm_kzalloc() 2022-06-09 10:23:08 +02:00
brcmstb soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs 2022-09-15 11:30:04 +02:00
bcm2835-power.c pmdomain: bcm: bcm2835-power: Increase ASB control timeout 2026-04-18 10:33:19 +02:00
Kconfig soc: bcm: add BCM63xx power domain driver 2020-08-17 09:14:04 -07:00
Makefile soc: bcm: add PM driver for Broadcom's PMB 2021-01-12 20:45:57 -08:00
raspberrypi-power.c soc: bcm: raspberrypi-power: Release firmware handle on unbind 2021-03-22 17:59:51 +01:00