diff options
author | Poornima Tom <poornima.tom@intel.com> | 2020-08-25 23:09:04 +0530 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-04 23:06:31 +0000 |
commit | 241dd72c4e9c16aff5b5fdb295268ffb478d96d0 (patch) | |
tree | 84999750f709ae4444ae8120bf62133fc3667286 /common | |
parent | e7352ce69296f4e7a9e30149caa009b28be4fc9b (diff) | |
download | chrome-ec-241dd72c4e9c16aff5b5fdb295268ffb478d96d0.tar.gz |
cleanup:Consolidate multi PD INTR task config to single config
For a multi Type-C board DUTs, use a common config
CONFIG_HAS_TASK_PD_INT for all the PD_INT tasks defined.
Also,it must be ensured that PDCMD task and PD_INT tasks
are not used togethor.
BUG=none
BRANCH=none
TEST=make buildall -j
Also, adding PDCMD and PD_INT tasks in ec.tasklists successfully
threw error message:"Should not use PDCMD task with PD INT tasks"
Signed-off-by: Poornima Tom <poornima.tom@intel.com>
Change-Id: I1c5f3dd6b46bc355bca8b93f8f1d356db54c0faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2387686
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/system.c | 4 | ||||
-rw-r--r-- | common/usb_pd_protocol.c | 5 | ||||
-rw-r--r-- | common/usbc/usbc_task.c | 5 |
3 files changed, 5 insertions, 9 deletions
diff --git a/common/system.c b/common/system.c index 2d3cfe29d9..eed9e4204f 100644 --- a/common/system.c +++ b/common/system.c @@ -912,9 +912,7 @@ static int handle_pending_reboot(enum ec_reboot_cmd cmd) /* Reset external PD chips. */ if (IS_ENABLED(HAS_TASK_PDCMD) || - IS_ENABLED(HAS_TASK_PD_INT_C0) || - IS_ENABLED(HAS_TASK_PD_INT_C1) || - IS_ENABLED(HAS_TASK_PD_INT_C2)) + IS_ENABLED(CONFIG_HAS_TASK_PD_INT)) board_reset_pd_mcu(); cflush(); diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 63c300b9ca..45b91397b2 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -2755,8 +2755,7 @@ static int pd_restart_tcpc(int port) #endif /* High-priority interrupt tasks implementations */ -#if defined(HAS_TASK_PD_INT_C0) || defined(HAS_TASK_PD_INT_C1) || \ - defined(HAS_TASK_PD_INT_C2) +#ifdef CONFIG_HAS_TASK_PD_INT /* Used to conditionally compile code in main pd task. */ #define HAS_DEFFERED_INTERRUPT_HANDLER @@ -2844,7 +2843,7 @@ void pd_interrupt_handler_task(void *p) } } } -#endif /* HAS_TASK_PD_INT_C0 || HAS_TASK_PD_INT_C1 || HAS_TASK_PD_INT_C2 */ +#endif /* CONFIG_HAS_TASK_PD_INT */ static void pd_send_enter_usb(int port, int *timeout) { diff --git a/common/usbc/usbc_task.c b/common/usbc/usbc_task.c index 54a1f601ba..f52d19ea0d 100644 --- a/common/usbc/usbc_task.c +++ b/common/usbc/usbc_task.c @@ -57,8 +57,7 @@ void tc_start_event_loop(int port) } /* High-priority interrupt tasks implementations */ -#if defined(HAS_TASK_PD_INT_C0) || defined(HAS_TASK_PD_INT_C1) || \ - defined(HAS_TASK_PD_INT_C2) +#ifdef CONFIG_HAS_TASK_PD_INT /* Used to conditionally compile code in main pd task. */ #define HAS_DEFFERED_INTERRUPT_HANDLER @@ -152,7 +151,7 @@ void pd_interrupt_handler_task(void *p) } } } -#endif /* HAS_TASK_PD_INT_C0 || HAS_TASK_PD_INT_C1 || HAS_TASK_PD_INT_C2 */ +#endif /* CONFIG_HAS_TASK_PD_INT */ static void pd_task_init(int port) |