summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorudaykiran <udaykiran@google.com>2021-06-18 23:07:05 -0700
committerCommit Bot <commit-bot@chromium.org>2021-06-25 03:33:38 +0000
commit1e6577393086546f983d325be264293dbfc12a76 (patch)
tree9facfe6c7bb34c8545fd75380de6f029315c8f00 /include
parent07578aee1c0c64343ee0de7e186a708984552904 (diff)
downloadchrome-ec-1e6577393086546f983d325be264293dbfc12a76.tar.gz
SenderResponseTimer: offset with TCPC transmit success timestamp
The SenderResponseTimer shall be used by the sender's policy engine to ensure that a message requesting a response is responded to within a bounded time. Which is 24Msec to 30 Msec. However, delays associated TCPC I2C, PE, and PRL layers make hard reset response time greater 30Msec. This CL address the delay associated with TCPC. When TCPC transmit success is reported by TCPC upon receiving the GoodCRC, time stamp is recorded. Another time stamp is recorded just before starting SenderResponseTimer and offsetting PD_T_SENDER_RESPONSE. BUG=b:182439366 BRANCH=none TEST=checked with GRL compliance tester. Noted that total response time is in the middle of the expected time of 24ms to 30ms. This fix achieved response time about 27.675ms Signed-off-by: udaykiran <udaykiran@google.com> Change-Id: Id2ddcdd90eed8b3d66ade3d16877004871a21de8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2971078 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/mock/usb_prl_mock.h1
-rw-r--r--include/usb_prl_sm.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/mock/usb_prl_mock.h b/include/mock/usb_prl_mock.h
index 052b3e7b76..ca5d3c8fc4 100644
--- a/include/mock/usb_prl_mock.h
+++ b/include/mock/usb_prl_mock.h
@@ -22,6 +22,7 @@ enum pd_ctrl_msg_type mock_prl_get_last_sent_ctrl_msg(int port);
enum pd_data_msg_type mock_prl_get_last_sent_data_msg(int port);
+
void mock_prl_clear_last_sent_msg(int port);
void mock_prl_message_sent(int port);
diff --git a/include/usb_prl_sm.h b/include/usb_prl_sm.h
index afcaa2cfed..0111f54fc1 100644
--- a/include/usb_prl_sm.h
+++ b/include/usb_prl_sm.h
@@ -11,7 +11,15 @@
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
#include "usb_sm.h"
+#include "timer.h"
+/**
+ * Returns TX success time stamp.
+ *
+ * @param port USB-C port number
+ * @return the time stamp of TCPC tx success.
+ **/
+timestamp_t prl_get_tcpc_tx_success_ts(int port);
/**
* Returns true if Protocol Layer State Machine is in run mode