diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2013-06-03 10:38:22 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-07-10 21:44:09 +0200 |
commit | 433432b6544fc57c7998a66aaa34c45609e4fc8c (patch) | |
tree | 4e8e7977396504b8efae05504097a448ef86a3e4 /src/ec/google/chromeec/ec_lpc.c | |
parent | e8b08ba47c8b17480bd94eef7dc8a47629191957 (diff) | |
download | coreboot-433432b6544fc57c7998a66aaa34c45609e4fc8c.tar.xz |
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 <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/3743
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/ec/google/chromeec/ec_lpc.c')
-rw-r--r-- | src/ec/google/chromeec/ec_lpc.c | 50 |
1 files changed, 0 insertions, 50 deletions
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; |