[coreboot-gerrit] Patch set updated for coreboot: 96bed2c i2c/ww_ring: stop running programs before loading the new ones
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Wed Apr 22 09:08:19 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9872
-gerrit
commit 96bed2c867f245fc2b4d69529549f4921884d47e
Author: Vadim Bendebury <vbendeb at chromium.org>
Date: Thu Mar 19 10:14:13 2015 -0700
i2c/ww_ring: stop running programs before loading the new ones
The two controllers on the ring are programmed independently, and if
the second controller is running the old pattern while the first one
was loaded with a new pattern, there is a window of when the two
unrelated patterns might interact.
To avoid this shut down execution on both controllers before starting
downloading the new pattern code.
BRANCH=storm
BUG=chrome-os-partner:36059
TEST=verified recovery/wipeout LED ring behavior did not change.
Change-Id: I163f2983d414fe839208054ae3e9025663a46aeb
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: 3502ca6b119c033855b45388e7b782d35cfdd82b
Original-Change-Id: I0f71f94a7e82f6c0e7f98d3aad1f93ece207248f
Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/261200
Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
src/drivers/i2c/ww_ring/ww_ring.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/drivers/i2c/ww_ring/ww_ring.c b/src/drivers/i2c/ww_ring/ww_ring.c
index 780d0db..bfecc60 100644
--- a/src/drivers/i2c/ww_ring/ww_ring.c
+++ b/src/drivers/i2c/ww_ring/ww_ring.c
@@ -349,6 +349,18 @@ int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern)
if (wwr_prog->led_pattern == pattern) {
int j;
+ /*
+ * First stop all running programs to avoid
+ * inerference between the controllers.
+ */
+ for (j = 0; j < WW_RING_NUM_LED_CONTROLLERS; j++) {
+ if (!lp55231s[j].dev_addr)
+ continue;
+ ledc_write_engctrl2
+ (lp55231s + j,
+ LP55231_ENGCTRL2_ALL_DISABLE);
+ }
+
for (j = 0; j < WW_RING_NUM_LED_CONTROLLERS; j++) {
if (!lp55231s[j].dev_addr)
continue;
More information about the coreboot-gerrit
mailing list