linux/drivers/pmdomain/bcm
Maíra Canal 550bae2c09 pmdomain: bcm: bcm2835-power: Fix broken reset status read
bcm2835_reset_status() has a misplaced parenthesis on every PM_READ()
call. Since PM_READ(reg) expands to readl(power->base + (reg)), the
expression:

    PM_READ(PM_GRAFX & PM_V3DRSTN)

computes the bitwise AND of the register offset PM_GRAFX with the
bitmask PM_V3DRSTN before using the result as a register offset, reading
from the wrong MMIO address instead of the intended PM_GRAFX register.
The same issue affects the PM_IMAGE cases.

Fix by moving the closing parenthesis so PM_READ() receives only the
register offset, and the bitmask is applied to the value returned by
the read.

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: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-27 18:02:35 +01:00
..
bcm-pmb.c
bcm63xx-power.c
bcm2835-power.c pmdomain: bcm: bcm2835-power: Fix broken reset status read 2026-02-27 18:02:35 +01:00
Kconfig
Makefile
raspberrypi-power.c pmdomain: raspberrypi-power: set flag GENPD_FLAG_ACTIVE_WAKEUP 2024-08-14 14:22:39 +02:00