diff options
Diffstat (limited to 'util/comm-lpc.c')
-rw-r--r-- | util/comm-lpc.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/util/comm-lpc.c b/util/comm-lpc.c index 54f16b3ffc..27a32f3b69 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(void) +int comm_init_lpc(int init_readmem_only) { int i; int byte = 0xff; @@ -257,6 +257,13 @@ int comm_init_lpc(void) 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 @@ -308,9 +315,13 @@ int comm_init_lpc(void) return -5; } - /* Either one supports reading mapped memory directly. */ - ec_readmem = ec_readmem_lpc; return 0; } -#endif +#else /* defined(__i386__) || defined(__x86_64__) */ +#include <errno.h> +int comm_init_lpc(int unused) +{ + return -EOPNOTSUPP; +} +#endif /* defined(__i386__) || defined(__x86_64__) */ |