Skip to content

Commit

Permalink
stm32: dmamux: change initialization order to PRE_KERNEL_1
Browse files Browse the repository at this point in the history
When running the tests of the async api of uart
on nucleo-l4r5zi we get MPU fault.
The reason is ordering initialization. The uart and dma
drivers are initialized PRE_KERNEL_1 while dmamux is
initialized POST_KERNEL.
Thus, the function device_get_binding fails since the
dmamux device is not ready to be used.

Fixes: #32715.

Signed-off-by: Shlomi Vaknin <[email protected]>
  • Loading branch information
shlomow authored and MaureenHelm committed Mar 1, 2021
1 parent a941b6a commit 23bb30a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/dmamux_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ DEVICE_DT_INST_DEFINE(index, \
&dmamux_stm32_init, \
device_pm_control_nop, \
&dmamux_stm32_data_##index, &dmamux_stm32_config_##index,\
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
&dma_funcs);

DT_INST_FOREACH_STATUS_OKAY(DMAMUX_INIT)

0 comments on commit 23bb30a

Please sign in to comment.