coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ec.c File Reference
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
#include <arch/io.h>
#include <delay.h>
#include <pc80/keyboard.h>
#include "ec.h"
#include "chip.h"
Include dependency graph for ec.c:

Go to the source code of this file.

Functions

static int kbc_input_buffer_empty (void)
 
static int kbc_output_buffer_full (void)
 
int kbc_cleanup_buffers (void)
 
u8 ec_kbc_read_ob (void)
 
void ec_kbc_write_cmd (u8 cmd)
 
void ec_kbc_write_ib (u8 data)
 
static void ene932_init (struct device *dev)
 
static void enable_dev (struct device *dev)
 

Variables

static struct device_operations ops
 
static struct pnp_info pnp_dev_info []
 
struct chip_operations ec_compal_ene932_ops
 

Function Documentation

◆ ec_kbc_read_ob()

u8 ec_kbc_read_ob ( void  )

Definition at line 71 of file ec.c.

References inb(), kbc_output_buffer_full(), and KBD_DATA.

Referenced by ec_get_smi_event(), ec_it8518_get_event(), mainboard_smi_ec(), parrot_ec_init(), and parrot_rev().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ec_kbc_write_cmd()

void ec_kbc_write_cmd ( u8  cmd)

Definition at line 77 of file ec.c.

References kbc_input_buffer_empty(), KBD_COMMAND, and outb().

Referenced by ec_enter_acpi_mode(), ec_enter_apm_mode(), ec_get_smi_event(), ec_it8518_get_event(), enter_apm_mode(), mainboard_smi_apmc(), mainboard_smi_ec(), mainboard_smi_sleep(), parrot_ec_init(), parrot_rev(), set_keyboard_matrix_us(), and stout_ec_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ec_kbc_write_ib()

void ec_kbc_write_ib ( u8  data)

Definition at line 83 of file ec.c.

References kbc_input_buffer_empty(), KBD_DATA, and outb().

Referenced by ec_enter_acpi_mode(), ec_enter_apm_mode(), enter_apm_mode(), mainboard_smi_apmc(), mainboard_smi_sleep(), parrot_ec_init(), parrot_rev(), and set_keyboard_matrix_us().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable_dev()

static void enable_dev ( struct device dev)
static

Definition at line 128 of file ec.c.

◆ ene932_init()

static void ene932_init ( struct device dev)
static

Definition at line 109 of file ec.c.

References BIOS_DEBUG, device::enabled, NO_AUX_DEVICE, pc_keyboard_init(), and printk.

Here is the call graph for this function:

◆ kbc_cleanup_buffers()

int kbc_cleanup_buffers ( void  )

Definition at line 42 of file ec.c.

References BIOS_ERR, inb(), KBC_TIMEOUT_IN_MS, KBD_DATA, KBD_IBF, KBD_OBF, KBD_STATUS, mdelay(), and printk.

Referenced by parrot_ec_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kbc_input_buffer_empty()

static int kbc_input_buffer_empty ( void  )
static

Definition at line 13 of file ec.c.

References BIOS_WARNING, inb(), KBC_TIMEOUT_IN_MS, KBD_IBF, KBD_STATUS, mdelay(), and printk.

Referenced by ec_kbc_write_cmd(), and ec_kbc_write_ib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kbc_output_buffer_full()

static int kbc_output_buffer_full ( void  )
static

Definition at line 28 of file ec.c.

References BIOS_INFO, inb(), KBC_TIMEOUT_IN_MS, KBD_OBF, KBD_STATUS, mdelay(), and printk.

Referenced by ec_kbc_read_ob().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ec_compal_ene932_ops

struct chip_operations ec_compal_ene932_ops
Initial value:
= {
.enable_dev = enable_dev
}
static void enable_dev(struct device *dev)
Definition: ec.c:128

Definition at line 128 of file ec.c.

◆ ops

struct device_operations ops
static
Initial value:
= {
.init = ene932_init,
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
}
static void ene932_init(struct device *dev)
Definition: ec.c:109
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74

Definition at line 109 of file ec.c.

◆ pnp_dev_info

struct pnp_info pnp_dev_info[]
static
Initial value:
= {
{ NULL, 0, 0, 0, }
}
#define NULL
Definition: stddef.h:19

Definition at line 109 of file ec.c.