diff options
Diffstat (limited to 'chip/ish/ipc_heci.h')
-rw-r--r-- | chip/ish/ipc_heci.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/chip/ish/ipc_heci.h b/chip/ish/ipc_heci.h index 183e6a2c6b..f9372aefa3 100644 --- a/chip/ish/ipc_heci.h +++ b/chip/ish/ipc_heci.h @@ -1,4 +1,4 @@ -/* Copyright 2018 The Chromium OS Authors. All rights reserved. +/* Copyright 2018 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -8,16 +8,16 @@ #define __IPC_HECI_H enum IPC_ERR { - IPC_ERR_IPC_IS_NOT_READY = EC_ERROR_INTERNAL_FIRST + 0, - IPC_ERR_TOO_SMALL_BUFFER = EC_ERROR_INTERNAL_FIRST + 1, - IPC_ERR_TX_QUEUE_FULL = EC_ERROR_INTERNAL_FIRST + 2, - IPC_ERR_INVALID_TASK = EC_ERROR_INTERNAL_FIRST + 3, - IPC_ERR_MSG_NOT_AVAILABLE = EC_ERROR_INTERNAL_FIRST + 4, - IPC_ERR_INVALID_MSG = EC_ERROR_INTERNAL_FIRST + 5, + IPC_ERR_IPC_IS_NOT_READY = EC_ERROR_INTERNAL_FIRST + 0, + IPC_ERR_TOO_SMALL_BUFFER = EC_ERROR_INTERNAL_FIRST + 1, + IPC_ERR_TX_QUEUE_FULL = EC_ERROR_INTERNAL_FIRST + 2, + IPC_ERR_INVALID_TASK = EC_ERROR_INTERNAL_FIRST + 3, + IPC_ERR_MSG_NOT_AVAILABLE = EC_ERROR_INTERNAL_FIRST + 4, + IPC_ERR_INVALID_MSG = EC_ERROR_INTERNAL_FIRST + 5, }; enum ipc_peer_id { - IPC_PEER_ID_HOST = 0, /* x64 host */ + IPC_PEER_ID_HOST = 0, /* x64 host */ #if 0 /* other peers are not implemented yet */ IPC_PEER_ID_PMC = 1, /* Power Management Controller */ IPC_PEER_ID_CSME = 2, /* Converged Security Management Engine */ @@ -33,11 +33,11 @@ enum ipc_peer_id { BUILD_ASSERT(IPC_PEERS_COUNT <= 0x0F); enum ipc_protocol { - IPC_PROTOCOL_BOOT = 0, /* Not supported */ - IPC_PROTOCOL_HECI, /* Host Embedded Controller Interface */ - IPC_PROTOCOL_MCTP, /* not supported */ - IPC_PROTOCOL_MNG, /* Management protocol */ - IPC_PROTOCOL_ECP, /* EC Protocol. not supported */ + IPC_PROTOCOL_BOOT = 0, /* Not supported */ + IPC_PROTOCOL_HECI, /* Host Embedded Controller Interface */ + IPC_PROTOCOL_MCTP, /* not supported */ + IPC_PROTOCOL_MNG, /* Management protocol */ + IPC_PROTOCOL_ECP, /* EC Protocol. not supported */ IPC_PROTOCOL_COUNT }; /* @@ -46,10 +46,10 @@ enum ipc_protocol { */ BUILD_ASSERT(IPC_PROTOCOL_COUNT <= 0x0F); -typedef void * ipc_handle_t; +typedef void *ipc_handle_t; -#define IPC_MAX_PAYLOAD_SIZE 128 -#define IPC_INVALID_HANDLE NULL +#define IPC_MAX_PAYLOAD_SIZE 128 +#define IPC_INVALID_HANDLE NULL /* * Open ipc channel @@ -61,8 +61,7 @@ typedef void * ipc_handle_t; * @return ipc handle or IPC_INVALID_HANDLE if there's error */ ipc_handle_t ipc_open(const enum ipc_peer_id peer_id, - const enum ipc_protocol protocol, - const uint32_t event); + const enum ipc_protocol protocol, const uint32_t event); void ipc_close(const ipc_handle_t handle); /* @@ -74,10 +73,10 @@ void ipc_close(const ipc_handle_t handle); * if > 0, wait for the specified microsecond duration time */ int ipc_read(const ipc_handle_t handle, void *buf, const size_t buf_size, - int timeout_us); + int timeout_us); /* Write message to ipc channel. */ int ipc_write_timestamp(const ipc_handle_t handle, const void *buf, - const size_t buf_size, uint32_t *timestamp); + const size_t buf_size, uint32_t *timestamp); #endif /* __IPC_HECI_H */ |