diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2016-04-13 12:34:08 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-15 13:40:17 -0700 |
commit | de45353bbdf0c6c4afb88420d3cb2e182eae7450 (patch) | |
tree | c8679091de030c771b515fc96ac2b5c2e35fe14a /util/comm-host.h | |
parent | fef9abf3b3473dad728e2f2bd8557e230214f03d (diff) | |
download | chrome-ec-de45353bbdf0c6c4afb88420d3cb2e182eae7450.tar.gz |
ectool: Remove CROS_EC_DEV_IOCRDMEM
On !LPC EC, we can read memory via CROS_EC_DEV_IOCXCMD ioctl,
using command EC_CMD_READ_MEMMAP.
On platform that supports direct memory access (lpc), we access
the memory directly, bypassing the ioctl.
BUG=chromium:602832
TEST=On gnawty and veyron, check 'ectool battery' works.
Verify that gnawty use io mapped registers.
BRANCH=none
Change-Id: I9bfcddcf450bf8df63ead78e1df97dd7392289e6
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/338853
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util/comm-host.h')
-rw-r--r-- | util/comm-host.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/util/comm-host.h b/util/comm-host.h index 1d3cb9e36d..bfe99b2179 100644 --- a/util/comm-host.h +++ b/util/comm-host.h @@ -74,4 +74,15 @@ extern int (*ec_command_proto)(int command, int version, */ extern int (*ec_readmem)(int offset, int bytes, void *dest); +/* + * Functions for initializing communication protocols. + * @param device_name: device name to open to access the ec. + * @param init_readmem_only: + * 1: init only ec_readmem + * 0: set ec_command_proto as well. + */ +int comm_init_dev(const char *device_name); +int comm_init_lpc(int init_readmem_only); +int comm_init_i2c(void); + #endif /* __UTIL_COMM_HOST_H */ |