diff options
Diffstat (limited to 'zephyr/shim/src/flash.c')
-rw-r--r-- | zephyr/shim/src/flash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zephyr/shim/src/flash.c b/zephyr/shim/src/flash.c index baac38af92..064067a2bc 100644 --- a/zephyr/shim/src/flash.c +++ b/zephyr/shim/src/flash.c @@ -418,4 +418,8 @@ uint32_t flash_physical_get_writable_flags(uint32_t cur_flags) * The priority flash_dev_init should be lower than GPIO initialization because * it calls gpio_get_level function. */ -SYS_INIT(flash_dev_init, PRE_KERNEL_1, 51); +#if CONFIG_PLATFORM_EC_FLASH_INIT_PRIORITY <= \ + CONFIG_PLATFORM_EC_GPIO_INIT_PRIORITY +#error "Flash must be initialized after GPIOs" +#endif +SYS_INIT(flash_dev_init, POST_KERNEL, CONFIG_PLATFORM_EC_FLASH_INIT_PRIORITY); |