]> git.ipfire.org Git - thirdparty/linux.git/commit
pmdomain: bcm: bcm2835-power: Fix broken reset status read
authorMaíra Canal <mcanal@igalia.com>
Thu, 12 Feb 2026 14:49:44 +0000 (11:49 -0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 27 Feb 2026 17:02:35 +0000 (18:02 +0100)
commit550bae2c0931dbb664a61b08c21cf156f0a5362a
tree6f2b48b9061d113c40111848ee18a7516cdce845
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
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: 670c672608a1 ("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>
drivers/pmdomain/bcm/bcm2835-power.c