diff mbox series

[11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls

Message ID 20220515202032.3046-12-stefan.wahren@i2se.com (mailing list archive)
State New, archived
Headers show
Series soc: bcm2835-power: Prepare BCM2711 V3D support | expand

Commit Message

Stefan Wahren May 15, 2022, 8:20 p.m. UTC
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

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>
---
 drivers/soc/bcm/bcm2835-power.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Peter Robinson May 31, 2022, 4:03 p.m. UTC | #1
On Sun, May 15, 2022 at 9:21 PM Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>
> 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>
> ---
>  drivers/soc/bcm/bcm2835-power.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
> index 1e06d91c0739..5bcd047768b6 100644
> --- a/drivers/soc/bcm/bcm2835-power.c
> +++ b/drivers/soc/bcm/bcm2835-power.c
> @@ -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;
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 1e06d91c0739..5bcd047768b6 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -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;