pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems

Guenter Roeck reported an interrupt storm on a prototype system which is
based on Cyan Chromebook. The root cause turned out to be a incorrectly
configured pin that triggers spurious interrupts. This will be fixed in
coreboot but currently we need to prevent the interrupt storm from
happening by masking all interrupts (but not GPEs) on those systems.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=197953
Fixes: bcb48cca23ec ("pinctrl: cherryview: Do not mask all interrupts in probe")
Reported-and-tested-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by Mika Westerberg and committed by Linus Walleij d2b3c353 50c4c4e2

+16
+16
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 1620 1620 clear_bit(i, chip->irq.valid_mask); 1621 1621 } 1622 1622 1623 + /* 1624 + * The same set of machines in chv_no_valid_mask[] have incorrectly 1625 + * configured GPIOs that generate spurious interrupts so we use 1626 + * this same list to apply another quirk for them. 1627 + * 1628 + * See also https://bugzilla.kernel.org/show_bug.cgi?id=197953. 1629 + */ 1630 + if (!need_valid_mask) { 1631 + /* 1632 + * Mask all interrupts the community is able to generate 1633 + * but leave the ones that can only generate GPEs unmasked. 1634 + */ 1635 + chv_writel(GENMASK(31, pctrl->community->nirqs), 1636 + pctrl->regs + CHV_INTMASK); 1637 + } 1638 + 1623 1639 /* Clear all interrupts */ 1624 1640 chv_writel(0xffff, pctrl->regs + CHV_INTSTAT); 1625 1641