diff options
author | Charlie Mooney <charliemooney@chromium.org> | 2012-08-20 13:46:29 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-23 09:06:05 -0700 |
commit | 2f70b36ad0623c2c2719fe39c71e80acbeb23aae (patch) | |
tree | d9b6d6e67e202d58a7b0c8d5eeb5ef18aada08cb /board/snow | |
parent | 5458d7aa678ac6a307342fad808cae184498b4b1 (diff) | |
download | chrome-ec-2f70b36ad0623c2c2719fe39c71e80acbeb23aae.tar.gz |
Snow: i2c arbitration cleanup (suspend)
The ec used to have to check the state of the AP since it would leave
the arbitration lines when it suspended. That meant you couldn't trust
the arbitration lines without checking the power state. Now the AP
pulls the arbitration lines high when it suspends, so it no longer needs
to test this when trying to acquire master.
BUG=chrome-os-partner:12460
TEST=First, on the EC console run "battery" and "pmu" to make sure they
work. Then repeat those steps after putting the AP in suspend by
running powerd_suspend, they should still work. Then shutdown the
machine entirely and try them again. Note: pmu needs the AP to be on to
work, so if it fails here that's okay, just make sure it's not an
arbitration error.
BRANCH=snow
Change-Id: I335156bbce4888949111f74e8a83fe9d184a7a63
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30906
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/snow')
-rw-r--r-- | board/snow/board.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/board/snow/board.c b/board/snow/board.c index 258b534184..4575a17a40 100644 --- a/board/snow/board.c +++ b/board/snow/board.c @@ -208,9 +208,8 @@ int board_i2c_claim(int port) if (port != I2C_PORT_HOST) return EC_SUCCESS; - /* If AP is off or suspended, we have the bus */ - if (chipset_in_state(CHIPSET_STATE_ANY_OFF | - CHIPSET_STATE_SUSPEND)) { + /* If AP is off, we have the bus */ + if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) { gpio_set_level(GPIO_EC_CLAIM, 0); return EC_SUCCESS; } @@ -253,12 +252,9 @@ int board_i2c_claim(int port) void board_i2c_release(int port) { if (port == I2C_PORT_HOST) { - /* Release our claim when AP is on */ - if (!chipset_in_state(CHIPSET_STATE_ANY_OFF | - CHIPSET_STATE_SUSPEND)) { - gpio_set_level(GPIO_EC_CLAIM, 1); - usleep(BUS_SLEW_DELAY_US); - } + /* Release our claim */ + gpio_set_level(GPIO_EC_CLAIM, 1); + usleep(BUS_SLEW_DELAY_US); } } #endif /* CONFIG_ARBITRATE_I2C */ |