pinctrl: amd: Fix an issue with shutdown when system set to s0ix
Subsystems (3)
PATCH 1/1 pinctrl: amd: Fix an issue with shutdown when system set to s0ix
IRQs are getting armed on shutdown causing the system to immediately wake back up.
--- drivers/pinctrl/pinctrl-amd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/pinctrl-amd.c +1 -2
@@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)unsigned long flags;struct gpio_chip *gc =irq_data_get_irq_chip_data (d);struct amd_gpio *gpio_dev =gpiochip_get_data (gc); -u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 ) | -BIT (WAKE_CNTRL_OFF_S4 ); +u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 );raw_spin_lock_irqsave (&gpio_dev->lock, flags); pin_reg =readl (gpio_dev->base + (d->hwirq)*4 );
Signature · 1 line
2.25.1
Am Mo., 9. Aug. 2021 um 22:15 Uhr schrieb Mario Limonciello <[email protected]>:
Quoted 18 lines
IRQs are getting armed on shutdown causing the system to immediately wake back up.
Reported-by [email protected]CC Raul E Rangel <[email protected]>Fixes d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")Signed-off-by Mario Limonciello <[email protected]>--- drivers/pinctrl/pinctrl-amd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/pinctrl/pinctrl-amd.c +0
-0
drivers/pinctrl/pinctrl-amd.c static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
Quoted 10 lines
drivers/pinctrl/pinctrl-amd.c +1
-3@@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)unsigned long flags;struct gpio_chip *gc =irq_data_get_irq_chip_data (d);struct amd_gpio *gpio_dev =gpiochip_get_data (gc); -u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 ) | -BIT (WAKE_CNTRL_OFF_S4 ); +u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 );raw_spin_lock_irqsave (&gpio_dev->lock, flags); pin_reg =readl (gpio_dev->base + (d->hwirq)*4 ); --
Is working fine again with this fix.
Best Regards,
Gabriel C
Gabriel C
Tested-by Gabriel CraciunescuAm Mi., 11. Aug. 2021 um 10:26 Uhr schrieb Gabriel C <[email protected]>:
Quoted 28 lines
Am Mo., 9. Aug. 2021 um 22:15 Uhr schrieb Mario Limonciello <[email protected]>:
Quoted 25 lines
IRQs are getting armed on shutdown causing the system to immediately wake back up.
Reported-by [email protected]CC Raul E Rangel <[email protected]>Fixes d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")Signed-off-by Mario Limonciello <[email protected]>--- drivers/pinctrl/pinctrl-amd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/pinctrl/pinctrl-amd.c +1
-2@@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)unsigned long flags;struct gpio_chip *gc =irq_data_get_irq_chip_data (d);struct amd_gpio *gpio_dev =gpiochip_get_data (gc); -u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 ) | -BIT (WAKE_CNTRL_OFF_S4 ); +u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 );
Quoted 6 lines
drivers/pinctrl/pinctrl-amd.c static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
Quoted 3 lines
drivers/pinctrl/pinctrl-amd.c +0
-1raw_spin_lock_irqsave (&gpio_dev->lock, flags); pin_reg =readl (gpio_dev->base + (d->hwirq)*4 ); --Is working fine again with this fix.
Ofc feel free to add:
Best Regards
Quoted 18 lines · Mario Limonciello
IRQs are getting armed on shutdown causing the system to immediately wake back up.
Reported-by [email protected]CC Raul E Rangel <[email protected]>Fixes d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")Signed-off-by Mario Limonciello <[email protected]>--- drivers/pinctrl/pinctrl-amd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/pinctrl/pinctrl-amd.c +0
-0
drivers/pinctrl/pinctrl-amd.c static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on) · line 450
Quoted 9 lines
drivers/pinctrl/pinctrl-amd.c +1
-2@@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)unsigned long flags;struct gpio_chip *gc =irq_data_get_irq_chip_data (d);struct amd_gpio *gpio_dev =gpiochip_get_data (gc); -u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 ) | -BIT (WAKE_CNTRL_OFF_S4 ); +u32 wake_mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 );raw_spin_lock_irqsave (&gpio_dev->lock, flags); pin_reg =readl (gpio_dev->base + (d->hwirq)*4 );
Looks good to me.
Quoted 8 lines · Mario Limonciello
IRQs are getting armed on shutdown causing the system to immediately wake back up.
Reported-by [email protected]CC Raul E Rangel <[email protected]>Fixes d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")Signed-off-by Mario Limonciello <[email protected]>
Patch is applied.
Yours,
Linus Walleij