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

Go to the source code of this file.

Macros

#define KBD_IBF   (1 << 1) /* 1: input buffer full (data ready for ec) */
 
#define KBD_OBF   (1 << 0) /* 1: output buffer full (data ready for host) */
 

Functions

static void ec_setports (u16 data, u16 cmd)
 
static int send_kbd_command (u8 command)
 
static int send_kbd_data (u8 data)
 
static int kbc1126_thermalinit (u8 cmd, u8 value)
 
static void kbc1126_kbdled (u8 cmd, u8 val)
 
static void kbc1126_enable (struct device *dev)
 

Variables

static u16 ec_data_port
 
static u16 ec_cmd_port
 
struct chip_operations ec_hp_kbc1126_ops
 

Macro Definition Documentation

◆ KBD_IBF

#define KBD_IBF   (1 << 1) /* 1: input buffer full (data ready for ec) */

Definition at line 14 of file ec.c.

◆ KBD_OBF

#define KBD_OBF   (1 << 0) /* 1: output buffer full (data ready for host) */

Definition at line 15 of file ec.c.

Function Documentation

◆ ec_setports()

static void ec_setports ( u16  data,
u16  cmd 
)
static

Definition at line 17 of file ec.c.

References ec_cmd_port, and ec_data_port.

◆ kbc1126_enable()

static void kbc1126_enable ( struct device dev)
static

Definition at line 113 of file ec.c.

◆ kbc1126_kbdled()

static void kbc1126_kbdled ( u8  cmd,
u8  val 
)
static

Definition at line 101 of file ec.c.

References send_kbd_command(), send_kbd_data(), and val.

Here is the call graph for this function:

◆ kbc1126_thermalinit()

static int kbc1126_thermalinit ( u8  cmd,
u8  value 
)
static

Definition at line 67 of file ec.c.

References BIOS_DEBUG, printk, send_kbd_command(), send_kbd_data(), and value.

Here is the call graph for this function:

◆ send_kbd_command()

static int send_kbd_command ( u8  command)
static

Definition at line 23 of file ec.c.

References BIOS_DEBUG, BIOS_SPEW, ec_cmd_port, inb(), KBD_IBF, outb(), printk, and udelay().

Referenced by kbc1126_kbdled(), and kbc1126_thermalinit().

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

◆ send_kbd_data()

static int send_kbd_data ( u8  data)
static

Definition at line 43 of file ec.c.

References BIOS_DEBUG, BIOS_SPEW, ec_cmd_port, ec_data_port, inb(), KBD_IBF, outb(), printk, and udelay().

Referenced by kbc1126_kbdled(), and kbc1126_thermalinit().

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

Variable Documentation

◆ ec_cmd_port

u16 ec_cmd_port
static

Definition at line 12 of file ec.c.

Referenced by ec_setports(), send_kbd_command(), and send_kbd_data().

◆ ec_data_port

u16 ec_data_port
static

Definition at line 11 of file ec.c.

Referenced by ec_setports(), and send_kbd_data().

◆ ec_hp_kbc1126_ops

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

Definition at line 113 of file ec.c.