From 433432b6544fc57c7998a66aaa34c45609e4fc8c Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 3 Jun 2013 10:38:22 -0700 Subject: chrome ec: Update EC header from EC repository - Updated ec_commands.h is copied in directly from EC repo - Removed "old" interface and update resources for "new" interface - Updated temp sensor constants and added "not calibrated" - Update mainboards to remove check for EC_SWITCH_KEYBOARD_RECOVERY Change-Id: Ic93c1914f86b6f5bc224178270624ed92b5c1e15 Signed-off-by: Duncan Laurie Reviewed-on: http://review.coreboot.org/3743 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/ec/google/chromeec/ec_lpc.c | 50 ----------------------------------------- 1 file changed, 50 deletions(-) (limited to 'src/ec/google/chromeec/ec_lpc.c') diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c index 4e8d3fbb77..a445da87be 100644 --- a/src/ec/google/chromeec/ec_lpc.c +++ b/src/ec/google/chromeec/ec_lpc.c @@ -50,52 +50,6 @@ static int google_chromeec_wait_ready(u16 port) return 0; } -static int google_chromeec_cmd_args_supported(void) -{ - if (inb(EC_LPC_ADDR_MEMMAP + EC_MEMMAP_ID) == 'E' && - inb(EC_LPC_ADDR_MEMMAP + EC_MEMMAP_ID + 1) == 'C' && - (inb(EC_LPC_ADDR_MEMMAP + EC_MEMMAP_HOST_CMD_FLAGS) & - EC_HOST_CMD_FLAG_LPC_ARGS_SUPPORTED)) - return 1; - - return 0; -} - -static int google_chromeec_command_old(struct chromeec_command *cec_command) -{ - int i; - - if (cec_command->cmd_version) { - printk(BIOS_ERR, "Invalid version for command protocol!\n"); - return 1; - } - - if (google_chromeec_wait_ready(EC_LPC_ADDR_HOST_CMD)) { - printk(BIOS_ERR, "Timeout waiting for EC ready!\n"); - return 1; - } - - /* Copy command data, if any. */ - for (i = 0; i < cec_command->cmd_size_in; i++) - outb(((char*)cec_command->cmd_data_in)[i], - EC_LPC_ADDR_OLD_PARAM + i); - - /* Issue the command. */ - outb(cec_command->cmd_code, EC_LPC_ADDR_HOST_CMD); - - if (google_chromeec_wait_ready(EC_LPC_ADDR_HOST_CMD)) { - printk(BIOS_ERR, "Timeout waiting for EC process command %d!\n", - cec_command->cmd_code); - return 1; - } - - for (i = 0; i < cec_command->cmd_size_out; i++) - ((char*)cec_command->cmd_data_out)[i] = - inb(EC_LPC_ADDR_OLD_PARAM + i); - cec_command->cmd_code = inb(EC_LPC_ADDR_HOST_DATA); - return 0; -} - int google_chromeec_command(struct chromeec_command *cec_command) { struct ec_lpc_host_args args; @@ -105,10 +59,6 @@ int google_chromeec_command(struct chromeec_command *cec_command) int csum; int i; - /* Fall back to old command protocol if necessary */ - if (!google_chromeec_cmd_args_supported()) - return google_chromeec_command_old(cec_command); - /* Fill in args */ args.flags = EC_HOST_ARGS_FLAG_FROM_HOST; args.command_version = cec_command->cmd_version; -- cgit v1.2.3