MLK-17144 driver: soc: use mutex for power domain of imx8mq
authorBai Ping <ping.bai@nxp.com>
Mon, 11 Dec 2017 04:51:23 +0000 (12:51 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:51:10 +0000 (14:51 -0500)
commit9ce19bb3a5dfc6e74cc9e1de40403e496e2b6757
tree797f8fa696c63daf7ee9720c0fb36eac48d5409a
parent01aaf69948402b4fddcbe78cfb81ee8dcc2ace4c
MLK-17144 driver: soc: use mutex for power domain of imx8mq

In current gpc-psci.c file, the irqchip driver and gpc power
domain driver use the same spinlock to prevent concurrent
access to the GPC module. But actually, the irq and power domain
are two seperated function and controlled by different registers.

when using the same spinlock for these two funcition, in some corner
case the system will be deadlock if the spinlock is already acquired
by the power domain, but the power domain on/off is interrupted by
timer IRQ. So adding a mutex for power domain driver.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
drivers/soc/imx/gpc-psci.c