summaryrefslogtreecommitdiff
path: root/zephyr/projects/nissa/src/sub_board.c
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-03-31 22:16:52 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-01 16:05:04 +0000
commit61fdaba5fd6cac7c8557090c35154e134288a826 (patch)
tree55537d58699fe829fabe7c689061672387a07f17 /zephyr/projects/nissa/src/sub_board.c
parentfb409929780973e363a152365c624c7c9c0310e6 (diff)
downloadchrome-ec-61fdaba5fd6cac7c8557090c35154e134288a826.tar.gz
Revert "nissa: convert HOOK_INIT to SYS_INIT"
This reverts commit 6ef9b0800b60dd25654e0a87cef9d22a5146bb80. Reason for revert: b:227661993: EFS2 broken after SYS_INIT changes Not a clean revert. zephyr/projects/nissa/src/nereid/board_config.c was moved to zephyr/projects/nissa/src/sub_board.c in CL:3559690. Original change's description: > nissa: convert HOOK_INIT to SYS_INIT > > Convert all HOOK_INIT calls to the equivalent SYS_INIT. > > BUG=b:226434387 > BRANCH=none > TEST=zmake testall > > Signed-off-by: Keith Short <keithshort@chromium.org> > Change-Id: I9fde383e7ee7ebf5e939e39ac4145b1d585b4a67 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3553846 > Reviewed-by: Tristan Honscheid <honscheid@google.com> Bug: b:226434387 Change-Id: I2e30cf3898dae1724b97631dd7ca21ebf8a7a6f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3564806 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 'zephyr/projects/nissa/src/sub_board.c')
-rw-r--r--zephyr/projects/nissa/src/sub_board.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/zephyr/projects/nissa/src/sub_board.c b/zephyr/projects/nissa/src/sub_board.c
index 0ef2e217b0..a42e0c3b64 100644
--- a/zephyr/projects/nissa/src/sub_board.c
+++ b/zephyr/projects/nissa/src/sub_board.c
@@ -76,9 +76,8 @@ static void hdmi_hpd_interrupt(const struct device *device,
* (indicated by CBI fw_config); this function configures them according to the
* needs of the present sub-board.
*/
-static int nissa_subboard_config(const struct device *unused)
+static void nereid_subboard_config(void)
{
- ARG_UNUSED(unused);
enum nissa_sub_board_type sb = nissa_get_sb_type();
/*
@@ -165,27 +164,22 @@ static int nissa_subboard_config(const struct device *unused)
BIT(hpd_gpio->pin));
irq_unlock(irq_key);
}
-
- return 0;
}
-SYS_INIT(nissa_subboard_config, APPLICATION, HOOK_PRIO_POST_FIRST);
+DECLARE_HOOK(HOOK_INIT, nereid_subboard_config, HOOK_PRIO_POST_FIRST);
/*
* Enable interrupts
*/
-static int board_init(const struct device *unused)
+static void board_init(void)
{
- ARG_UNUSED(unused);
/*
* Enable USB-C interrupts.
*/
gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_usb_c0));
if (board_get_usb_pd_port_count() == 2)
gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_usb_c1));
-
- return 0;
}
-SYS_INIT(board_init, APPLICATION, HOOK_PRIO_DEFAULT);
+DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
/* Trigger shutdown by enabling the Z-sleep circuit */
__override void board_hibernate_late(void)