2020 */
2121
2222
23+ #ifdef CONFIG_SOC_RESET_HOOK
2324/**
2425 * @brief SoC hook executed at the beginning of the reset vector.
2526 *
2627 * This hook is implemented by the SoC and can be used to perform any
2728 * SoC-specific initialization.
2829 */
2930void soc_reset_hook (void );
31+ #else
32+ #define soc_reset_hook () do { } while (0)
33+ #endif
3034
35+ #ifdef CONFIG_SOC_PREP_HOOK
3136/**
3237 * @brief SoC hook executed after the reset vector.
3338 *
3439 * This hook is implemented by the SoC and can be used to perform any
3540 * SoC-specific initialization.
3641 */
3742void soc_prep_hook (void );
43+ #else
44+ #define soc_prep_hook () do { } while (0)
45+ #endif
3846
47+ #ifdef CONFIG_SOC_EARLY_INIT_HOOK
3948/**
4049 * @brief SoC hook executed before the kernel and devices are initialized.
4150 *
4251 * This hook is implemented by the SoC and can be used to perform any
4352 * SoC-specific initialization.
4453 */
4554void soc_early_init_hook (void );
55+ #else
56+ #define soc_early_init_hook () do { } while (0)
57+ #endif
4658
59+ #ifdef CONFIG_SOC_LATE_INIT_HOOK
4760/**
4861 * @brief SoC hook executed after the kernel and devices are initialized.
4962 *
5063 * This hook is implemented by the SoC and can be used to perform any
5164 * SoC-specific initialization.
5265 */
5366void soc_late_init_hook (void );
67+ #else
68+ #define soc_late_init_hook () do { } while (0)
69+ #endif
5470
71+ #ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
5572/**
5673 * @brief SoC per-core initialization
5774 *
5875 * This hook is implemented by the SoC and can be used to perform any
5976 * SoC-specific per-core initialization
6077 */
6178void soc_per_core_init_hook (void );
79+ #else
80+ #define soc_per_core_init_hook () do { } while (0)
81+ #endif
6282
83+ #ifdef CONFIG_BOARD_EARLY_INIT_HOOK
6384/**
6485 * @brief Board hook executed before the kernel starts.
6586 *
@@ -68,7 +89,11 @@ void soc_per_core_init_hook(void);
6889 * initialization.
6990 */
7091void board_early_init_hook (void );
92+ #else
93+ #define board_early_init_hook () do { } while (0)
94+ #endif
7195
96+ #ifdef CONFIG_BOARD_LATE_INIT_HOOK
7297/**
7398 * @brief Board hook executed after the kernel starts.
7499 *
@@ -77,5 +102,8 @@ void board_early_init_hook(void);
77102 * any board-specific initialization.
78103 */
79104void board_late_init_hook (void );
105+ #else
106+ #define board_late_init_hook () do { } while (0)
107+ #endif
80108
81109#endif
0 commit comments