summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-12-03 18:16:32 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-12-05 02:05:44 -0800
commita9d7417951efb95cb2c076791b0bea6d4e4d62e2 (patch)
tree0ce0c0404681a088ee490849618308f099ad965a /driver
parentb2945c1ce203358e0fd3cd20880265473a62fd2f (diff)
downloadchrome-ec-a9d7417951efb95cb2c076791b0bea6d4e4d62e2.tar.gz
tcpc: add 2 bytes into TX byte count register
Add 2 bytes into the TX byte count register used in TCPC interface. BUG=chrome-os-partner:48256 BRANCH=none TEST=load on glados and attach zinger, make sure PD negotiation successful. Change-Id: Ie57d79f20def861c22f6e2e023545a65825ab3b4 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/315879 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/tcpm/tcpci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index acc61e70c4..2d268a961a 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -173,7 +173,8 @@ int tcpm_transmit(int port, enum tcpm_transmit_type type, uint16_t header,
int reg = TCPC_REG_TX_DATA;
int rv, cnt = 4*PD_HEADER_CNT(header);
- rv = tcpc_write(port, TCPC_REG_TX_BYTE_CNT, cnt);
+ /* TX_BYTE_CNT includes 2 bytes for message header */
+ rv = tcpc_write(port, TCPC_REG_TX_BYTE_CNT, cnt + 2);
rv |= tcpc_write16(port, TCPC_REG_TX_HDR, header);