![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <pc80/keyboard.h>
#include <device/device.h>
#include <arch/io.h>
#include <delay.h>
#include <types.h>
#include <acpi/acpi.h>
Go to the source code of this file.
Macros | |
#define | KBD_DATA 0x60 |
#define | KBD_COMMAND 0x64 |
#define | KBD_STATUS 0x64 |
#define | KBD_IBF (1 << 1) |
#define | KBD_OBF (1 << 0) |
#define | KBC_CMD_READ_COMMAND 0x20 |
#define | KBC_CMD_WRITE_COMMAND 0x60 |
#define | KBC_CMD_AUX_ENABLE 0xA8 |
#define | KBC_CMD_AUX_TEST 0xA9 |
#define | KBC_CMD_SELF_TEST 0xAA |
#define | KBC_CMD_KBD_TEST 0xAB |
#define | KBC_REPLY_SELFTEST_OK 0x55 |
#define | KBD_REPLY_POR 0xAA |
#define | KBD_REPLY_ACK 0xFA |
#define | KBD_REPLY_RESEND 0xFE |
#define | KBC_TIMEOUT_IN_MS 400 |
Functions | |
static int | kbc_input_buffer_empty (void) |
static int | kbc_output_buffer_full (void) |
static int | kbc_cleanup_buffers (void) |
static enum cb_err | kbc_self_test (uint8_t probe_aux, uint8_t *aux_probe_result) |
static u8 | send_keyboard (u8 command) |
uint8_t | pc_keyboard_init (uint8_t probe_aux) |
void | set_kbc_ps2_mode (void) |
#define KBC_CMD_AUX_ENABLE 0xA8 |
Definition at line 20 of file keyboard.c.
#define KBC_CMD_AUX_TEST 0xA9 |
Definition at line 21 of file keyboard.c.
#define KBC_CMD_KBD_TEST 0xAB |
Definition at line 23 of file keyboard.c.
#define KBC_CMD_READ_COMMAND 0x20 |
Definition at line 18 of file keyboard.c.
#define KBC_CMD_SELF_TEST 0xAA |
Definition at line 22 of file keyboard.c.
#define KBC_CMD_WRITE_COMMAND 0x60 |
Definition at line 19 of file keyboard.c.
#define KBC_REPLY_SELFTEST_OK 0x55 |
Definition at line 39 of file keyboard.c.
#define KBC_TIMEOUT_IN_MS 400 |
Definition at line 49 of file keyboard.c.
#define KBD_COMMAND 0x64 |
Definition at line 12 of file keyboard.c.
#define KBD_DATA 0x60 |
Definition at line 11 of file keyboard.c.
#define KBD_IBF (1 << 1) |
Definition at line 14 of file keyboard.c.
#define KBD_OBF (1 << 0) |
Definition at line 15 of file keyboard.c.
#define KBD_REPLY_ACK 0xFA |
Definition at line 45 of file keyboard.c.
#define KBD_REPLY_POR 0xAA |
Definition at line 44 of file keyboard.c.
#define KBD_REPLY_RESEND 0xFE |
Definition at line 46 of file keyboard.c.
#define KBD_STATUS 0x64 |
Definition at line 13 of file keyboard.c.
|
static |
Definition at line 79 of file keyboard.c.
References BIOS_ERR, inb(), KBC_TIMEOUT_IN_MS, KBD_DATA, KBD_IBF, KBD_OBF, KBD_STATUS, mdelay(), and printk.
Referenced by pc_keyboard_init(), and set_kbc_ps2_mode().
|
static |
Definition at line 51 of file keyboard.c.
References BIOS_WARNING, inb(), KBC_TIMEOUT_IN_MS, KBD_IBF, KBD_STATUS, mdelay(), and printk.
Referenced by pc_keyboard_init(), send_keyboard(), and set_kbc_ps2_mode().
|
static |
Definition at line 65 of file keyboard.c.
References BIOS_INFO, inb(), KBC_TIMEOUT_IN_MS, KBD_OBF, KBD_STATUS, mdelay(), and printk.
Referenced by pc_keyboard_init(), and send_keyboard().
Definition at line 79 of file keyboard.c.
Referenced by pc_keyboard_init(), and set_kbc_ps2_mode().
Definition at line 229 of file keyboard.c.
References acpi_is_wakeup_s3(), BIOS_DEBUG, BIOS_ERR, BIOS_INFO, CB_KBD_INTERFACE_FAILURE, CB_SUCCESS, CONFIG, inb(), kbc_cleanup_buffers(), kbc_input_buffer_empty(), kbc_output_buffer_full(), kbc_self_test(), KBD_COMMAND, KBD_DATA, KBD_REPLY_ACK, KBD_REPLY_RESEND, outb(), printk, and send_keyboard().
Referenced by ast2400_init(), ene932_init(), ene_kb3940q_init(), f71808a_init(), f71863fg_init(), f71869ad_init(), f81803a_init(), f81865f_init(), f81866d_init(), init(), it8518_init(), it8613e_init(), it8623e_init(), it8712f_init(), it8720f_init(), it8728f_init(), it8772f_init(), it8783ef_init(), it8786e_init(), kbc1100_init(), lpc47m10x_init(), lpc47m15x_init(), lpc47n227_init(), m3885x_init(), mainboard_enable(), mainboard_init(), mec1308_init(), merlin_init(), nct5539d_init(), nct5572d_init(), nct6776_init(), nct6779d_init(), nct6791d_init(), npcd378_init(), qemu_nb_init(), sch5545_init(), w83627ehg_init(), w83627hf_init(), and wilco_ec_init().
Definition at line 197 of file keyboard.c.
References BIOS_ERR, inb(), kbc_input_buffer_empty(), kbc_output_buffer_full(), KBD_DATA, KBD_REPLY_RESEND, outb(), and printk.
Referenced by pc_keyboard_init().
Definition at line 351 of file keyboard.c.
References CB_KBD_INTERFACE_FAILURE, CB_SUCCESS, kbc_cleanup_buffers(), kbc_input_buffer_empty(), kbc_self_test(), KBD_COMMAND, KBD_DATA, NULL, and outb().
Referenced by it8712f_init(), it8728f_init(), it8772f_init(), and m3885x_init().