diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-22 13:53:37 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-23 04:09:50 +0000 |
commit | bbf6b9b076d28b55a81c2eae69f3913721afa54b (patch) | |
tree | 0fc2ee5cbbbce0e2997639a2e95c015be231eaa7 /chip | |
parent | 5f26987366fefe22f9f6157f3d13c18aed3c9e03 (diff) | |
download | chrome-ec-bbf6b9b076d28b55a81c2eae69f3913721afa54b.tar.gz |
lpc: No need to scan entire host command I/O space for detection
The EC LPC implementation guarantees that the status byte will have at
least one zero bit, so there's no need to scan the parameter space as
well. Removing this unneeded check will slightly speed up ectool.
BUG=chrome-os-partner:10963
BRANCH=none
TEST=on an x86 chromebook (e.g. link), ectool hello still works
iotools io_read8 0x200 && iotools io_read8 0x204 -> not both 0xff
Change-Id: Ic02ca0ee686ab10e50093807717ec638aaa468c6
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174059
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/lm4/lpc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 587c79c22a..8a99247c74 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -724,6 +724,12 @@ static void lpc_init(void) */ LM4_LPC_ADR(LPC_CH_CMD) = EC_LPC_ADDR_HOST_DATA; LM4_LPC_CTL(LPC_CH_CMD) = (LPC_POOL_OFFS_CMD << (5 - 1)); + /* + * Initialize status bits to 0. We never set the ACPI burst status bit, + * so this guarantees that at least one status bit will always be 0. + * This is used by comm_lpc.c to detect that the EC is present on the + * LPC bus. See crosbug.com/p/10963. + */ LM4_LPC_ST(LPC_CH_CMD) = 0; /* Unmask interrupt for host command writes */ LM4_LPC_LPCIM |= LM4_LPC_INT_MASK(LPC_CH_CMD, 4); |