diff --git a/drivers/pcie/host/Kconfig b/drivers/pcie/host/Kconfig index a3d7fc6b5c3..80925657702 100644 --- a/drivers/pcie/host/Kconfig +++ b/drivers/pcie/host/Kconfig @@ -14,6 +14,12 @@ module = PCIE module-str = pcie source "subsys/logging/Kconfig.template.log_config" +config PCIE_INIT_PRIORITY + int "PCIe initialization priority" + default 41 + help + PCIe host drivers initialization priority. + config PCIE_CONTROLLER bool "PCIe Controller management" help diff --git a/drivers/pcie/host/pcie.c b/drivers/pcie/host/pcie.c index 5b2198b5278..89f05ac1238 100644 --- a/drivers/pcie/host/pcie.c +++ b/drivers/pcie/host/pcie.c @@ -554,4 +554,4 @@ static int pcie_init(void) #define PCIE_SYS_INIT_LEVEL PRE_KERNEL_1 #endif -SYS_INIT(pcie_init, PCIE_SYS_INIT_LEVEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +SYS_INIT(pcie_init, PCIE_SYS_INIT_LEVEL, CONFIG_PCIE_INIT_PRIORITY); diff --git a/drivers/pcie/host/pcie_ecam.c b/drivers/pcie/host/pcie_ecam.c index 4ba8889378d..15a52b3247d 100644 --- a/drivers/pcie/host/pcie_ecam.c +++ b/drivers/pcie/host/pcie_ecam.c @@ -403,7 +403,7 @@ static const struct pcie_ctrl_driver_api pcie_ecam_api = { &pcie_ecam_data##n, \ &pcie_ecam_config##n, \ PRE_KERNEL_1, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + CONFIG_PCIE_INIT_PRIORITY, \ &pcie_ecam_api); DT_INST_FOREACH_STATUS_OKAY(PCIE_ECAM_INIT)