Skip to content

Commit 98ece19

Browse files
Tero Kristotmlind
authored andcommitted
soc: ti: omap-prm: use atomic iopoll instead of sleeping one
The reset handling APIs for omap-prm can be invoked PM runtime which runs in atomic context. For this to work properly, switch to atomic iopoll version instead of the current which can sleep. Otherwise, this throws a "BUG: scheduling while atomic" warning. Issue is seen rather easily when CONFIG_PREEMPT is enabled. Signed-off-by: Tero Kristo <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent fb6823a commit 98ece19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/soc/ti/omap_prm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev,
256256
goto exit;
257257

258258
/* wait for the status to be set */
259-
ret = readl_relaxed_poll_timeout(reset->prm->base +
260-
reset->prm->data->rstst,
261-
v, v & BIT(st_bit), 1,
262-
OMAP_RESET_MAX_WAIT);
259+
ret = readl_relaxed_poll_timeout_atomic(reset->prm->base +
260+
reset->prm->data->rstst,
261+
v, v & BIT(st_bit), 1,
262+
OMAP_RESET_MAX_WAIT);
263263
if (ret)
264264
pr_err("%s: timedout waiting for %s:%lu\n", __func__,
265265
reset->prm->data->name, id);

0 commit comments

Comments
 (0)