Skip to content

Commit 905f496

Browse files
erwangocarlescufi
authored andcommitted
dts: stm32h7: Remove zephyr,flash-controller support on M4 core
Flash controller support is not yet ready on M4 core. Remove the chosen declaration to make it clear. Additionally, generate a build error if this driver is compiled on M4 core. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 5664ddd commit 905f496

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

drivers/flash/flash_stm32h7x.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ LOG_MODULE_REGISTER(LOG_DOMAIN);
2929
*/
3030
#define STM32H7_FLASH_TIMEOUT (2 * STM32H7_FLASH_MAX_ERASE_TIME)
3131

32+
#ifdef CONFIG_CPU_CORTEX_M4
33+
#error Flash driver on M4 core is not supported yet
34+
#endif
35+
3236
#if defined(CONFIG_MULTITHREADING)
3337
/*
3438
* This is named flash_stm32_sem_take instead of flash_stm32_lock (and

dts/arm/st/h7/stm32h745Xi_m4.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
/delete-node/ &flash0;
1111

1212
/ {
13+
chosen {
14+
/* Flash controller support is not yet supported on M4 core */
15+
/delete-property/ zephyr,flash-controller;
16+
};
17+
1318
cpus {
1419
/delete-node/ cpu@0;
1520
};

dts/arm/st/h7/stm32h747Xi_m4.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
/delete-node/ &flash0;
1111

1212
/ {
13+
chosen {
14+
/* Flash controller support is not yet supported on M4 core */
15+
/delete-property/ zephyr,flash-controller;
16+
};
17+
1318
cpus {
1419
/delete-node/ cpu@0;
1520
};

0 commit comments

Comments
 (0)