crypto: stm32/crc32 - don't sleep in runtime pm
authorNicolas Toromanoff <nicolas.toromanoff@st.com>
Tue, 12 May 2020 14:11:12 +0000 (16:11 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 May 2020 14:08:21 +0000 (00:08 +1000)
commit100f84beee4874234d04a1ea642b8c9738d7020d
tree16b8fcab355ad087e0b241ad288f8bd53eba0a57
parent10b89c43a64eb0d236903b79a3bc9d8f6cbfd9c7
crypto: stm32/crc32 - don't sleep in runtime pm

Ensure stm32_crc_update() and stm32_crc_init() can be called
in atomic context and can't sleep.

Add pm_runtime_irq_safe() to make pm_runtime_get_sync() atomic.
Change runtime pm to call clk_enable()/clk_disable() and change
system pm to unprepare/prepare the clock and force runtime pm
suspend/resume.

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/stm32/stm32-crc32.c