Skip to content

Commit 5ec58c9

Browse files
committed
drivers: intc_gicv3_its: fix sleep issue in pre-kernel
GIC v3 ITS is initialized in pre-kernel stage in which sleep function can't work yet, so use busy delay in pre-kernel stage and use sleep delay in post-kernel stage. Signed-off-by: Jiafei Pan <[email protected]>
1 parent c690257 commit 5ec58c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/interrupt_controller/intc_gicv3_its.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,11 @@ static int its_post_command(struct gicv3_its_data *data, struct its_cmd_block *c
337337
rd_idx, idx, wr_idx);
338338
return -ETIMEDOUT;
339339
}
340-
k_usleep(1);
340+
if (k_is_pre_kernel()) {
341+
k_busy_wait(1);
342+
} else {
343+
k_usleep(1);
344+
}
341345
}
342346

343347
return 0;

0 commit comments

Comments
 (0)