diff options
author | Yuval Peress <peress@chromium.org> | 2021-04-06 13:49:14 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-07 07:13:40 +0000 |
commit | 7fba0e12ffa1d48c9f9f6da9d18125adc9aa75b4 (patch) | |
tree | e3835222dd51a8ed68bd8dca5e43c8e3c9273351 /zephyr/Kconfig.init_priority | |
parent | 2cbfce23cb57f4d625fa796109116420c352c541 (diff) | |
download | chrome-ec-7fba0e12ffa1d48c9f9f6da9d18125adc9aa75b4.tar.gz |
zephyr: fix initialization priority to be forward compatible
In upstream Zephyr the initialization of the GPIO module (and most other
drivers) was changed. This breaks our gpio and in return also flash
initialization.
Update both gpio and flash initialization to work with Kconfig and add
a compile time validation to be able to catch this sooner in the future.
BRANCH=none
BUG=none
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I44e5867dbf4cb3d5934bf0d0807dcc1aa6c778e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808335
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.init_priority')
-rw-r--r-- | zephyr/Kconfig.init_priority | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/zephyr/Kconfig.init_priority b/zephyr/Kconfig.init_priority new file mode 100644 index 0000000000..b8b3ab7195 --- /dev/null +++ b/zephyr/Kconfig.init_priority @@ -0,0 +1,17 @@ +# Copyright 2021 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config PLATFORM_EC_FLASH_INIT_PRIORITY + int "Init priority of the flash module" + default 52 + help + The initialization priority of the flash module. This should always be + greater than PLATFORM_EC_GPIO_INIT_PRIORITY. + +config PLATFORM_EC_GPIO_INIT_PRIORITY + int "Init priority of the GPIO module" + default 51 + help + The initialization priority of the GPIO module. This should always happen + after the gpio drivers are initialized. |