drivers: ipm: set IPM_STM32_HSEM default from the device tree

Change IPM_STM32_HSEM Kconfig definition so that it picks the correct
default automatically depending on which cpu node is enabled in the
device tree, rather than relying on board specific Kconfig overrides.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
This commit is contained in:
Fabio Baltieri 2021-08-16 15:35:34 +01:00 committed by Anas Nashif
commit 466ca63c2b
4 changed files with 4 additions and 11 deletions

View file

@ -12,14 +12,6 @@ config BOARD
config STM32H7_DUAL_CORE
default y
if IPM_STM32_HSEM
config IPM_STM32_HSEM_CPU
default 1 if BOARD_STM32H747I_DISCO_M7
default 2 if BOARD_STM32H747I_DISCO_M4
endif # IPM_STM32_HSEM
if NETWORKING
config NET_L2_ETHERNET

View file

@ -120,7 +120,8 @@ config IPM_STM32_HSEM
config IPM_STM32_HSEM_CPU
int "HSEM CPU ID"
default 1
default 1 if "$(dt_nodelabel_enabled,cpu0)"
default 2 if "$(dt_nodelabel_enabled,cpu1)"
range 1 2
depends on IPM_STM32_HSEM
help

View file

@ -24,7 +24,7 @@
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
cpu0: cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-m7";
reg = <0>;

View file

@ -8,7 +8,7 @@
/ {
cpus {
cpu@1 {
cpu1: cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-m4f";
reg = <1>;