summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorIwona Winiarska <iwona.winiarska@intel.com>2021-12-03 01:31:39 +0300
committerIwona Winiarska <iwona.winiarska@intel.com>2021-12-15 14:57:09 +0300
commit3c306f12ffb53ff5d3d1d448f2aeedda75b01acf (patch)
treee3d8e8405228611d506bf7cb4e1e3c5f609470bb /drivers/mfd
parent563fbb157523d69fe75e5ecdfd667e833110c0b5 (diff)
downloadlinux-3c306f12ffb53ff5d3d1d448f2aeedda75b01acf.tar.xz
mfd: syscon: Use regmap with raw_spinlock for ast2x00-scu
The irq-aspeed-scu-ic driver uses syscon regmap inside its irq_chip implementation. Some of the functions are called by IRQ core under raw_spinlock, since the regmap config is controlled by the generic syscon driver, in order to silence the warning: [ 0.687661] [ BUG: Invalid wait context ] we need to make sure that the regmap is configured in a mode that uses raw_spinlock. NOTE: It is just a workaround - it will not be upstreamed, proper fix would require either adding a new syscon DTS property, or converting the irq-aspeed-scu-ic driver to not use generic syscon. For more information, see the discussion related to a different driver: Link: https://lore.kernel.org/lkml/20210825205041.927788-1-vladimir.oltean@nxp.com/ Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> Change-Id: Ie1e94e3799147886c8c9703672ae1657874c366a
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/syscon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 191fdb87c424..0be2e33fd000 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -83,6 +83,10 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
if (ret)
reg_io_width = 4;
+ if (of_device_is_compatible(np, "aspeed,ast2500-scu") ||
+ of_device_is_compatible(np, "aspeed,ast2600-scu"))
+ syscon_config.use_raw_spinlock = true;
+
ret = of_hwspin_lock_get_id(np, 0);
if (ret > 0 || (IS_ENABLED(CONFIG_HWSPINLOCK) && ret == 0)) {
syscon_config.use_hwlock = true;