diff options
author | Jett Rink <jettrink@chromium.org> | 2018-08-17 13:33:02 -0600 |
---|---|---|
committer | Jonathan Brandmeyer <jbrandmeyer@chromium.org> | 2018-09-10 15:26:45 +0000 |
commit | 2c7d433ff6d468ac08f8ceefc809ce5ab0638177 (patch) | |
tree | 871cece84b735f983f1485a07ef7e796d3f933a5 /chip | |
parent | a5194c132b87562b9a3e59c199c22d3b54a17ebc (diff) | |
download | chrome-ec-2c7d433ff6d468ac08f8ceefc809ce5ab0638177.tar.gz |
tcpm: add TCPC RX circular buffer in EC
The alert line for TCPC will stay asserted as long as there are RX
messages for the TCPM (i.e. EC) to pull from the TCPC. We should clear
all of the RX messages we know about during a single alert handling
session.
This CL can stand on its own, but it is a part of a CL stack that will
tighten the critical section of time between received messages from the
TCPC and sending follow up message out through the TCPC.
See go/usb-pd-slow-response-time for more details.
BRANCH=none
BUG=b:112088135,b:112344286,b:111909282,b:112848644,b:113124761
BUG=b:113057273,b:112825261
TEST=Reduces reset issue in most cases for phaser, bobba. Does not seem to
adversely affect state machine negotiation. Full CL stack consistently
sends a REQUEST at 18ms after a SRC_CAP GoodCRC, which is well below the
24 ms threshold we need to be under for USB PD spec compliance.
Also testing pd_suspend scenario manually and EC was responsive after
port 1 suspend because of "bad behavior"
Change-Id: I1654b46400e9881f2927a5f6d6ace589edd182de
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1185727
(cherry picked from commit e8070b44b088e99e38ec741ed8091c7e4a033bef)
Reviewed-on: https://chromium-review.googlesource.com/1215451
Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/it83xx/intc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chip/it83xx/intc.c b/chip/it83xx/intc.c index 2d1f06b2db..ae52a5d5a2 100644 --- a/chip/it83xx/intc.c +++ b/chip/it83xx/intc.c @@ -9,6 +9,7 @@ #include "kmsc_chip.h" #include "registers.h" #include "task.h" +#include "tcpm.h" #include "usb_pd.h" #ifdef CONFIG_USB_PD_TCPM_ITE83XX @@ -24,12 +25,9 @@ static void chip_pd_irq(enum usbpd_port port) PD_EVENT_TCPC_RESET, 0); } else { if (USBPD_IS_RX_DONE(port)) { - /* mask RX done interrupt */ - IT83XX_USBPD_IMR(port) |= USBPD_REG_MASK_MSG_RX_DONE; + tcpm_enqueue_message(port); /* clear RX done interrupt */ IT83XX_USBPD_ISR(port) = USBPD_REG_MASK_MSG_RX_DONE; - task_set_event(PD_PORT_TO_TASK_ID(port), - PD_EVENT_RX, 0); } if (USBPD_IS_TX_DONE(port)) { /* clear TX done interrupt */ |