Skip to content

Commit 35a391d

Browse files
mathieuchopstmjhedberg
authored andcommitted
soc: st: stm32: use series-agnostic STM32 LL headers
Use the series-agnostic STM32 LL headers from the STM32Cube HAL module instead of series-specific ones in STM32 SoC-specific code. Also remove inclusion of `stm32XXxx.h` in a few files which already include `soc.h` who is tasked with doing this inclusion. Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
1 parent 19e1b2b commit 35a391d

File tree

19 files changed

+70
-72
lines changed

19 files changed

+70
-72
lines changed

soc/st/stm32/stm32c0x/power.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
#include <clock_control/clock_stm32_ll_common.h>
99
#include <soc.h>
1010

11-
#include <stm32c0xx_ll_cortex.h>
12-
#include <stm32c0xx_ll_pwr.h>
13-
#include <stm32c0xx.h>
11+
#include <stm32_ll_cortex.h>
12+
#include <stm32_ll_pwr.h>
1413

1514
#include <zephyr/kernel.h>
1615
#include <zephyr/logging/log.h>

soc/st/stm32/stm32f1x/power.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
#include <clock_control/clock_stm32_ll_common.h>
8-
#include <stm32f1xx_ll_cortex.h>
9-
#include <stm32f1xx_ll_pwr.h>
8+
#include <stm32_ll_cortex.h>
9+
#include <stm32_ll_pwr.h>
1010

1111
#include <zephyr/kernel.h>
1212
#include <zephyr/logging/log.h>

soc/st/stm32/stm32f1x/poweroff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#include <stm32f1xx_ll_cortex.h>
8-
#include <stm32f1xx_ll_pwr.h>
7+
#include <stm32_ll_cortex.h>
8+
#include <stm32_ll_pwr.h>
99

1010
#include <zephyr/kernel.h>
1111
#include <zephyr/sys/poweroff.h>

soc/st/stm32/stm32f1x/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <zephyr/init.h>
1414

1515
#include <stm32_ll_system.h>
16-
#include <stm32f1xx_ll_bus.h>
16+
#include <stm32_ll_bus.h>
1717

1818
#include <cmsis_core.h>
1919

soc/st/stm32/stm32f4x/power.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
#include <clock_control/clock_stm32_ll_common.h>
88
#include <soc.h>
99

10-
#include <stm32f4xx_ll_bus.h>
11-
#include <stm32f4xx_ll_cortex.h>
12-
#include <stm32f4xx_ll_pwr.h>
13-
#include <stm32f4xx.h>
10+
#include <stm32_ll_bus.h>
11+
#include <stm32_ll_cortex.h>
12+
#include <stm32_ll_pwr.h>
1413

1514
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
1615
#include <zephyr/drivers/counter.h>

soc/st/stm32/stm32g0x/power.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#include <soc.h>
1010
#include <zephyr/init.h>
1111

12-
#include <stm32g0xx_ll_utils.h>
13-
#include <stm32g0xx_ll_bus.h>
14-
#include <stm32g0xx_ll_cortex.h>
15-
#include <stm32g0xx_ll_pwr.h>
16-
#include <stm32g0xx_ll_system.h>
12+
#include <stm32_ll_utils.h>
13+
#include <stm32_ll_bus.h>
14+
#include <stm32_ll_cortex.h>
15+
#include <stm32_ll_pwr.h>
16+
#include <stm32_ll_system.h>
1717
#include <clock_control/clock_stm32_ll_common.h>
1818

1919
#include <zephyr/logging/log.h>

soc/st/stm32/stm32g4x/power.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
#include <soc.h>
1313

1414
#include <clock_control/clock_stm32_ll_common.h>
15-
#include <stm32g4xx_ll_bus.h>
16-
#include <stm32g4xx_ll_cortex.h>
17-
#include <stm32g4xx_ll_pwr.h>
18-
#include <stm32g4xx_ll_system.h>
19-
#include <stm32g4xx_ll_utils.h>
15+
#include <stm32_ll_bus.h>
16+
#include <stm32_ll_cortex.h>
17+
#include <stm32_ll_pwr.h>
18+
#include <stm32_ll_system.h>
19+
#include <stm32_ll_utils.h>
2020
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
2121

2222
/* Invoke Low Power/System Off specific Tasks */

soc/st/stm32/stm32h5x/power.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include <soc.h>
99
#include <zephyr/init.h>
1010

11-
#include <stm32h5xx_ll_cortex.h>
12-
#include <stm32h5xx_ll_pwr.h>
11+
#include <stm32_ll_cortex.h>
12+
#include <stm32_ll_pwr.h>
1313
#include <clock_control/clock_stm32_ll_common.h>
1414

1515
#include <zephyr/logging/log.h>

soc/st/stm32/stm32l0x/power.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
#include <soc.h>
99
#include <zephyr/init.h>
1010

11-
#include <stm32l0xx_ll_utils.h>
12-
#include <stm32l0xx_ll_bus.h>
13-
#include <stm32l0xx_ll_cortex.h>
14-
#include <stm32l0xx_ll_pwr.h>
15-
#include <stm32l0xx_ll_rcc.h>
16-
#include <stm32l0xx_ll_system.h>
11+
#include <stm32_ll_utils.h>
12+
#include <stm32_ll_bus.h>
13+
#include <stm32_ll_cortex.h>
14+
#include <stm32_ll_pwr.h>
15+
#include <stm32_ll_rcc.h>
16+
#include <stm32_ll_system.h>
1717
#include <clock_control/clock_stm32_ll_common.h>
1818
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
1919

soc/st/stm32/stm32l1x/power.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
#include <clock_control/clock_stm32_ll_common.h>
8-
#include <stm32l1xx_ll_cortex.h>
9-
#include <stm32l1xx_ll_pwr.h>
8+
#include <stm32_ll_cortex.h>
9+
#include <stm32_ll_pwr.h>
1010

1111
#include <zephyr/kernel.h>
1212
#include <zephyr/logging/log.h>

0 commit comments

Comments
 (0)