Move host_cmd_handler_args farther up the call chain

This is necessary for an imminent change which passes version data
from the host bus (LPC/I2C/SPI) into the host command handler.

BUG=chrome-os-partner:11275
TEST=from u-boot prompt, 'mkbp hash'

Change-Id: If34d0d7c6dc320ad5632becf512c30900fd61aca
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27190
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Randall Spangler
2012-07-11 13:37:20 -07:00
committed by Gerrit
parent fe5c01cb6e
commit bdf3ba5ded
5 changed files with 63 additions and 65 deletions

View File

@@ -54,14 +54,10 @@ uint8_t *host_get_memmap(int offset);
/**
* Process a host command and return its response
*
* @param command The command code
* @param data Buffer holding the command, and used for the
* response payload.
* @param response_size Returns the size of the response
* @param args Command handler args
* @return resulting status
*/
enum ec_status host_command_process(int command, uint8_t *data,
int *response_size);
enum ec_status host_command_process(struct host_cmd_handler_args *args);
/**
* Set one or more host event bits.
@@ -96,7 +92,7 @@ uint32_t host_get_events(void);
/**
* Called by host interface module when a command is received.
*/
void host_command_received(int command);
void host_command_received(struct host_cmd_handler_args *args);
/**
* Send a successful result code along with response data to a host command.
@@ -107,11 +103,6 @@ void host_command_received(int command);
*/
void host_send_response(enum ec_status result, const uint8_t *data, int size);
/* Return a pointer to the host command data buffer. This buffer must
* only be accessed between a notification to host_command_received()
* and a subsequent call to lpc_SendHostResponse(). */
uint8_t *host_get_buffer(void);
/* Register a host command handler */
#define DECLARE_HOST_COMMAND(command, routine, version_mask) \
const struct host_command __host_cmd_##command \