]> git.baikalelectronics.ru Git - kernel.git/commitdiff
soc: bcm: bcm2835-power: Bypass power_on/off() calls
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Sat, 25 Jun 2022 11:36:19 +0000 (13:36 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 4 Jul 2022 10:59:55 +0000 (11:59 +0100)
Bypass power_on/power_off() when running on BCM2711 as they are not
needed.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-12-stefan.wahren@i2se.com
drivers/soc/bcm/bcm2835-power.c

index 1e06d91c0739b300e2fd3b4188063f929d4554e7..5bcd047768b60c0d812d9553e62a7f9fafb5a4ca 100644 (file)
@@ -198,6 +198,10 @@ static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg)
 {
        struct bcm2835_power *power = pd->power;
 
+       /* We don't run this on BCM2711 */
+       if (power->rpivid_asb)
+               return 0;
+
        /* Enable functional isolation */
        PM_WRITE(pm_reg, PM_READ(pm_reg) & ~PM_ISFUNC);
 
@@ -219,6 +223,10 @@ static int bcm2835_power_power_on(struct bcm2835_power_domain *pd, u32 pm_reg)
        int inrush;
        bool powok;
 
+       /* We don't run this on BCM2711 */
+       if (power->rpivid_asb)
+               return 0;
+
        /* If it was already powered on by the fw, leave it that way. */
        if (PM_READ(pm_reg) & PM_POWUP)
                return 0;