From 9d131016fc46e00c53ebb697ca986905170c630e Mon Sep 17 00:00:00 2001 From: Diana Z Date: Tue, 19 May 2020 10:29:15 -0600 Subject: PD: Pull EC_CMD_PD_HOST_EVENT_STATUS into common code This command is unrelated to the PDCMD task and can be safely pulled into the common PD host command code. After this commit, most boards using the PD_INT tasks may safely remove the PDCMD task from their boards. BRANCH=None BUG=b:154959596 TEST=make -j buildall Signed-off-by: Diana Z Change-Id: I2915acd5398a5dc7da2e6daff1e213fc8dfbadc8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2208220 Reviewed-by: Aseda Aboagye --- board/reef_it8320/board.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'board') diff --git a/board/reef_it8320/board.c b/board/reef_it8320/board.c index a9af42a492..630f3f950f 100644 --- a/board/reef_it8320/board.c +++ b/board/reef_it8320/board.c @@ -103,41 +103,6 @@ void board_pd_vconn_ctrl(int port, enum usbpd_cc_pin cc_pin, int enabled) } } -/* - * PD host event status for host command - * Note: this variable must be aligned on 4-byte boundary because we pass the - * address to atomic_ functions which use assembly to access them. - */ -static uint32_t pd_host_event_status __aligned(4); - -static enum ec_status -hc_pd_host_event_status(struct host_cmd_handler_args *args) -{ - struct ec_response_host_event_status *r = args->response; - - /* Read and clear the host event status to return to AP */ - r->status = atomic_read_clear(&pd_host_event_status); - - args->response_size = sizeof(*r); - return EC_RES_SUCCESS; -} -DECLARE_HOST_COMMAND(EC_CMD_PD_HOST_EVENT_STATUS, hc_pd_host_event_status, - EC_VER_MASK(0)); - -#if defined(HAS_TASK_HOSTCMD) && !defined(TEST_BUILD) -/* Send host event up to AP */ -void pd_send_host_event(int mask) -{ - /* mask must be set */ - if (!mask) - return; - - atomic_or(&pd_host_event_status, mask); - /* interrupt the AP */ - host_set_single_event(EC_HOST_EVENT_PD_MCU); -} -#endif - const enum gpio_signal hibernate_wake_pins[] = { GPIO_AC_PRESENT, GPIO_LID_OPEN, -- cgit v1.2.1