diff options
author | Keith Short <keithshort@chromium.org> | 2022-03-31 22:04:49 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-01 16:05:27 +0000 |
commit | ec216b503d419fcbe6d25909fbfc0b5735dca2ad (patch) | |
tree | 3e092d21740c50b71b9c2c1edd43cd3789308870 /include/hooks.h | |
parent | 85814a20f92141a0f635b257d58f59a744f63a93 (diff) | |
download | chrome-ec-ec216b503d419fcbe6d25909fbfc0b5735dca2ad.tar.gz |
Revert "zephyr: convert HOOK_INIT into SYS_INIT"
This reverts commit 48d7ad5ba83311eb6e68b9bd3d04f7977f9308ab.
Reason for revert: b:227661993: EFS2 broken after SYS_INIT changes
TEST=zmake testall
TEST=verify EFS2 boot on Herobrine
Original change's description:
> zephyr: convert HOOK_INIT into SYS_INIT
>
> Convert HOOK_INIT calls to SYS_INIT. This creates wrappers for each
> HOOK_INIT to accommodate the unused, but required device driver instance
> structure.
>
> BUG=none
> BRANCH=none
> TEST=zmake testall
> TEST=Verify zephyr boots to OS on brya
>
> Signed-off-by: Keith Short <keithshort@chromium.org>
> Change-Id: Ie09add55a355d76e56fb324767f990ffd6d57bba
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3553841
> Reviewed-by: Wai-Hong Tam <waihong@google.com>
Bug: none
Change-Id: Ia9034db36eca24c75962bc73938c1ee1405197d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3564800
Tested-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/hooks.h')
-rw-r--r-- | include/hooks.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/include/hooks.h b/include/hooks.h index 3a5b05b39c..e629ffbd9b 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -10,7 +10,6 @@ #include "common.h" -#ifndef CONFIG_ZEPHYR enum hook_priority { /* Generic values across all hooks */ HOOK_PRIO_FIRST = 1, /* Highest priority */ @@ -68,70 +67,6 @@ enum hook_priority { /* After all sensors have been polled */ HOOK_PRIO_TEMP_SENSOR_DONE = HOOK_PRIO_TEMP_SENSOR + 1, }; -#else -/* - * On Zephyr SYS_INIT priorities may only be 0-99. The priority level must - * be a decimal integer literal. See the definition of SYS_INIT() in - * the upstream zephyr/init.h file. - * - * The priorities below match the relative priorities defined above. - * - * TODO(b/226434387): Convert HOOK_INIT calls in shim layer to SYS_INT - */ - /* 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_LAST 99 /* Lowest priority */ - - /* LPC inits before modules which need memory-mapped I/O */ -#define HOOK_PRIO_INIT_LPC 2 - /* - * I2C dependents (battery, sensors, etc), everything but the - * controllers. I2C controller is now initialized in main.c - * TODO(b/138384267): Split this hook up and name the resulting - * ones more semantically. - */ -#define HOOK_PRIO_PRE_I2C 2 -#define HOOK_PRIO_INIT_I2C 3 -#define HOOK_PRIO_POST_I2C 4 - /* Chipset inits before modules which need to know its initial state. */ -#define HOOK_PRIO_INIT_CHIPSET 4 -#define HOOK_PRIO_POST_CHIPSET 5 - /* Lid switch inits before power button */ -#define HOOK_PRIO_INIT_LID 5 -#define HOOK_PRIO_POST_LID 6 - /* Power button inits before chipset and switch */ -#define HOOK_PRIO_INIT_POWER_BUTTON 6 -#define HOOK_PRIO_POST_POWER_BUTTON 7 - /* Init switch states after power button / lid */ -#define HOOK_PRIO_INIT_SWITCH 7 - /* Init fan before PWM */ -#define HOOK_PRIO_INIT_FAN 8 - /* PWM inits before modules which might use it (LEDs) */ -#define HOOK_PRIO_INIT_PWM 9 -#define HOOK_PRIO_POST_PWM 10 - /* Extpower inits before modules which might use it (battery, LEDs) */ -#define HOOK_PRIO_INIT_EXTPOWER 11 -#define HOOK_PRIO_POST_EXTPOWER 12 - /* Init VBOOT hash later, since it depends on deferred functions */ -#define HOOK_PRIO_INIT_VBOOT_HASH 13 - /* Init charge manager before usage in board init */ -#define HOOK_PRIO_INIT_CHARGE_MANAGER 13 -#define HOOK_PRIO_POST_CHARGE_MANAGER 14 - -/* - * For Zephyr, the non-init related hook priorities must still be defined. - */ -enum hook_priority { - /* Specific values to lump temperature-related hooks together */ - HOOK_PRIO_TEMP_SENSOR = 60, - /* After all sensors have been polled */ - HOOK_PRIO_TEMP_SENSOR_DONE = HOOK_PRIO_TEMP_SENSOR + 1, -}; -#endif enum hook_type { /* |