summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRong Chang <rongchang@chromium.org>2012-07-16 20:58:06 +0800
committerGerrit <chrome-bot@google.com>2012-07-17 14:41:00 -0700
commit9eb416e3159751fd4f83bffc5c693824df7405bf (patch)
treeadade8d01cd050de600ad975d259e01476993325
parentea1cde3971127c910d4f1c861c3136e38efde8f1 (diff)
downloadchrome-ec-9eb416e3159751fd4f83bffc5c693824df7405bf.tar.gz
Fix I2C arbitration timeout when chipset is suspended
When system is off or suspended, board_i2c_claim() should not wait for AP's signal. Signed-off-by: Rong Chang <rongchang@chromium.org> BUG=chrome-os-partner:11285 TEST=manual Put AP into suspend Type 'i2c r 0x90 0' and see that no arbitration error is obtained. Change-Id: I22243457fc29bc6c88f413ce0660c700e54f6761 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27498
-rw-r--r--board/snow/board.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/board/snow/board.c b/board/snow/board.c
index 52a4cac8a8..ad951b4c37 100644
--- a/board/snow/board.c
+++ b/board/snow/board.c
@@ -200,8 +200,9 @@ int board_i2c_claim(int port)
if (port != I2C_PORT_HOST)
return EC_SUCCESS;
- /* If AP is off, we have the bus */
- if (!chipset_in_state(CHIPSET_STATE_ON)) {
+ /* If AP is off or suspended, we have the bus */
+ if (chipset_in_state(CHIPSET_STATE_ANY_OFF |
+ CHIPSET_STATE_SUSPEND)) {
gpio_set_level(GPIO_EC_CLAIM, 0);
return EC_SUCCESS;
}