![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/io.h>
#include <assert.h>
#include <console/console.h>
#include <delay.h>
#include <device/pnp.h>
#include <ec/google/common/mec.h>
#include <stdint.h>
#include <timer.h>
#include "chip.h"
#include "ec.h"
#include "ec_commands.h"
Go to the source code of this file.
Variables | |
static struct device_operations | ops |
static struct pnp_info | pnp_dev_info [] |
struct chip_operations | ec_google_chromeec_ops |
int google_chromeec_command | ( | struct chromeec_command * | cec_command | ) |
Send a command to a CrOS EC.
cec_command | CrOS EC command to send |
Definition at line 384 of file ec_lpc.c.
References ec_lpc_host_args::command_version, EC_HOST_CMD_FLAG_LPC_ARGS_SUPPORTED, EC_HOST_CMD_FLAG_VERSION_3, google_chromeec_command_v1(), google_chromeec_command_v3(), and google_chromeec_command_version().
|
static |
Definition at line 284 of file ec_lpc.c.
References args, BIOS_ERR, EC_HOST_ARGS_FLAG_FROM_HOST, EC_HOST_ARGS_FLAG_TO_HOST, EC_LPC_ADDR_HOST_ARGS, EC_LPC_ADDR_HOST_CMD, EC_LPC_ADDR_HOST_DATA, EC_LPC_ADDR_HOST_PARAM, google_chromeec_wait_ready(), NULL, printk, read_byte(), read_bytes(), write_byte(), and write_bytes().
Referenced by google_chromeec_command().
|
static |
Definition at line 179 of file ec_lpc.c.
References BIOS_ERR, ec_host_request::checksum, ec_host_request::command, ec_host_request::command_version, ec_host_request::data_len, ec_host_response::data_len, EC_CMD_PASSTHRU_OFFSET, EC_COMMAND_PROTOCOL_3, EC_HOST_REQUEST_VERSION, EC_HOST_RESPONSE_VERSION, EC_LPC_ADDR_HOST_CMD, EC_LPC_ADDR_HOST_DATA, EC_LPC_ADDR_HOST_PACKET, EC_LPC_HOST_PACKET_SIZE, google_chromeec_wait_ready(), NULL, printk, read_byte(), read_bytes(), ec_host_request::reserved, ec_host_response::reserved, ec_host_request::struct_version, ec_host_response::struct_version, write_byte(), and write_bytes().
Referenced by google_chromeec_command().
|
static |
Definition at line 148 of file ec_lpc.c.
References BIOS_ERR, EC_HOST_CMD_FLAG_LPC_ARGS_SUPPORTED, EC_HOST_CMD_FLAG_VERSION_3, EC_LPC_ADDR_MEMMAP, EC_MEMMAP_HOST_CMD_FLAGS, EC_MEMMAP_ID, id1, printk, and read_byte().
Referenced by google_chromeec_command().
|
static |
Definition at line 458 of file ec_lpc.c.
References EC_LPC_CMDR_DATA, and google_chromeec_status_check().
enum host_event_code google_chromeec_get_event | ( | void | ) |
Definition at line 359 of file ec_lpc.c.
References EC_LPC_ADDR_MEMMAP, EC_MEMMAP_SWITCHES, and read_byte().
Referenced by get_lid_switch(), and get_recovery_mode_switch().
Definition at line 364 of file ec_lpc.c.
References assert, base, CONFIG, EC_HOST_CMD_REGION0, EC_HOST_CMD_REGION_SIZE, EC_LPC_ADDR_MEMMAP, EC_MEMMAP_SIZE, MEC_EMI_BASE, and MEC_EMI_SIZE.
Referenced by bootblock_ec_init(), early_ec_init(), and lpc_ec_read_resources().
Definition at line 94 of file ec_lpc.c.
References mask, read_byte(), stopwatch_expired(), stopwatch_init_usecs_expire(), udelay(), and USECS_PER_SEC.
Referenced by google_chromeec_data_ready(), and google_chromeec_wait_ready().
|
static |
Definition at line 111 of file ec_lpc.c.
References EC_LPC_CMDR_BUSY, EC_LPC_CMDR_PENDING, and google_chromeec_status_check().
Referenced by google_chromeec_command_v1(), and google_chromeec_command_v3().
Definition at line 400 of file ec_lpc.c.
References device::enabled, and google_chromeec_init().
Definition at line 419 of file ec_lpc.c.
References resource::base, base, resource::flags, google_chromeec_ioport_range(), IORESOURCE_ASSIGNED, IORESOURCE_FIXED, IORESOURCE_IO, new_resource(), and resource::size.
Definition at line 48 of file ec_lpc.c.
References NULL, and read_bytes().
Referenced by google_chromeec_command_v1(), google_chromeec_command_v3(), google_chromeec_command_version(), google_chromeec_get_switches(), and google_chromeec_status_check().
Definition at line 24 of file ec_lpc.c.
References inb(), length, MEC_EMI_BASE, MEC_EMI_RANGE_END, MEC_EMI_RANGE_START, mec_io_bytes(), and MEC_IO_READ.
Referenced by google_chromeec_command_v1(), google_chromeec_command_v3(), and read_byte().
Definition at line 87 of file ec_lpc.c.
References NULL, val, and write_bytes().
Referenced by google_chromeec_command_v1(), and google_chromeec_command_v3().
Definition at line 63 of file ec_lpc.c.
References length, MEC_EMI_BASE, MEC_EMI_RANGE_END, MEC_EMI_RANGE_START, mec_io_bytes(), MEC_IO_WRITE, and outb().
Referenced by google_chromeec_command_v1(), google_chromeec_command_v3(), and write_byte().
struct chip_operations ec_google_chromeec_ops |
|
static |