diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2016-04-22 11:09:33 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-22 17:17:56 -0700 |
commit | e54d1284ffbd1d7c3b1f77a2a696ce275c527de4 (patch) | |
tree | dba186d112dd55598819dd5c53db6e451d59407e /util/comm-lpc.c | |
parent | 1546b4de0b6d8b443f6c8b3e49810010f896b40b (diff) | |
download | chrome-ec-e54d1284ffbd1d7c3b1f77a2a696ce275c527de4.tar.gz |
ectool: Revert "ectool: Remove CROS_EC_DEV_IOCRDMEM"
CROS_EC_DEV_IOCRDMEM must be used on architecture where legacy IO mapped
registers are accessed inderectly via EMI. The kernel is taking care of
the translation.
TEST=Check on reks that we need to use the IOCTL.
BUG=chrome-os-partner:52550,chromium:602832
BRANCH=none
This reverts commit de45353bbdf0 ("ectool: Remove CROS_EC_DEV_IOCRDMEM").
Change-Id: I8efad56df90c58c25bdc9ccd70a508547e629a77
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/340348
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'util/comm-lpc.c')
-rw-r--r-- | util/comm-lpc.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/util/comm-lpc.c b/util/comm-lpc.c index 27a32f3b69..54f16b3ffc 100644 --- a/util/comm-lpc.c +++ b/util/comm-lpc.c @@ -246,7 +246,7 @@ static int ec_readmem_lpc(int offset, int bytes, void *dest) return cnt; } -int comm_init_lpc(int init_readmem_only) +int comm_init_lpc(void) { int i; int byte = 0xff; @@ -257,13 +257,6 @@ int comm_init_lpc(int init_readmem_only) return -3; } - ec_readmem = ec_readmem_lpc; - - if (init_readmem_only) { - /* Function to send commands already defined. */ - return 0; - } - /* * Test if the I/O port has been configured for Chromium EC LPC * interface. Chromium EC guarantees that at least one status bit will @@ -315,13 +308,9 @@ int comm_init_lpc(int init_readmem_only) return -5; } + /* Either one supports reading mapped memory directly. */ + ec_readmem = ec_readmem_lpc; return 0; } -#else /* defined(__i386__) || defined(__x86_64__) */ -#include <errno.h> -int comm_init_lpc(int unused) -{ - return -EOPNOTSUPP; -} -#endif /* defined(__i386__) || defined(__x86_64__) */ +#endif |