summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/hooks.h8
-rw-r--r--zephyr/projects/corsola/src/krabby/usbc_config.c2
-rw-r--r--zephyr/projects/corsola/src/usbc_config.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/include/hooks.h b/include/hooks.h
index 3a5b05b39c..3df031c48f 100644
--- a/include/hooks.h
+++ b/include/hooks.h
@@ -81,9 +81,11 @@ enum hook_priority {
/* Generic values across all hooks */
#define HOOK_PRIO_FIRST 1 /* Highest priority */
#define HOOK_PRIO_POST_FIRST 2
-#define HOOK_PRIO_PRE_DEFAULT 49 /* Priority just before default */
-#define HOOK_PRIO_DEFAULT 50 /* Default priority */
-#define HOOK_PRIO_POST_DEFAULT 51 /* Priority just after default */
+
+#define HOOK_PRIO_PRE_DEFAULT CONFIG_KERNEL_INIT_PRIORITY_OBJECTS
+#define HOOK_PRIO_DEFAULT CONFIG_KERNEL_INIT_PRIORITY_DEFAULT
+#define HOOK_PRIO_POST_DEFAULT CONFIG_KERNEL_INIT_PRIORITY_DEVICE
+
#define HOOK_PRIO_LAST 99 /* Lowest priority */
/* LPC inits before modules which need memory-mapped I/O */
diff --git a/zephyr/projects/corsola/src/krabby/usbc_config.c b/zephyr/projects/corsola/src/krabby/usbc_config.c
index 36a721a7ee..3de06c6efd 100644
--- a/zephyr/projects/corsola/src/krabby/usbc_config.c
+++ b/zephyr/projects/corsola/src/krabby/usbc_config.c
@@ -69,7 +69,7 @@ static int board_usbc_init(const struct device *unused)
gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_usb_c0_ppc_bc12));
return 0;
}
-SYS_INIT(board_usbc_init, APPLICATION, HOOK_PRIO_POST_DEFAULT);
+SYS_INIT(board_usbc_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
void ppc_interrupt(enum gpio_signal signal)
{
diff --git a/zephyr/projects/corsola/src/usbc_config.c b/zephyr/projects/corsola/src/usbc_config.c
index a377d84d3a..6cf078b2db 100644
--- a/zephyr/projects/corsola/src/usbc_config.c
+++ b/zephyr/projects/corsola/src/usbc_config.c
@@ -52,7 +52,7 @@ static int baseboard_init(const struct device *unused)
#endif
return 0;
}
-SYS_INIT(baseboard_init, APPLICATION, HOOK_PRIO_PRE_DEFAULT);
+SYS_INIT(baseboard_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
__override uint8_t board_get_usb_pd_port_count(void)
{