From bd20798aa85a0bbb2dca3b9ce9a9d563e215fa0c Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Tue, 16 Oct 2018 08:23:37 -0600 Subject: dragonegg: make PD interrupt use higher priority task Start using the higher priority task to handle PD interrupts from C2. Remove higher priority tasks for C0 and C1 since they are handle by chip code in interrupt context method already. BRANCH=none BUG=b:112088135 TEST=dragonegg PD still works Change-Id: I90f2557b73ce6331f012057839e5de22646183c6 Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/1283243 Reviewed-by: Scott Collyer --- common/usb_pd_protocol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 4dab66f8df..e9e86be32b 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -2461,7 +2461,10 @@ static int pd_restart_tcpc(int port) } #endif -#ifdef HAS_TASK_PD_INT_C0 +/* High-priority interrupt tasks implementations */ +#if defined(HAS_TASK_PD_INT_C0) || defined(HAS_TASK_PD_INT_C1) || \ + defined(HAS_TASK_PD_INT_C2) + /* Events for pd_interrupt_handler_task */ #define PD_PROCESS_INTERRUPT (1<<0) @@ -2508,7 +2511,7 @@ void pd_interrupt_handler_task(void *p) } } } -#endif /* HAS_TASK_PD_INT_C0 */ +#endif /* HAS_TASK_PD_INT_C0 || HAS_TASK_PD_INT_C1 || HAS_TASK_PD_INT_C2 */ void pd_task(void *u) { -- cgit v1.2.1