Felix Held has posted comments on this change. ( https://review.coreboot.org/25867 )
Change subject: drivers/i2c/adm1026: Remove unneeded headers
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/25867
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaed9c0882847511642d8eaab25e10d1ecf24bf90
Gerrit-Change-Number: 25867
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 26 Apr 2018 20:29:23 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Felix Held has posted comments on this change. ( https://review.coreboot.org/25868 )
Change subject: drivers/i2c/lm63: Remove unneeded headers
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/25868
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id13eef7f0fca0b929372490859aa4734ea7a9f23
Gerrit-Change-Number: 25868
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 26 Apr 2018 20:29:05 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Daisuke Nojiri has uploaded this change for review. ( https://review.coreboot.org/25878
Change subject: cros-ec: Avoid infinitely looping in google_chromeec_pd_get_amode
......................................................................
cros-ec: Avoid infinitely looping in google_chromeec_pd_get_amode
Currently, google_chromeec_pd_get_amode infinitely loops if a TCPC port
is connected to a device with alternate mode(s) and the call is made for
the mode with the index higher than 0 (e.g. Zinger).
This patch adds delay between calls to the EC to query alternate mode
information. This allows the EC to process each call properly.
It also resets all the fields of chromeec_command in each iteration in
case google_chromeec_command changes them.
BUG=b:78630899
BRANCH=none
TEST=Verify Fizz boots without monitors on Zinger. Verify the svid
enumeration happens as expected.
Change-Id: I388ed4bdfac9176d8e690c429e99674ed267004f
Signed-off-by: Daisuke Nojiri <dnojiri(a)chromium.org>
---
M src/ec/google/chromeec/ec.c
1 file changed, 16 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/25878/1
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index fb3ffab..9676f2d 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -963,23 +963,28 @@
for (i = 0; i < r.num_ports; i++) {
struct ec_params_usb_pd_get_mode_request p;
struct ec_params_usb_pd_get_mode_response res;
-
- p.port = i;
- p.svid_idx = 0;
- cmd.cmd_code = EC_CMD_USB_PD_GET_AMODE;
- cmd.cmd_version = 0;
- cmd.cmd_data_in = &p;
- cmd.cmd_size_in = sizeof(p);
- cmd.cmd_data_out = &res;
- cmd.cmd_size_out = sizeof(res);
- cmd.cmd_dev_index = 0;
+ int svid_idx = 0;
do {
+ /* Reset cmd in each iteration in case
+ * google_chromeec_command changes it. */
+ p.port = i;
+ p.svid_idx = svid_idx;
+ cmd.cmd_code = EC_CMD_USB_PD_GET_AMODE;
+ cmd.cmd_version = 0;
+ cmd.cmd_data_in = &p;
+ cmd.cmd_size_in = sizeof(p);
+ cmd.cmd_data_out = &res;
+ cmd.cmd_size_out = sizeof(res);
+ cmd.cmd_dev_index = 0;
+
if (google_chromeec_command(&cmd) < 0)
return -1;
if (res.svid == svid)
return 1;
- p.svid_idx++;
+ svid_idx++;
+ /* Avoid storming EC */
+ mdelay(100);
} while (res.svid);
}
--
To view, visit https://review.coreboot.org/25878
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I388ed4bdfac9176d8e690c429e99674ed267004f
Gerrit-Change-Number: 25878
Gerrit-PatchSet: 1
Gerrit-Owner: Daisuke Nojiri <dnojiri(a)chromium.org>