Skip to content

Commit

Permalink
boards: arm: mimxrt685_evk: remove hardcoded board init priority
Browse files Browse the repository at this point in the history
Custom init code was hardcoded, create a Kconfig option for it.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
  • Loading branch information
gmarull authored and carlescufi committed Jun 7, 2022
1 parent c3daefa commit a1b6721
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions boards/arm/mimxrt685_evk/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config BOARD_INIT_PRIORITY
int "Board initialization priority"
default 45
help
Board initialization priority.
3 changes: 1 addition & 2 deletions boards/arm/mimxrt685_evk/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ static int mimxrt685_evk_pinmux_init(const struct device *dev)
return 0;
}

/* priority set to CONFIG_PINMUX_INIT_PRIORITY value */
SYS_INIT(mimxrt685_evk_pinmux_init, PRE_KERNEL_1, 45);
SYS_INIT(mimxrt685_evk_pinmux_init, PRE_KERNEL_1, CONFIG_BOARD_INIT_PRIORITY);

0 comments on commit a1b6721

Please sign in to comment.