Skip to content

Commit f315afd

Browse files
erwangogalak
authored andcommitted
arch: stm32: Fix inclusion of SPI headers
In some STM32 series, SPI LL headers where included under CONFIG_CLOCK_CONTROL_STM32_CUBE flag definition. Fix this and use CONFIG_SPI_STM32 instead. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 922490d commit f315afd

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

arch/arm/soc/st_stm32/stm32f3/soc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,16 @@
4242
#include <stm32f3xx_ll_bus.h>
4343
#include <stm32f3xx_ll_rcc.h>
4444
#include <stm32f3xx_ll_system.h>
45-
#include <stm32f3xx_ll_spi.h>
4645
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */
4746

4847
#ifdef CONFIG_I2C
4948
#include <stm32f3xx_ll_i2c.h>
5049
#endif
5150

51+
#ifdef CONFIG_SPI_STM32
52+
#include <stm32f3xx_ll_spi.h>
53+
#endif
54+
5255
#ifdef CONFIG_IWDG_STM32
5356
#include <stm32f3xx_ll_iwdg.h>
5457
#endif

arch/arm/soc/st_stm32/stm32f4/soc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include <stm32f4xx_ll_bus.h>
3838
#include <stm32f4xx_ll_rcc.h>
3939
#include <stm32f4xx_ll_system.h>
40-
#include <stm32f4xx_ll_spi.h>
4140
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */
4241

4342
#ifdef CONFIG_SERIAL_HAS_DRIVER
@@ -48,6 +47,10 @@
4847
#include <stm32f4xx_ll_i2c.h>
4948
#endif
5049

50+
#ifdef CONFIG_SPI_STM32
51+
#include <stm32f4xx_ll_spi.h>
52+
#endif
53+
5154
#ifdef CONFIG_ENTROPY_STM32_RNG
5255
#include <stm32f4xx_ll_rng.h>
5356
#endif

arch/arm/soc/st_stm32/stm32l4/soc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@
4141
#include <stm32l4xx_ll_bus.h>
4242
#include <stm32l4xx_ll_rcc.h>
4343
#include <stm32l4xx_ll_system.h>
44-
#include <stm32l4xx_ll_spi.h>
4544
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */
4645

46+
#ifdef CONFIG_SPI_STM32
47+
#include <stm32l4xx_ll_spi.h>
48+
#endif
49+
4750
#ifdef CONFIG_I2C
4851
#include <stm32l4xx_ll_i2c.h>
4952
#endif

0 commit comments

Comments
 (0)